|
Lagrange
|
Raycasting operations. More...
Classes | |
| struct | ClosestPointHit |
| Result of a single closest point query. More... | |
| struct | ClosestPointHitN |
| Result of a multi-point closest point query. More... | |
| struct | HitBase |
| Shared base struct for ray and closest point hits. More... | |
| struct | HitBaseN |
| Shared base struct for multi-ray and multi-point hits. More... | |
| struct | LocalFeatureSizeOptions |
| Options for compute_local_feature_size(). More... | |
| struct | OccludedFacetEstimateOptions |
| Loop options for estimate_occluded_facets() and remove_occluded_facets(). More... | |
| class | OccludedFacetSampler |
| Stateful algorithm for finding occluded facets across every instance of a scene. More... | |
| struct | OccludedFacetSamplerOptions |
| Options for OccludedFacetSampler. More... | |
| struct | OccludedInstanceEstimateOptions |
| Loop options for estimate_occluded_instances() and remove_occluded_instances(). More... | |
| class | OccludedInstanceSampler |
| Stateful algorithm for finding occluded instances in a scene. More... | |
| struct | ProjectCommonOptions |
| Common options for projection functions. More... | |
| struct | ProjectDirectionalOptions |
| Options for project_directional(). More... | |
| struct | ProjectOptions |
| Options for project(). More... | |
| class | RayCaster |
| A ray caster built on top of Embree that operates directly on SurfaceMesh and SimpleScene objects. More... | |
| struct | RayHit |
| Result of a single-ray intersection query. More... | |
| struct | RayHitN |
| Result of a multi-ray intersection query. More... | |
| struct | RemoveOccludedFacetsOptions |
| Options for remove_occluded_facets(). More... | |
Enumerations | |
| enum class | RayDirectionMode { Interior , Exterior , Both } |
| Ray direction mode for local feature size computation. More... | |
| enum class | ProjectMode { CLOSEST_VERTEX = 0 , CLOSEST_POINT = 1 , RAY_CASTING = 2 , ClosestVertex = 0 , ClosestPoint = 1 , RayCasting } |
| Main projection mode. More... | |
| enum class | CastMode { ONE_WAY = 0 , BOTH_WAYS = 1 , OneWay = 0 , BothWays = 1 } |
| Ray-casting mode. More... | |
| enum class | FallbackMode { CONSTANT = 0 , CLOSEST_VERTEX = 1 , CLOSEST_POINT = 2 , Constant = 0 , ClosestVertex = 1 , ClosestPoint = 2 } |
| Fallback mode for vertices without a hit. More... | |
| enum class | SceneFlags { None = 0 , Dynamic = 1 << 0 , Compact = 1 << 1 , Robust = 1 << 2 , Filter = 1 << 3 } |
| Flags for configuring the ray caster and the underlying Embree scene. More... | |
| enum class | BuildQuality { Low = 0 , Medium = 1 , High = 2 } |
| Quality levels for BVH construction. More... | |
| enum class | FallbackMode |
| Fallback mode for vertices without a hit. | |
Functions | |
| template<typename Scalar, typename Index> | |
| LA_RAYCASTING_API AttributeId | compute_local_feature_size (SurfaceMesh< Scalar, Index > &mesh, const LocalFeatureSizeOptions &options={}, const RayCaster *ray_caster=nullptr) |
| Compute local feature size for each vertex of a mesh using medial axis approximation. | |
| const std::map< std::string, ProjectMode > & | project_modes () |
| < | |
| const std::map< std::string, CastMode > & | cast_modes () |
| const std::map< std::string, FallbackMode > & | fallback_modes () |
| const std::map< std::string, FallbackMode > & | wrap_modes () |
| template<typename Scalar, typename Index> | |
| LA_RAYCASTING_API void | project (const SurfaceMesh< Scalar, Index > &source, SurfaceMesh< Scalar, Index > &target, const ProjectOptions &options={}, const RayCaster *ray_caster=nullptr) |
| Project vertex attributes from one mesh to another. | |
| template<typename Scalar, typename Index> | |
| LA_RAYCASTING_API void | project_closest_point (const SurfaceMesh< Scalar, Index > &source, SurfaceMesh< Scalar, Index > &target, const ProjectCommonOptions &options={}, const RayCaster *ray_caster=nullptr) |
| Project vertex attributes from one mesh to another, by copying attributes from the closest point on the input mesh. | |
| template<typename Scalar, typename Index> | |
| LA_RAYCASTING_API void | project_closest_vertex (const SurfaceMesh< Scalar, Index > &source, SurfaceMesh< Scalar, Index > &target, const ProjectCommonOptions &options={}, const RayCaster *ray_caster=nullptr) |
| Project vertex attributes from one mesh to another, by copying attributes from the closest vertex on the source mesh surface. | |
| template<typename Scalar, typename Index> | |
| LA_RAYCASTING_API void | project_directional (const SurfaceMesh< Scalar, Index > &source, SurfaceMesh< Scalar, Index > &target, const ProjectDirectionalOptions &options={}, const RayCaster *ray_caster=nullptr) |
| Project vertex attributes from one mesh to another, by projecting target vertices along a prescribed direction, and interpolating surface values from facet corners of the source mesh. | |
| template<typename Scalar, typename Index> | |
| LA_RAYCASTING_API void | estimate_occluded_facets (OccludedFacetSampler< Scalar, Index > &sampler, const OccludedFacetEstimateOptions &options, ProgressCallback &progress, const std::atomic_bool *cancel=nullptr) |
| Drive an OccludedFacetSampler progressively until the budget is exhausted, the search converges, or cancellation is requested. | |
| template<typename Scalar, typename Index> | |
| LA_RAYCASTING_API scene::SimpleScene< Scalar, Index, 3 > | remove_occluded_facets (const scene::SimpleScene< Scalar, Index, 3 > &scene, const RemoveOccludedFacetsOptions &options, ProgressCallback &progress, function_ref< bool(Index mesh_index, Index instance_index)> is_occluder=[](Index, Index) { return true;}, const std::atomic_bool *cancel=nullptr) |
| Build a new scene with facets not visible from the outside removed. | |
| template<typename Scalar, typename Index> | |
| LA_RAYCASTING_API void | estimate_occluded_instances (OccludedInstanceSampler< Scalar, Index > &sampler, const OccludedInstanceEstimateOptions &options, ProgressCallback &progress, const std::atomic_bool *cancel=nullptr) |
| Drive an OccludedInstanceSampler progressively. | |
| template<typename Scalar, typename Index> | |
| LA_RAYCASTING_API void | estimate_occluded_instances (const scene::SimpleScene< Scalar, Index, 3 > &scene, function_ref< void(Index mesh_index, Index instance_index)> callback, const OccludedInstanceEstimateOptions &options, ProgressCallback &progress, function_ref< bool(Index mesh_index, Index instance_index)> is_occluder=[](Index, Index) { return true;}, const std::atomic_bool *cancel=nullptr) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Convenience wrapper that builds an OccludedInstanceSampler internally and reports each occluded instance via callback. | |
| template<typename Scalar, typename Index> | |
| LA_RAYCASTING_API scene::SimpleScene< Scalar, Index, 3 > | remove_occluded_instances (const scene::SimpleScene< Scalar, Index, 3 > &scene, const OccludedInstanceEstimateOptions &options, ProgressCallback &progress, function_ref< bool(Index mesh_index, Index instance_index)> is_occluder=[](Index, Index) { return true;}, const std::atomic_bool *cancel=nullptr) |
| Remove fully-occluded mesh instances. | |
| int | closest_vertex_from_barycentric (float u, float v) |
| Determine which vertex of a triangle the barycentric coordinates are closest to. | |
| template<typename Scalar, typename Index> | |
| AttributeId | compute_local_feature_size (SurfaceMesh< Scalar, Index > &mesh, const LocalFeatureSizeOptions &options, const RayCaster *ray_caster) |
| Compute local feature size for each vertex of a mesh using medial axis approximation. | |
| template<typename Scalar, typename Index> | |
| std::vector< AttributeId > | prepare_attribute_ids (const SurfaceMesh< Scalar, Index > &source, const ProjectCommonOptions &options) |
| template<typename Scalar, typename Index> | |
| std::unique_ptr< RayCaster > | prepare_ray_caster (const SurfaceMesh< Scalar, Index > &source, const RayCaster *ray_caster) |
| template<typename Scalar, typename Index> | |
| void | project (const SurfaceMesh< Scalar, Index > &source, SurfaceMesh< Scalar, Index > &target, const ProjectOptions &options, const RayCaster *ray_caster) |
| Project vertex attributes from one mesh to another. | |
| template<typename Scalar, typename Index> | |
| void | project_closest_point (const SurfaceMesh< Scalar, Index > &source, SurfaceMesh< Scalar, Index > &target, const ProjectCommonOptions &options, const RayCaster *ray_caster) |
| Project vertex attributes from one mesh to another, by copying attributes from the closest point on the input mesh. | |
| template<typename Scalar, typename Index> | |
| void | project_closest_vertex (const SurfaceMesh< Scalar, Index > &source, SurfaceMesh< Scalar, Index > &target, const ProjectCommonOptions &options, const RayCaster *ray_caster) |
| Project vertex attributes from one mesh to another, by copying attributes from the closest vertex on the source mesh surface. | |
| template<typename Scalar, typename Index> | |
| void | project_directional (const SurfaceMesh< Scalar, Index > &source, SurfaceMesh< Scalar, Index > &target, const ProjectDirectionalOptions &options, const RayCaster *ray_caster) |
| Project vertex attributes from one mesh to another, by projecting target vertices along a prescribed direction, and interpolating surface values from facet corners of the source mesh. | |
| template<typename Scalar, typename Index> | |
| void | estimate_occluded_facets (OccludedFacetSampler< Scalar, Index > &sampler, const OccludedFacetEstimateOptions &options, ProgressCallback &progress, const std::atomic_bool *cancel) |
| Drive an OccludedFacetSampler progressively until the budget is exhausted, the search converges, or cancellation is requested. | |
| template<typename Scalar, typename Index> | |
| scene::SimpleScene< Scalar, Index, 3 > | remove_occluded_facets (const scene::SimpleScene< Scalar, Index, 3 > &scene, const RemoveOccludedFacetsOptions &options, ProgressCallback &progress, function_ref< bool(Index, Index)> is_occluder, const std::atomic_bool *cancel) |
| template<typename Scalar, typename Index> | |
| void | estimate_occluded_instances (OccludedInstanceSampler< Scalar, Index > &sampler, const OccludedInstanceEstimateOptions &options, ProgressCallback &progress, const std::atomic_bool *cancel) |
| Drive an OccludedInstanceSampler progressively. | |
| template<typename Scalar, typename Index> | |
| void | estimate_occluded_instances (const scene::SimpleScene< Scalar, Index, 3 > &scene, function_ref< void(Index mesh_index, Index instance_index)> callback, const OccludedInstanceEstimateOptions &options, ProgressCallback &progress, function_ref< bool(Index mesh_index, Index instance_index)> is_occluder, const std::atomic_bool *cancel) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Convenience wrapper that builds an OccludedInstanceSampler internally and reports each occluded instance via callback. | |
| template<typename Scalar, typename Index> | |
| scene::SimpleScene< Scalar, Index, 3 > | remove_occluded_instances (const scene::SimpleScene< Scalar, Index, 3 > &scene, const OccludedInstanceEstimateOptions &options, ProgressCallback &progress, function_ref< bool(Index mesh_index, Index instance_index)> is_occluder, const std::atomic_bool *cancel) |
| Remove fully-occluded mesh instances. | |
Raycasting operations.
|
strong |
Main projection mode.
| Enumerator | |
|---|---|
| CLOSEST_VERTEX |
|
| CLOSEST_POINT |
|
| RAY_CASTING |
|
| ClosestVertex | Copy attribute from the closest vertex on the source mesh. |
| ClosestPoint | Interpolate attribute from the closest point on the source mesh. |
| RayCasting | Copy attribute by projecting along a prescribed direction on the source mesh. |
|
strong |
Ray-casting mode.
| Enumerator | |
|---|---|
| ONE_WAY |
|
| BOTH_WAYS |
|
| OneWay | Cast a ray forward in the prescribed direction. |
| BothWays | Cast a ray both forward and backward in the prescribed direction. |
|
strong |
Fallback mode for vertices without a hit.
| Enumerator | |
|---|---|
| CONSTANT |
|
| CLOSEST_VERTEX |
|
| CLOSEST_POINT |
|
| Constant | Fill with a constant value (defaults to 0). |
| ClosestVertex | Copy attribute from the closest vertex on the source mesh. |
| ClosestPoint | Interpolate attribute from the closest point on the source mesh. |
|
strong |
Flags for configuring the ray caster and the underlying Embree scene.
These flags are passed to the RayCaster constructor and control how the BVH is built and traversed.
|
strong |
|
inline |
<
|
inline |
Determine which vertex of a triangle the barycentric coordinates are closest to.
Barycentric coordinates (u, v) represent: p = (1-u-v)*v0 + u*v1 + v*v2. Returns 0, 1, or 2 for the three vertices of the triangle.