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