Go to the documentation of this file.
41 #ifndef PointIndexHit_H
42 #define PointIndexHit_H
55 template<
class Po
intType>
58 template<
class Po
intType>
65 template<
class Po
intType>
131 bool hit() const noexcept
137 label
index() const noexcept
160 <<
"Requested a hit point, but it was not hit"
172 <<
"Requested a miss point, but it was hit"
230 os << (hit_ ?
"hit:" :
"miss:")
231 << point_ <<
" index:" << index_;
243 && index_ == rhs.index_
244 && point_ == rhs.point_
251 return !(*
this == rhs);
269 reinterpret_cast<const char*
>(&pHit),
283 is >> pHit.hit_ >> pHit.point_ >> pHit.index_;
293 reinterpret_cast<char*
>(&pHit),
void setIndex(const label index) noexcept
Set the index.
static constexpr const zero Zero
Global zero (0)
PointIndexHit(Istream &is)
Construct from Istream.
friend Istream & operator>>(Istream &is, PointIndexHit &pHit)
point_type & rawPoint() noexcept
The point, no checks. Same as point()
streamFormat format() const noexcept
Get the current stream format.
void setMiss() noexcept
Set the hit status off.
bool operator!=(const PointIndexHit &rhs) const
Test for inequality of components.
const point_type & missPoint() const
Return miss point. Fatal if hit.
Istream & operator>>(Istream &, directionInfo &)
const point_type & hitPoint() const
Return hit point. Fatal if not hit.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
friend Ostream & operator<<(Ostream &os, const PointIndexHit &pHit)
This class describes the interaction of (usually) a face and a point. It carries the info of a succes...
bool hit() const noexcept
Is there a hit?
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
PointType point_type
The point type.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
const point_type & rawPoint() const noexcept
The point, no checks. Same as point()
OBJstream os(runTime.globalPath()/outputName)
errorManip< error > abort(error &err)
void setPoint(const point_type &p)
Set the point.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
point_type & point() noexcept
Access the point, no checks.
label index() const noexcept
Return the hit index.
void setHit() noexcept
Set the hit status on.
const point_type & point() const noexcept
Return point, no checks.
void hitPoint(const point_type &p, const label index)
Set the point as hit and the hit-index.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
PointIndexHit(const point_type &p)
Construct from a point, with no hit and index = -1.
bool operator==(const PointIndexHit &rhs) const
Test for equality of all components.
PointIndexHit()
Default construct. A zero point, with no hit and index = -1.
virtual Istream & read(token &)=0
Return next token from stream.