PointHit< PointType > Class Template Reference

Describes the interaction of a face and a point. It carries the info of a successful hit and (if successful) the interaction point. More...

Public Types

typedef PointType point_type
 The point type. More...
 

Public Member Functions

 PointHit ()
 
 PointHit (const point_type &p)
 
 PointHit (const bool hit, const point_type &p, const scalar dist, const bool eligibleMiss=false)
 Construct from components. More...
 
bool hit () const noexcept
 Is there a hit. More...
 
bool eligibleMiss () const noexcept
 Is this an eligible miss. More...
 
const point_typepoint () const noexcept
 Return the point, no checks. More...
 
scalar distance () const noexcept
 Return distance to hit. More...
 
const point_typehitPoint () const
 Return the hit point. Fatal if not hit. More...
 
const point_typemissPoint () const
 Return the miss point. Fatal if hit. More...
 
const point_typerawPoint () const noexcept
 The point, no checks. More...
 
void setHit () noexcept
 Set the hit status on. More...
 
void setMiss (const bool eligible) noexcept
 Set the hit status off and set the eligible miss status. More...
 
void setPoint (const point_type &p)
 Set the point. More...
 
void setDistance (const scalar d) noexcept
 Set the distance. More...
 
template<class AnyPointType >
bool operator< (const PointHit< AnyPointType > &rhs) const noexcept
 Distance comparision operator, for sorting. More...
 

Detailed Description

template<class PointType>
class Foam::PointHit< PointType >

Describes the interaction of a face and a point. It carries the info of a successful hit and (if successful) the interaction point.

Definition at line 53 of file PointHit.H.

Member Typedef Documentation

◆ point_type

typedef PointType point_type

The point type.

Definition at line 75 of file PointHit.H.

Constructor & Destructor Documentation

◆ PointHit() [1/3]

PointHit ( )
inline

Default construct. A zero point with a large distance, no hit, no eligible misses

Definition at line 82 of file PointHit.H.

◆ PointHit() [2/3]

PointHit ( const point_type p)
inlineexplicit

Construct from point with a large distance, no hit, no eligible misses

Definition at line 92 of file PointHit.H.

◆ PointHit() [3/3]

PointHit ( const bool  hit,
const point_type p,
const scalar  dist,
const bool  eligibleMiss = false 
)
inline

Construct from components.

Definition at line 101 of file PointHit.H.

Member Function Documentation

◆ hit()

◆ eligibleMiss()

bool eligibleMiss ( ) const
inlinenoexcept

Is this an eligible miss.

Definition at line 127 of file PointHit.H.

Referenced by Foam::operator<<(), PrimitivePatch< FaceList, PointField >::projectFaceCentres(), PrimitivePatch< FaceList, PointField >::projectPoints(), face::ray(), AMIInterpolation::srcPointFace(), and AMIInterpolation::tgtPointFace().

Here is the caller graph for this function:

◆ point()

const point_type & point ( ) const
inlinenoexcept

Return the point, no checks.

Definition at line 133 of file PointHit.H.

Referenced by Foam::operator<<().

Here is the caller graph for this function:

◆ distance()

scalar distance ( ) const
inlinenoexcept

Return distance to hit.

Definition at line 139 of file PointHit.H.

