Loading...
Searching...
No Matches
PointIndexHit< PointType > Class Template Reference

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

#include <pointIndexHit.H>

Inheritance diagram for PointIndexHit< PointType >:

Public Types

typedef PointType point_type
 The point type.

Public Member Functions

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

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 an object (often a face) and a point. It carries the info of a successful hit and (if successful), returns the interaction point.

Like pointHit but carries object (eg, face, cell, edge etc.) index

Definition at line 66 of file pointIndexHit.H.

Member Typedef Documentation

◆ point_type

template<class PointType>
typedef PointType point_type

The point type.

Definition at line 93 of file pointIndexHit.H.

Constructor & Destructor Documentation

◆ PointIndexHit() [1/6]

template<class PointType>
PointIndexHit ( )
inline

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

Definition at line 101 of file pointIndexHit.H.

◆ PointIndexHit() [2/6]

template<class PointType>
PointIndexHit ( const point_type & p)
inlineexplicit

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

Definition at line 111 of file pointIndexHit.H.

◆ PointIndexHit() [3/6]

template<class PointType>
PointIndexHit ( const PointHit< point_type > & p,
label index = -1 )
inlineexplicit

Construct from hitPoint with index = -1 or specified.

Definition at line 121 of file pointIndexHit.H.

◆ PointIndexHit() [4/6]

template<class PointType>
PointIndexHit ( const PointIndexHit< point_type > & p,
label index )
inline

Copy construct with different index.

Definition at line 131 of file pointIndexHit.H.

◆ PointIndexHit() [5/6]

template<class PointType>
PointIndexHit ( bool success,
const point_type & p,
label index )
inline

Construct from components.

Definition at line 141 of file pointIndexHit.H.

◆ PointIndexHit() [6/6]

template<class PointType>
PointIndexHit ( Istream & is)
inlineexplicit

Construct from Istream.

Definition at line 151 of file pointIndexHit.H.

Member Function Documentation

◆ hit()

◆ index()

◆ point() [1/2]

◆ point() [2/2]

template<class PointType>
point_type & point ( )
inlinenoexcept

Access the point, no checks.

Definition at line 188 of file pointIndexHit.H.

◆ hitPoint() [1/3]

template<class PointType>
const point_type & hitPoint ( ) const
inline

Return hit point. Fatal if not hit.

Definition at line 196 of file pointIndexHit.H.

Referenced by searchableBox::findLineAll(), searchableExtrudedCircle::findParametricNearest(), searchableExtrudedCircle::getNormal(), and surfaceIntersection::surfaceIntersection().

Here is the caller graph for this function:

◆ missPoint()

template<class PointType>
const point_type & missPoint ( ) const
inline

Return miss point. Fatal if hit.

Definition at line 210 of file pointIndexHit.H.

◆ rawPoint() [1/2]

template<class PointType>
const point_type & rawPoint ( ) const
inlinenoexcept

The point, no checks. Same as point().

Deprecated
(2020-10) use point()

Definition at line 226 of file pointIndexHit.H.

◆ rawPoint() [2/2]

template<class PointType>
point_type & rawPoint ( )
inlinenoexcept

The point, no checks. Same as point().

Deprecated
(2020-10) use point()

Definition at line 233 of file pointIndexHit.H.

◆ setHit()

template<class PointType>
void setHit ( )
inlinenoexcept

Set the hit status on.

Definition at line 241 of file pointIndexHit.H.

Referenced by triSurfaceTools::classify().

Here is the caller graph for this function:

◆ setMiss()

template<class PointType>
void setMiss ( )
inlinenoexcept

Set the hit status off.

Definition at line 249 of file pointIndexHit.H.

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

Here is the caller graph for this function:

◆ setPoint()

template<class PointType>
void setPoint ( const point_type & p)
inline

Set the point.

Definition at line 257 of file pointIndexHit.H.

Referenced by triSurfaceTools::classify().

Here is the caller graph for this function:

◆ setIndex()

template<class PointType>
void setIndex ( const label index)
inlinenoexcept

Set the index.

Definition at line 265 of file pointIndexHit.H.

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

Here is the caller graph for this function:

◆ hitPoint() [2/3]

template<class PointType>
void hitPoint ( const point_type & p)
inline

Set the point as hit without changing the hit-index.

Definition at line 273 of file pointIndexHit.H.

◆ hitPoint() [3/3]

template<class PointType>
void hitPoint ( const point_type & p,
const label index )
inline

Set the point as hit and set the hit-index.

Definition at line 282 of file pointIndexHit.H.

◆ write()

template<class PointType>
void write ( Ostream & os)
inline

Report hit/miss status, point and index.

Definition at line 295 of file pointIndexHit.H.

◆ operator==()

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

Test for equality of all components.

Definition at line 307 of file pointIndexHit.H.

◆ operator!=()

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

Test for inequality of components.

Definition at line 320 of file pointIndexHit.H.

◆ operator<<

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

Definition at line 328 of file pointIndexHit.H.

◆ operator>>

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

Definition at line 350 of file pointIndexHit.H.


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