40 #ifndef Foam_pointIndexHit_H 41 #define Foam_pointIndexHit_H 53 template<
class Po
intType>
56 template<
class Po
intType>
57 inline Ostream& operator<<(Ostream& os, const PointIndexHit<PointType>& pHit);
70 template<
class Po
intType>
176 <<
"Requested a hit point, but it was not hit" 188 <<
"Requested a miss point, but it was hit" 250 os << (hit_ ?
"hit:" :
"miss:")
251 << point_ <<
" index:" << index_;
263 && index_ ==
rhs.index_
264 && point_ ==
rhs.point_
271 return !(*
this ==
rhs);
283 reinterpret_cast<const char*>(&pHit),
309 reinterpret_cast<char*>(&pHit),
315 is >> pHit.hit_ >> pHit.point_ >> pHit.index_;
327 template<>
struct is_contiguous<
pointIndexHit> : is_contiguous<point> {};
void setMiss() noexcept
Set the hit status off.
PointIndexHit()
Default construct. A zero point, with no hit and index = -1.
void write(Ostream &os)
Report hit/miss status, point and index.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
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)...
const point_type & hitPoint() const
Return hit point. Fatal if not hit.
PointIndexHit< point > pointIndexHit
A PointIndexHit with a 3D point.
void setHit() noexcept
Set the hit status on.
const point_type & rawPoint() const noexcept
The point, no checks. Same as point()
PointType point_type
The point type.
This class describes the interaction of an object (often a face) and a point. It carries the info of ...
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
const point_type & point() const noexcept
Return point, no checks.
virtual Istream & read(token &)=0
Return next token from stream.
void setPoint(const point_type &p)
Set the point.
bool operator!=(const PointIndexHit &rhs) const
Test for inequality of components.
Istream & operator>>(Istream &, directionInfo &)
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
Describes the interaction of a object and a (templated) point. It carries the info of a successful hi...
label index() const noexcept
Return the hit index.
errorManip< error > abort(error &err)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
void setIndex(const label index) noexcept
Set the index.
decomposeUsingBbs false
Use bounding boxes (default) or unique decomposition of triangles (i.e. do not duplicate triangles) ...
bool hit() const noexcept
Is there a hit?
bool operator==(const PointIndexHit &rhs) const
Test for equality of all components.
const point_type & missPoint() const
Return miss point. Fatal if hit.
friend Ostream & operator<<(Ostream &os, const PointIndexHit &pHit)
streamFormat format() const noexcept
Get the current stream format.
friend Istream & operator>>(Istream &is, PointIndexHit &pHit)
static constexpr const zero Zero
Global zero (0)