14#include "libmesh/bounding_box.h"
15#include "libmesh/face_tri3.h"
16#include "libmesh/mesh_tet_interface.h"
22#include <unordered_map>
61 bool contains(
const Point & point)
const;
107 std::vector<dof_id_type>
rayCandidates(
const Point & point)
const;
128 std::unordered_map<dof_id_type, 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.
std::unordered_map< dof_id_type, 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_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.
Real _y_min
Minimum global y coordinate used to map query points into yz-grid bins.
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.