PointIndexHit< PointType > Class Template Reference

This class describes the interaction of (usually) a face and a point. It carries the info of a successful hit and (if successful), returns the interaction point. More...

Inheritance diagram for PointIndexHit< PointType >:
[legend]

Public Types

typedef PointType point_type
 The point type. More...
 

Public Member Functions

 PointIndexHit ()
 Default construct. A zero point, with no hit and index = -1. More...
 
 PointIndexHit (const point_type &p)
 Construct from a point, with no hit and index = -1. More...
 
 PointIndexHit (const bool success, const point_type &p, const label index)
 Construct from components. More...
 
 PointIndexHit (Istream &is)
 Construct from Istream. More...
 
bool hit () const noexcept
 Is there a hit? More...
 
label index () const noexcept
 Return the hit index. More...
 
const point_typepoint () const noexcept
 Return point, no checks. More...
 
point_typepoint () noexcept
 Access the point, no checks. More...
 
const point_typehitPoint () const
 Return hit point. Fatal if not hit. More...
 
const point_typemissPoint () const
 Return miss point. Fatal if hit. More...
 
const point_typerawPoint () const noexcept
 The point, no checks. Same as point() More...
 
point_typerawPoint () noexcept
 The point, no checks. Same as point() More...
 
void setHit () noexcept
 Set the hit status on. More...
 
void setMiss () noexcept
 Set the hit status off. More...
 
void setPoint (const point_type &p)
 Set the point. More...
 
void setIndex (const label index) noexcept
 Set the index. More...
 
void hitPoint (const point_type &p, const label index)
 Set the point as hit and the hit-index. More...
 
void write (Ostream &os)
 
bool operator== (const PointIndexHit &rhs) const
 Test for equality of all components. More...
 
bool operator!= (const PointIndexHit &rhs) const
 Test for inequality of components. More...
 

Friends

Ostreamoperator<< (Ostream &os, const PointIndexHit &pHit)
 
Istreamoperator>> (Istream &is, PointIndexHit &pHit)
 

Detailed Description

template<class PointType>
class Foam::PointIndexHit< PointType >

This class describes the interaction of (usually) a face and a point. It carries the info of a successful hit and (if successful), returns the interaction point.

like pointHit but carries face (or cell, edge etc.) index

Source files

Definition at line 52 of file PointIndexHit.H.

Member Typedef Documentation

◆ point_type

typedef PointType point_type

The point type.

Definition at line 84 of file PointIndexHit.H.

Constructor & Destructor Documentation

◆ PointIndexHit() [1/4]

PointIndexHit ( )
inline

Default construct. A zero point, with no hit and index = -1.

Definition at line 90 of file PointIndexHit.H.

◆ PointIndexHit() [2/4]

PointIndexHit ( const point_type p)
inlineexplicit

Construct from a point, with no hit and index = -1.

Definition at line 98 of file PointIndexHit.H.

◆ PointIndexHit() [3/4]

PointIndexHit ( const bool  success,
const point_type p,
const label  index 
)
inline

Construct from components.

Definition at line 107 of file PointIndexHit.H.

◆ PointIndexHit() [4/4]

PointIndexHit ( Istream is)
inlineexplicit

Construct from Istream.

Definition at line 119 of file PointIndexHit.H.

Member Function Documentation

◆ hit()

◆ index()

◆ point() [1/2]

const point_type& point ( ) const
inlinenoexcept

Return point, no checks.

Definition at line 142 of file PointIndexHit.H.

Referenced by Foam::normalDistance_nonzero(), Foam::normalDistance_zero(), and Foam::operator<<().

Here is the caller graph for this function:

◆ point() [2/2]

point_type& point ( )
inlinenoexcept

Access the point, no checks.

Definition at line 148 of file PointIndexHit.H.

◆ hitPoint() [1/2]

◆ missPoint()

const point_type& missPoint ( ) const
inline

Return miss point. Fatal if hit.

Definition at line 166 of file PointIndexHit.H.

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

Here is the call graph for this function:

◆ rawPoint() [1/2]

const point_type& rawPoint ( ) const
inlinenoexcept

The point, no checks. Same as point()

Definition at line 178 of file PointIndexHit.H.

Referenced by searchableRotatedBox::findLine(), searchableBox::findLine(), indexedOctree< Foam::treeDataPrimitivePatch< PatchType > >::findLine(), searchableRotatedBox::findNearest(), searchableBox::findNearestOnEdge(), edgeIntersections::merge(), surfaceFeatures::nearestSurfEdge(), and triSurfaceTools::trackToEdge().

Here is the caller graph for this function:

◆ rawPoint() [2/2]

point_type& rawPoint ( )
inlinenoexcept

The point, no checks. Same as point()

Definition at line 184 of file PointIndexHit.H.

◆ setHit()

void setHit ( )
inlinenoexcept

Set the hit status on.

Definition at line 193 of file PointIndexHit.H.

Referenced by triSurfaceTools::classify(), and searchableBox::findLine().

Here is the caller graph for this function:

◆ setMiss()

void setMiss ( )
inlinenoexcept

Set the hit status off.

Definition at line 199 of file PointIndexHit.H.

Referenced by triSurfaceTools::classify(), searchableBox::findNearestOnEdge(), and triSurfaceTools::trackToEdge().

Here is the caller graph for this function:

◆ setPoint()

void setPoint ( const point_type p)
inline

Set the point.

Definition at line 205 of file PointIndexHit.H.

References p.

Referenced by triSurfaceTools::classify().

Here is the caller graph for this function:

◆ setIndex()

void setIndex ( const label  index)
inlinenoexcept

Set the index.

Definition at line 211 of file PointIndexHit.H.

References PointIndexHit< PointType >::index().

Referenced by triSurfaceTools::classify(), searchableBox::findLine(), searchableBox::findNearestOnEdge(), meshSearch::intersection(), and meshSearch::intersections().

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

◆ hitPoint() [2/2]

void hitPoint ( const point_type p,
const label  index 
)
inline

Set the point as hit and the hit-index.

Definition at line 217 of file PointIndexHit.H.

References PointIndexHit< PointType >::index(), and p.

Here is the call graph for this function:

◆ write()

void write ( Ostream os)
inline

Definition at line 227 of file PointIndexHit.H.

References os().

Here is the call graph for this function:

◆ operator==()

bool operator== ( const PointIndexHit< PointType > &  rhs) const
inline

Test for equality of all components.

Definition at line 237 of file PointIndexHit.H.

◆ operator!=()

bool operator!= ( const PointIndexHit< PointType > &  rhs) const
inline

Test for inequality of components.

Definition at line 248 of file PointIndexHit.H.

Friends And Related Function Documentation

◆ operator<<

Ostream& operator<< ( Ostream os,
const PointIndexHit< PointType > &  pHit 
)
friend

Definition at line 256 of file PointIndexHit.H.

◆ operator>>

Istream& operator>> ( Istream is,
PointIndexHit< PointType > &  pHit 
)
friend

Definition at line 278 of file PointIndexHit.H.


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