|
Lagrange
|
Options for project_directional(). More...
#include <lagrange/raycasting/Options.h>
Public Attributes | |
| std::variant< std::monostate, Eigen::Vector3f, AttributeId > | direction = {} |
| Raycasting direction to project attributes. | |
| CastMode | cast_mode = CastMode::BothWays |
| Whether to project forward along the ray, or both forward and backward. | |
| FallbackMode | fallback_mode = FallbackMode::Constant |
| Fallback mode for vertices where there is no hit. | |
| double | default_value = 0.0 |
| Scalar used to fill attributes in Constant fallback mode. | |
| std::function< void(uint64_t, bool)> | user_callback = nullptr |
| Optional callback invoked for each target vertex with (vertex index, was_hit). | |
Public Attributes inherited from ProjectCommonOptions | |
| std::vector< AttributeId > | attribute_ids |
| Additional vertex attribute ids to project (beyond vertex positions). | |
| bool | project_vertices = true |
| Whether to project vertex positions. | |
| std::function< bool(uint64_t)> | skip_vertex = nullptr |
| If provided, whether to skip assignment for a target vertex or not. | |
Options for project_directional().
| std::variant<std::monostate, Eigen::Vector3f, AttributeId> direction = {} |
Raycasting direction to project attributes.
This can be one of three types:
std::monostate (default): Use per-vertex normals from the target mesh. If no vertex normal attribute exists on the target mesh, one is automatically computed via compute_vertex_normal.Eigen::Vector3f: A uniform direction for all rays (will be normalized internally).AttributeId: An attribute id referencing a per-vertex Normal attribute on the target mesh, providing a per-vertex ray direction. | std::function<void(uint64_t, bool)> user_callback = nullptr |
Optional callback invoked for each target vertex with (vertex index, was_hit).
Called regardless of hit/miss. This is useful to determine if the directional raycast was a hit or if the fallback method was used.