14#include <lagrange/AttributeFwd.h>
15#include <lagrange/utils/warning.h>
63 static std::map<std::string, ProjectMode> _modes = {
71 LA_IGNORE_DEPRECATION_WARNING_END
75inline const std::map<std::string, CastMode>& cast_modes()
78 static std::map<std::string, CastMode> _modes = {
84 LA_IGNORE_DEPRECATION_WARNING_END
88inline const std::map<std::string, FallbackMode>& fallback_modes()
91 static std::map<std::string, FallbackMode> _modes = {
99 LA_IGNORE_DEPRECATION_WARNING_END
103[[deprecated]]
inline const std::map<std::string, FallbackMode>& wrap_modes()
105 return fallback_modes();
145 std::variant<std::monostate, Eigen::Vector3f, AttributeId>
direction = {};
#define LA_IGNORE_DEPRECATION_WARNING_BEGIN
Ignore deprecation warnings.
Definition warning.h:76
Raycasting operations.
Definition ClosestPointResult.h:22
ProjectMode
Main projection mode.
Definition Options.h:30
@ RayCasting
Copy attribute by projecting along a prescribed direction on the source mesh.
Definition Options.h:36
@ ClosestPoint
Interpolate attribute from the closest point on the source mesh.
Definition Options.h:35
@ CLOSEST_POINT
Definition Options.h:32
@ ClosestVertex
Copy attribute from the closest vertex on the source mesh.
Definition Options.h:34
@ RAY_CASTING
Definition Options.h:33
@ CLOSEST_VERTEX
Definition Options.h:31
FallbackMode
Fallback mode for vertices without a hit.
Definition Options.h:49
@ ClosestPoint
Interpolate attribute from the closest point on the source mesh.
Definition Options.h:55
@ CLOSEST_POINT
Definition Options.h:52
@ ClosestVertex
Copy attribute from the closest vertex on the source mesh.
Definition Options.h:54
@ CONSTANT
Definition Options.h:50
@ Constant
Fill with a constant value (defaults to 0).
Definition Options.h:53
@ CLOSEST_VERTEX
Definition Options.h:51
CastMode
Ray-casting mode.
Definition Options.h:41
@ BothWays
Cast a ray both forward and backward in the prescribed direction.
Definition Options.h:45
@ OneWay
Cast a ray forward in the prescribed direction.
Definition Options.h:44
@ BOTH_WAYS
Definition Options.h:43
@ ONE_WAY
Definition Options.h:42
const std::map< std::string, ProjectMode > & project_modes()
<
Definition Options.h:60
Main namespace for Lagrange.
Common options for projection functions.
Definition Options.h:117
bool project_vertices
Whether to project vertex positions.
Definition Options.h:124
std::vector< AttributeId > attribute_ids
Additional vertex attribute ids to project (beyond vertex positions).
Definition Options.h:119
std::function< bool(uint64_t)> skip_vertex
If provided, whether to skip assignment for a target vertex or not.
Definition Options.h:128
Options for project_directional().
Definition Options.h:135
double default_value
Scalar used to fill attributes in Constant fallback mode.
Definition Options.h:154
CastMode cast_mode
Whether to project forward along the ray, or both forward and backward.
Definition Options.h:148
std::variant< std::monostate, Eigen::Vector3f, AttributeId > direction
Raycasting direction to project attributes.
Definition Options.h:145
std::function< void(uint64_t, bool)> user_callback
Optional callback invoked for each target vertex with (vertex index, was_hit).
Definition Options.h:159
FallbackMode fallback_mode
Fallback mode for vertices where there is no hit.
Definition Options.h:151
Options for project().
Definition Options.h:166
ProjectMode project_mode
Projection mode to choose from.
Definition Options.h:168