Unified wrapper (facade) over the point-containment backends. More...
#include <PointContainmentClassifier.h>
Classes | |
| struct | RayOptions |
| Ray-backend tuning + debug output; ignored by FIXED_X_RAY (TriangleManifold). More... | |
Public Types | |
| enum class | Method { PCA_RAY , USER_SELECTED_RAY , FIXED_X_RAY } |
| Backend algorithm used for point-containment queries. More... | |
Public Member Functions | |
| PointContainmentClassifier (libMesh::MeshBase &mesh, const SurfaceElementSet *set, Method method, Real tolerance) | |
| Builds PCA_RAY with default ray options or FIXED_X_RAY without unused options. | |
| PointContainmentClassifier (libMesh::MeshBase &mesh, const SurfaceElementSet *set, Method method, Real tolerance, const RayOptions &options) | |
| Builds the selected backend with explicit ray options. | |
| ~PointContainmentClassifier () | |
| SurfaceGeometry::SurfaceSide | sideness (const Point &point) const |
| Classify a query point relative to the closed surface. | |
| bool | contains (const Point &point) const |
| Convenience API aligned with TriangleManifold: INSIDE and ON both map to true. | |
| const libMesh::BoundingBox & | boundingBox () const |
| Method-independent global axis-aligned bounding box of the surface. | |
| std::size_t | numElements () const |
| Number of surface elements (triangles) backing the classifier. | |
| Point | rayDirection () const |
| The resolved ray direction of the ray-casting backend (user-selected direction for USER_SELECTED_RAY, PCA-selected direction for PCA_RAY). | |
Private Attributes | |
| const Method | _method |
| std::unique_ptr< AdaptiveRayContainmentCheck > | _pca |
| One of the two backends is constructed; the other stays null. | |
| std::unique_ptr< TriangleManifold > | _tri |
| FIXED_X_RAY. | |
| libMesh::BoundingBox | _bounding_box |
| Cached method-independent AABB and element count for the accessors. | |
| std::size_t | _num_elements = 0 |
Unified wrapper (facade) over the point-containment backends.
Selects and constructs exactly one backend and exposes a single result type (SurfaceSide). It adds no geometry logic of its own beyond backend selection and the uniform contains() mapping; the ray/solid-angle math lives entirely in the backends (AdaptiveRayContainmentCheck and TriangleManifold).
Definition at line 36 of file PointContainmentClassifier.h.
|
strong |
Backend algorithm used for point-containment queries.
| Enumerator | |
|---|---|
| PCA_RAY | AdaptiveRayContainmentCheck with a PCA-selected ray (default SBM behavior). |
| USER_SELECTED_RAY | AdaptiveRayContainmentCheck with a user-supplied ray_direction, used exactly as given (no PCA, no auto-selection). Any finite non-zero direction is accepted, including oblique; for a 2D surface it must lie in the mesh plane. |
| FIXED_X_RAY | TriangleManifold engine (fixed +x ray parity + solid-angle fallback). TRI3 surfaces only. |
Definition at line 40 of file PointContainmentClassifier.h.
| PointContainmentClassifier::PointContainmentClassifier | ( | libMesh::MeshBase & | mesh, |
| const SurfaceElementSet * | set, | ||
| Method | method, | ||
| Real | tolerance | ||
| ) |
Builds PCA_RAY with default ray options or FIXED_X_RAY without unused options.
USER_SELECTED_RAY requires the overload accepting explicit RayOptions.
| PointContainmentClassifier::PointContainmentClassifier | ( | libMesh::MeshBase & | mesh, |
| const SurfaceElementSet * | set, | ||
| Method | method, | ||
| Real | tolerance, | ||
| const RayOptions & | options | ||
| ) |
Builds the selected backend with explicit ray options.
mesh is builder-owned and must outlive this object (serialized for FIXED_X_RAY / TriangleManifold). set is required for PCA_RAY/USER_SELECTED_RAY (its elements/centroids are referenced by the backend and must also outlive this object) and ignored (may be null) for FIXED_X_RAY.
|
default |
|
inline |
Method-independent global axis-aligned bounding box of the surface.
Definition at line 98 of file PointContainmentClassifier.h.
|
inline |
Convenience API aligned with TriangleManifold: INSIDE and ON both map to true.
Definition at line 92 of file PointContainmentClassifier.h.
|
inline |
Number of surface elements (triangles) backing the classifier.
Definition at line 101 of file PointContainmentClassifier.h.
| Point PointContainmentClassifier::rayDirection | ( | ) | const |
The resolved ray direction of the ray-casting backend (user-selected direction for USER_SELECTED_RAY, PCA-selected direction for PCA_RAY).
Errors for FIXED_X_RAY, which has no such backend.
Definition at line 96 of file PointContainmentClassifier.C.
| SurfaceGeometry::SurfaceSide PointContainmentClassifier::sideness | ( | const Point & | point | ) | const |
Classify a query point relative to the closed surface.
Definition at line 86 of file PointContainmentClassifier.C.
Referenced by contains().
|
private |
Cached method-independent AABB and element count for the accessors.
Definition at line 116 of file PointContainmentClassifier.h.
Referenced by boundingBox().
|
private |
Definition at line 109 of file PointContainmentClassifier.h.
|
private |
Definition at line 117 of file PointContainmentClassifier.h.
Referenced by numElements().
|
private |
One of the two backends is constructed; the other stays null.
PCA_RAY or USER_SELECTED_RAY
Definition at line 112 of file PointContainmentClassifier.h.
Referenced by rayDirection(), and sideness().
|
private |