15#include "libmesh/bounding_box.h"
16#include "libmesh/mesh_base.h"
17#include "libmesh/point_locator_base.h"
23#include <unordered_map>
62 bool contains(
const Point & point)
const;
124 std::vector<dof_id_type>
rayCandidates(
const Point & point)
const;
145 std::unordered_map<std::uint64_t, std::vector<dof_id_type>>
_ray_grid;
Utility for querying point containment against a closed triangulated surface mesh.
std::size_t _num_y_cells
Number of yz-grid bins in the y direction.
bool contains(const Point &point) const
const Real _surface_tolerance
Absolute tolerance used throughout validation and geometric classification.
std::size_t _num_z_cells
Number of yz-grid bins in the z direction.
const libMesh::BoundingBox _bounding_box
Global bounding box of the transformed manifold.
std::size_t numTriangles() const
bool pointInsideBoundingBox(const Point &point) const
Cheap global bounding-box rejection for containment queries.
SurfaceGeometry::SurfaceSide sideness(const Point &point) const
Classify a query point relative to the manifold surface.
Real _y_cell_size
Width of one yz-grid cell in the y direction.
Real _z_min
Minimum global z coordinate used to map query points into yz-grid bins.
RayIntersection rayIntersectsTriangle(const Point &point, const libMesh::Elem &tri) const
Intersect a positive x-direction ray with a single triangle.
void buildCandidateGrid()
Build the yz-plane lookup grid used to accelerate +x ray queries.
Real _z_cell_size
Width of one yz-grid cell in the z direction.
bool containsBySolidAngle(const Point &point) const
Robust fallback containment query based on accumulated solid angle.
std::unordered_map< std::uint64_t, std::vector< dof_id_type > > _ray_grid
Lookup from packed yz-grid cell index to triangles that could intersect the +x query ray.
Real _y_min
Minimum global y coordinate used to map query points into yz-grid bins.
SurfaceGeometry::SurfaceSide classifyByParity(const Point &point) const
Resolve INSIDE vs OUTSIDE via the fixed +x ray parity test (with solid-angle fallback for ambiguous g...
bool pointOnSurface(const Point &point) const
Detect whether a query point lies on or extremely near the manifold surface.
std::vector< dof_id_type > rayCandidates(const Point &point) const
Get the subset of triangles whose yz extents may intersect the query ray.
const libMesh::BoundingBox & boundingBox() const
void finalize()
Complete post-parse validation and acceleration-structure setup.
const std::unique_ptr< libMesh::PointLocatorBase > _point_locator
Pre-built point locator for fast proximity-to-surface detection.
RayIntersection
Result of intersecting the positive x-direction ray with a triangle.
SurfaceSide
The side of a closed surface where a query point is located.