surfaceLocation Class Reference

Contains information about location on a triSurface. More...

Inheritance diagram for surfaceLocation:
[legend]
Collaboration diagram for surfaceLocation:
[legend]

Public Member Functions

 surfaceLocation ()
 Default construct. More...
 
 surfaceLocation (const pointIndexHit &pHit, const triPointRef::proxType elementType, const label triangle)
 Construct from components. More...
 
 surfaceLocation (Istream &is)
 Construct from Istream. More...
 
triPointRef::proxTypeelementType () noexcept
 
triPointRef::proxType elementType () const noexcept
 
label & triangle () noexcept
 
label triangle () const noexcept
 
vector normal (const triSurface &s) const
 Normal. Approximate for points. More...
 
InfoProxy< surfaceLocationinfo () const
 Return info proxy, to print information to a stream. More...
 
void write (Ostream &os, const triSurface &s) const
 Write info about selected face index to a stream. More...
 
- Public Member Functions inherited from PointIndexHit< PointType >
 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

Istreamoperator>> (Istream &is, surfaceLocation &sl)
 
Ostreamoperator<< (Ostream &os, const surfaceLocation &sl)
 
Ostreamoperator<< (Ostream &os, const InfoProxy< surfaceLocation > &ip)
 

Additional Inherited Members

- Public Types inherited from PointIndexHit< PointType >
typedef PointType point_type
 The point type. More...
 

Detailed Description

Contains information about location on a triSurface.

Access to data:

Source files

Definition at line 71 of file surfaceLocation.H.

Constructor & Destructor Documentation

◆ surfaceLocation() [1/3]

surfaceLocation ( )
inline

Default construct.

Definition at line 87 of file surfaceLocation.H.

◆ surfaceLocation() [2/3]

surfaceLocation ( const pointIndexHit pHit,
const triPointRef::proxType  elementType,
const label  triangle 
)
inline

Construct from components.

Definition at line 95 of file surfaceLocation.H.

◆ surfaceLocation() [3/3]

surfaceLocation ( Istream is)
inlineexplicit

Construct from Istream.

Definition at line 108 of file surfaceLocation.H.

Member Function Documentation

◆ elementType() [1/2]

triPointRef::proxType & elementType ( )
inlinenoexcept

Definition at line 118 of file surfaceLocation.H.

Referenced by triSurfaceTools::classify(), Foam::operator<<(), and triSurfaceTools::trackToEdge().

Here is the caller graph for this function:

◆ elementType() [2/2]

triPointRef::proxType elementType ( ) const
inlinenoexcept

Definition at line 123 of file surfaceLocation.H.

◆ triangle() [1/2]

label & triangle ( )
inlinenoexcept

Definition at line 128 of file surfaceLocation.H.

Referenced by Foam::operator<<(), triSurfaceTools::track(), and triSurfaceTools::trackToEdge().

Here is the caller graph for this function:

◆ triangle() [2/2]

label triangle ( ) const
inlinenoexcept

Definition at line 133 of file surfaceLocation.H.

◆ normal()

Foam::vector normal ( const triSurface s) const

Normal. Approximate for points.

Definition at line 34 of file surfaceLocation.C.

References triangle< Point, PointRef >::EDGE, PointIndexHit< PointType >::index(), Foam::mag(), n, triangle< Point, PointRef >::NONE, s(), UList< T >::size(), and Foam::Zero.

Here is the call graph for this function:

◆ info()

InfoProxy< surfaceLocation > info ( ) const
inline

Return info proxy, to print information to a stream.

Definition at line 142 of file surfaceLocation.H.

◆ write()

void write ( Ostream os,
const triSurface s 
) const

Write info about selected face index to a stream.

Definition at line 72 of file surfaceLocation.C.

References e, triangle< Point, PointRef >::EDGE, triangle< Point, PointRef >::NONE, os(), and s().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator>>

Istream & operator>> ( Istream is,
surfaceLocation sl 
)
friend

◆ operator<< [1/2]

Ostream & operator<< ( Ostream os,
const surfaceLocation sl 
)
friend

◆ operator<< [2/2]

Ostream & operator<< ( Ostream os,
const InfoProxy< surfaceLocation > &  ip 
)
friend

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