12 #ifndef CD_SignedDistanceBVH_H
13 #define CD_SignedDistanceBVH_H
20 #include <EBGeometry.hpp>
26 #include <CD_NamespaceHeader.H>
33 template <
class T,
class BV,
int K>
40 using Vec3 = EBGeometry::Vec3T<T>;
45 using Face = EBGeometry::DCEL::FaceT<T>;
50 using Node = EBGeometry::BVH::LinearBVH<T, Face, BV, K>;
63 SignedDistanceBVH(
const std::shared_ptr<Node>& a_root,
const bool a_flipInside,
const Real a_zCoord = 0.0);
80 value(
const RealVect& a_point)
const override;
115 #include <CD_NamespaceFooter.H>
Implementation of CD_SignedDistanceBVH.H.
Signed distance function for a DCEL mesh.
Definition: CD_SignedDistanceBVH.H:35
bool m_flipInside
Hook for turning inside to outside.
Definition: CD_SignedDistanceBVH.H:102
Real m_zCoord
For 2D only. This is the z-coordinate through which we slice the object.
Definition: CD_SignedDistanceBVH.H:92
BaseIF * newImplicitFunction() const override
Factory method. Sends pointers around.
Definition: CD_SignedDistanceBVHImplem.H:87
SignedDistanceBVH()=delete
Disallowed weak construction.
std::shared_ptr< Node > m_root
Pointer to root node in bounding volume hierarchy.
Definition: CD_SignedDistanceBVH.H:97
EBGeometry::BVH::LinearBVH< T, Face, BV, K > Node
Alias for BVH node with precision T, enclosing DCEL face with a bounding volume type V.
Definition: CD_SignedDistanceBVH.H:50
std::chrono::duration< double > m_timespan
Total time spent computing the signed distance. Use for performance tracking.
Definition: CD_SignedDistanceBVH.H:112
EBGeometry::Vec3T< T > Vec3
Alias for always-3D vector with template.
Definition: CD_SignedDistanceBVH.H:40
EBGeometry::DCEL::FaceT< T > Face
DCEL polygon face, which is the primitive type enclosed in the bounding volume hierarchy.
Definition: CD_SignedDistanceBVH.H:45
virtual ~SignedDistanceBVH()
Destructor (does nothing)
Definition: CD_SignedDistanceBVHImplem.H:49
long m_numCalled
Number of times the implicit function was called. Use for performance tracking.
Definition: CD_SignedDistanceBVH.H:107
Real value(const RealVect &a_point) const override
Value function.
Definition: CD_SignedDistanceBVHImplem.H:60