Referenced by booleanSurface::booleanSurface(), triSurfaceTools::calcInterpolationWeights(), mappedPatchBase::facePoint(), treeDataPrimitivePatch< PatchType >::findIntersection(), dynamicTreeDataPoint::findNearest(), meshSearch::findNearestBoundaryFace(), wallBoundedStreamLine::findNearestTet(), cellPointWeight::findTetrahedron(), cellPointWeight::findTriangle(), triangleFuncs::intersectBb(), face::intersection(), slidingInterface::modifyMotionPoints(), line< Point, PointRef >::nearestDist(), triangle< Point, PointRef >::nearestPoint(), tetrahedron< Point, PointRef >::nearestPoint(), face::nearestPointClassify(), treeDataFace::findIntersectOp::operator()(), treeDataCell::findIntersectOp::operator()(), treeDataPoint::findNearestOp::operator()(), findNearestMaskedOp< PatchType >::operator()(), treeDataEdge::findNearestOp::operator()(), treeDataFace::findNearestOp::operator()(), treeDataPrimitivePatch< PatchType >::findNearestOp::operator()(), Foam::operator<<(), orientedSurface::orient(), searchableRotatedBox::overlaps(), treeDataEdge::overlaps(), treeDataPrimitivePatch< PatchType >::overlaps(), PrimitivePatch< FaceList, PointField >::projectFaceCentres(), PrimitivePatch< FaceList, PointField >::projectPoints(), face::ray(), cellDistFuncs::smallestDist(), AMIInterpolation::srcPointFace(), and AMIInterpolation::tgtPointFace().

Here is the caller graph for this function:

◆ hitPoint()

const point_type & hitPoint ( ) const
inline

Return the hit point. Fatal if not hit.

Definition at line 145 of file PointHit.H.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Referenced by mappedPatchBase::facePoint(), treeDataPrimitivePatch< PatchType >::findIntersection(), sampledSet::findNearFace(), face::intersection(), slidingInterface::modifyMotionPoints(), triangle< Point, PointRef >::nearestPoint(), face::nearestPointClassify(), treeDataFace::findIntersectOp::operator()(), treeDataCell::findIntersectOp::operator()(), and face::ray().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ missPoint()

const point_type & missPoint ( ) const
inline

Return the miss point. Fatal if hit.

Definition at line 158 of file PointHit.H.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Referenced by sampledSet::findNearFace(), slidingInterface::modifyMotionPoints(), triangle< Point, PointRef >::nearestPoint(), face::nearestPointClassify(), PrimitivePatch< FaceList, PointField >::projectFaceCentres(), PrimitivePatch< FaceList, PointField >::projectPoints(), and face::ray().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rawPoint()

◆ setHit()

void setHit ( )
inlinenoexcept

Set the hit status on.

Definition at line 181 of file PointHit.H.

Referenced by tetrahedron< Point, PointRef >::containmentSphere(), face::intersection(), triangle< Point, PointRef >::nearestPoint(), face::nearestPointClassify(), face::ray(), and triangle< Point, PointRef >::ray().

Here is the caller graph for this function:

◆ setMiss()

void setMiss ( const bool  eligible)
inlinenoexcept

Set the hit status off and set the eligible miss status.

Definition at line 188 of file PointHit.H.

Referenced by tetrahedron< Point, PointRef >::containmentSphere(), triangle< Point, PointRef >::nearestPoint(), face::nearestPointClassify(), face::ray(), and triangle< Point, PointRef >::ray().

Here is the caller graph for this function:

◆ setPoint()

void setPoint ( const point_type p)
inline

Set the point.

Definition at line 195 of file PointHit.H.

References p.

Referenced by tetrahedron< Point, PointRef >::containmentSphere(), face::intersection(), triangle< Point, PointRef >::nearestPoint(), face::nearestPointClassify(), face::ray(), triangle< Point, PointRef >::ray(), and faceCollapser::setRefinement().

Here is the caller graph for this function:

◆ setDistance()

void setDistance ( const scalar  d)
inlinenoexcept

Set the distance.

Definition at line 201 of file PointHit.H.

Referenced by tetrahedron< Point, PointRef >::containmentSphere(), face::intersection(), triangle< Point, PointRef >::nearestPoint(), face::nearestPointClassify(), face::ray(), triangle< Point, PointRef >::ray(), AMIInterpolation::srcPointFace(), and AMIInterpolation::tgtPointFace().

Here is the caller graph for this function:

◆ operator<()

bool operator< ( const PointHit< AnyPointType > &  rhs) const
inlinenoexcept

Distance comparision operator, for sorting.

Definition at line 211 of file PointHit.H.


The documentation for this class was generated from the following file: