71 #ifndef Foam_treeBoundBox_H 72 #define Foam_treeBoundBox_H 341 const scalar radiusSqr
357 const point& overallStart,
441 template<>
struct is_contiguous<treeBoundBox> : is_contiguous<boundBox> {};
444 template<>
struct is_contiguous_scalar<treeBoundBox>
446 is_contiguous_scalar<boundBox>
452 inline bool operator==(
const treeBoundBox& a,
const treeBoundBox&
b);
453 inline bool operator!=(
const treeBoundBox& a,
const treeBoundBox&
b);
direction faceBits(const point &pt) const
Code position of point on bounding box faces.
direction subOctant(const point &pt) const
Returns octant number given point and the calculated midpoint.
treeBoundBox subHalf(const direction whichFace) const
Sub-box half for given face.
static const treeBoundBox & null() noexcept
The null treeBoundBox is the same as an inverted box.
bool subOverlaps(const direction octant, const boundBox &bb) const
Does sub-octant overlap/touch boundingBox?
A 1D vector of objects of type <T> with a fixed length <N>.
bool contains(const point &pt) const
Contains point? (inside or on edge)
treeBoundBox & operator=(const treeBoundBox &)=default
Copy assignment.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
octantBit
Bits used for octant/point directional encoding.
A bounding box defined in terms of min/max extrema points.
void searchOrder(const point &pt, FixedList< direction, 8 > &octantOrder) const
Calculates optimal order to look for nearest to point.
List< treeBoundBox > treeBoundBoxList
A List of treeBoundBox.
label distanceCmp(const point &pt, const treeBoundBox &other) const
Compare distance to point with other bounding box.
const point & min() const noexcept
Minimum describing the bounding box.
bool intersects(const plane &pln) const
Does plane intersect this bounding box.
static const faceList faces
Face to point addressing, using octant corner points.
scalar avgDim() const
Average length/height/width dimension.
point corner(const direction octant) const
Corner point of given octant.
direction posBits(const point &pt) const
Position of point relative to bounding box.
const point & max() const noexcept
Maximum describing the bounding box.
friend Ostream & operator<<(Ostream &os, const treeBoundBox &bb)
bool intersects(const point &overallStart, const vector &overallVec, const point &start, const point &end, point &pt, direction &ptBits) const
Intersects segment; set point to intersection position and face,.
point nearest(const point &p) const
Return the nearest point on the boundBox to the supplied point.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Istream & operator>>(Istream &, directionInfo &)
static const edgeList edges
Edge to point addressing, using octant corner points.
treeBoundBox subBbox(const direction octant) const
Sub-box of given octant. Midpoint calculated.
treeBoundBox()=default
Default construct: an inverted bounding box.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
void calcExtremities(const point &pt, point &nearest, point &furthest) const
Calculate nearest and furthest (to point) vertex coords of.
bool contains(const vector &dir, const point &) const
Contains point (inside or on edge) and moving in direction.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
scalar maxDist(const point &pt) const
Returns distance point to furthest away corner.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
constexpr auto end(C &c) -> decltype(c.end())
Return iterator to the end of the container c.
OBJstream os(runTime.globalPath()/outputName)
faceBit
Bits used for face encoding.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
static const boundBox invertedBox
A large inverted boundBox: min/max == +/- ROOTVGREAT.
vector point
Point is a vector.
friend Istream & operator>>(Istream &is, treeBoundBox &bb)
tmp< pointField > points() const
Vertex coordinates. In octant coding.
Standard boundBox with extra functionality for use in octree.
bool operator!=(const eddy &a, const eddy &b)
faceId
Face codes. Identical order and meaning as per hex cellmodel and boundBox, but have a different point...
A class for managing temporary objects.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
point centre() const
The centre (midpoint) of the bounding box.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
treeBoundBox(const boundBox &bb)
Copy construct from a boundBox.
bool overlaps(const boundBox &bb) const
Overlaps/touches boundingBox?
scalar typDim() const
Typical dimension length,height,width. Identical to avgDim()
treeBoundBox extend(Random &rndGen, const scalar s) const
Return slightly wider bounding box.