70 (octant & RIGHTHALF) ?
max().
x() :
min().
x(),
72 (octant & FRONTHALF) ?
max().z() :
min().z()
80 return subOctant(centre(), pt);
104 if (pt.z() > mid.z())
121 return subOctant(centre(), pt, onEdge);
137 if (pt.x() > mid.x())
141 else if (pt.x() == mid.x())
146 if (pt.y() > mid.y())
150 else if (pt.y() == mid.y())
155 if (pt.z() > mid.z())
159 else if (pt.z() == mid.z())
183 if (pt.x() > mid.x())
187 else if (pt.x() == mid.x())
196 if (pt.y() > mid.y())
200 else if (pt.y() == mid.y())
209 if (pt.z() > mid.z())
213 else if (pt.z() == mid.z())
229 FixedList<direction, 8>& octantOrder
232 vector dist = centre() - pt;
258 if (dist.x() < dist.y())
260 if (dist.y() < dist.z())
266 else if (dist.z() < dist.x())
281 if (dist.z() < dist.y())
287 else if (dist.x() < dist.z())
302 octantOrder[0] = octant;
304 octantOrder[1] = octant ^
min;
305 octantOrder[2] = octant ^ mid;
306 octantOrder[3] = octant ^
max;
308 octantOrder[4] = octantOrder[1] ^ mid;
309 octantOrder[5] = octantOrder[1] ^
max;
310 octantOrder[6] = octantOrder[2] ^
max;
312 octantOrder[7] = octantOrder[4] ^
max;
320 searchOrder(pt, octantOrder);
329 const scalar radiusSqr
336 return box_sphere_overlaps
352 return intersects(
ln.start(),
ln.end(), pt);
389 return static_cast<const boundBox&
>(a) == static_cast<const boundBox&>(
b);
direction subOctant(const point &pt) const
Returns octant number given point and the calculated midpoint.
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>.
void inflate(const scalar factor)
Expand box by factor*mag(span) in all dimensions.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
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.
point corner(const direction octant) const
Corner point of given octant.
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,.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
treeBoundBox()=default
Default construct: an inverted bounding box.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
Represents 0/1 range or concept. Used for tagged dispatch or clamping.
vector point
Point is a vector.
Standard boundBox with extra functionality for use in octree.
bool operator!=(const eddy &a, const eddy &b)
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
treeBoundBox extend(Random &rndGen, const scalar s) const
Return slightly wider bounding box.