Describes the interaction of a object and a (templated) 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 () | |
Default construct. A zero point with a large distance, no hit, no eligible misses. More... | |
PointHit (const point_type &p) | |
Construct from point with a large distance, no hit, no eligible misses. More... | |
PointHit (bool hit, const point_type &p, scalar dist, 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_type & | point () const noexcept |
Return the point, no checks. More... | |
scalar | distance () const noexcept |
Return distance to hit. More... | |
const point_type & | hitPoint () const |
Return the hit point. Fatal if not hit. More... | |
const point_type & | missPoint () const |
Return the miss point. Fatal if hit. More... | |
const point_type & | rawPoint () 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... | |
void | hitPoint (const point_type &p) |
Set the point as hit. More... | |
template<class AnyPointType > | |
bool | operator< (const PointHit< AnyPointType > &rhs) const noexcept |
Distance comparision operator, for sorting. More... | |
Describes the interaction of a object and a (templated) point. It carries the info of a successful hit and (if successful) the interaction point.
Definition at line 43 of file pointHit.H.
typedef PointType point_type |
The point type.
Definition at line 91 of file pointHit.H.
|
inline |
Default construct. A zero point with a large distance, no hit, no eligible misses.
Definition at line 100 of file pointHit.H.
|
inlineexplicit |
Construct from point with a large distance, no hit, no eligible misses.
Definition at line 112 of file pointHit.H.
|
inline |
Construct from components.
Definition at line 124 of file pointHit.H.
|
inlinenoexcept |
Is there a hit.
Definition at line 145 of file pointHit.H.
Referenced by triSurfaceTools::calcInterpolationWeights(), mappedPatchBase::facePoint(), treeDataPrimitivePatch< PatchType >::findIntersection(), treeDataPrimitivePatch< PatchType >::getVolumeType(), treeDataFace::getVolumeType(), triangleFuncs::intersectBb(), face::intersection(), slidingInterface::modifyMotionPoints(), triangle< Point, PointRef >::nearestPoint(), face::nearestPointClassify(), treeDataCell::findIntersectOp::operator()(), treeDataFace::findIntersectOp::operator()(), searchableRotatedBox::overlaps(), PrimitivePatch<::Foam::List< labelledTri >, pointField >::projectFaceCentres(), PrimitivePatch<::Foam::List< labelledTri >, pointField >::projectPoints(), face::ray(), triangle< Point, PointRef >::ray(), AMIInterpolation::srcPointFace(), and AMIInterpolation::tgtPointFace().
|
inlinenoexcept |
Is this an eligible miss.
Definition at line 153 of file pointHit.H.
Referenced by PrimitivePatch<::Foam::List< labelledTri >, pointField >::projectFaceCentres(), PrimitivePatch<::Foam::List< labelledTri >, pointField >::projectPoints(), face::ray(), AMIInterpolation::srcPointFace(), and AMIInterpolation::tgtPointFace().
|
inlinenoexcept |
Return the point, no checks.
Definition at line 161 of file pointHit.H.
Referenced by booleanSurface::booleanSurface(), triSurfaceTools::calcInterpolationWeights(), tetrahedron< Point, PointRef >::containmentSphere(), mappedPatchBase::facePoint(), treeDataPrimitivePatch< PatchType >::findIntersection(), dynamicTreeDataPoint::findNearest(), treeDataPrimitivePatch< PatchType >::findNearest(), treeDataFace::findNearest(), treeDataEdge::findNearest(), sampledSet::findNearFace(), treeDataPrimitivePatch< PatchType >::getVolumeType(), treeDataFace::getVolumeType(), face::intersection(), slidingInterface::modifyMotionPoints(), line< Point, PointRef >::nearestDist(), tetrahedron< Point, PointRef >::nearestPoint(), triangle< Point, PointRef >::nearestPoint(), face::nearestPointClassify(), findNearestMaskedOp< PatchType >::operator()(), treeDataPoint::findNearestOp::operator()(), treeDataCell::findIntersectOp::operator()(), treeDataFace::findIntersectOp::operator()(), orientedSurface::orient(), PrimitivePatch<::Foam::List< labelledTri >, pointField >::projectFaceCentres(), PrimitivePatch<::Foam::List< labelledTri >, pointField >::projectPoints(), face::ray(), triangle< Point, PointRef >::ray(), faceCollapser::setRefinement(), AMIInterpolation::srcPointFace(), triSurfaceTools::surfaceSide(), and AMIInterpolation::tgtPointFace().
|
inlinenoexcept |
Return distance to hit.
Definition at line 169 of file pointHit.H.
Referenced by booleanSurface::booleanSurface(), triSurfaceTools::calcInterpolationWeights(), mappedPatchBase::facePoint(), treeDataPrimitivePatch< PatchType >::findIntersection(), dynamicTreeDataPoint::findNearest(), treeDataPrimitivePatch< PatchType >::findNearest(), treeDataFace::findNearest(), treeDataEdge::findNearest(), meshSearch::findNearestBoundaryFace(), wallBoundedStreamLine::findNearestTet(), cellPointWeight::findTetrahedron(), cellPointWeight::findTriangle(), triangleFuncs::intersectBb(), face::intersection(), slidingInterface::modifyMotionPoints(), line< Point, PointRef >::nearestDist(), tetrahedron< Point, PointRef >::nearestPoint(), triangle< Point, PointRef >::nearestPoint(), face::nearestPointClassify(), findNearestMaskedOp< PatchType >::operator()(), treeDataPoint::findNearestOp::operator()(), treeDataCell::findIntersectOp::operator()(), treeDataFace::findIntersectOp::operator()(), orientedSurface::orient(), searchableRotatedBox::overlaps(), treeDataPrimitivePatch< PatchType >::overlaps(), treeDataFace::overlaps(), treeDataEdge::overlaps(), PrimitivePatch<::Foam::List< labelledTri >, pointField >::projectFaceCentres(), PrimitivePatch<::Foam::List< labelledTri >, pointField >::projectPoints(), face::ray(), cellDistFuncs::smallestDist(), AMIInterpolation::srcPointFace(), and AMIInterpolation::tgtPointFace().
|
inline |
Return the hit point. Fatal if not hit.
Definition at line 177 of file pointHit.H.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
Referenced by face::intersection(), triangle< Point, PointRef >::nearestPoint(), face::nearestPointClassify(), face::ray(), and triangle< Point, PointRef >::ray().
|
inline |
Return the miss point. Fatal if hit.
Definition at line 192 of file pointHit.H.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
|
inlinenoexcept |
|
inlinenoexcept |
Set the hit status on.
Definition at line 217 of file pointHit.H.
Referenced by tetrahedron< Point, PointRef >::containmentSphere().
|
inlinenoexcept |
Set the hit status off and set the eligible miss status.
Definition at line 226 of file pointHit.H.
Referenced by tetrahedron< Point, PointRef >::containmentSphere(), triangle< Point, PointRef >::nearestPoint(), face::nearestPointClassify(), face::ray(), and triangle< Point, PointRef >::ray().
|
inline |
Set the point.
Definition at line 235 of file pointHit.H.
References p.
Referenced by tetrahedron< Point, PointRef >::containmentSphere(), triangle< Point, PointRef >::nearestPoint(), face::nearestPointClassify(), face::ray(), triangle< Point, PointRef >::ray(), and faceCollapser::setRefinement().
|
inlinenoexcept |
Set the distance.
Definition at line 243 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().
|
inline |
|
inlinenoexcept |
Distance comparision operator, for sorting.
Definition at line 265 of file pointHit.H.