Go to the documentation of this file.
35 min_(invertedBox.
min()),
36 max_(invertedBox.
max())
67 if (max_[dir] < min_[dir])
81 if (max_[dir] < min_[dir])
117 return 0.5 * (min_ + max_);
123 return this->centre();
129 return (max_ - min_);
169 const scalar
diff = (max_[dir] - min_[dir]);
186 min_ = invertedBox.min();
187 max_ = invertedBox.max();
225 bb.max_.
x() >= min_.x() && bb.min_.
x() <= max_.x()
226 && bb.max_.
y() >= min_.y() && bb.min_.
y() <= max_.y()
227 && bb.max_.
z() >= min_.z() && bb.min_.
z() <= max_.z()
235 const scalar radiusSqr
244 const scalar d0 = min_[dir] - centre[dir];
245 const scalar d1 = max_[dir] - centre[dir];
247 if ((d0 > 0) != (d1 > 0))
261 if (distSqr > radiusSqr)
275 min_.x() <= pt.
x() && pt.
x() <= max_.x()
276 && min_.y() <= pt.
y() && pt.
y() <= max_.y()
277 && min_.z() <= pt.
z() && pt.
z() <= max_.z()
284 return contains(bb.
min()) && contains(bb.
max());
292 min_.x() < pt.
x() && pt.
x() < max_.x()
293 && min_.y() < pt.
y() && pt.
y() < max_.y()
294 && min_.z() < pt.
z() && pt.
z() < max_.z()
311 return (a.
min() ==
b.min()) && (a.
max() ==
b.max());
const Cmpt & x() const
Access to the vector x component.
point midpoint() const
The midpoint (centre) of the bounding box. Identical to centre()
scalar mag() const
The magnitude of the bounding box span.
void clear() const noexcept
A class for managing temporary objects.
Cmpt cmptProduct(const VectorSpace< Form, Cmpt, Ncmpts > &vs)
Istream & operator>>(Istream &, directionInfo &)
const point & max() const
Maximum describing the bounding box.
scalar volume() const
The volume of the bound box.
const Cmpt & z() const
Access to the vector z component.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
const point & min() const
Minimum describing the bounding box.
void cmptMin(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
bool overlaps(const boundBox &bb) const
Overlaps/touches boundingBox?
vector span() const
The bounding box span (from minimum to maximum)
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.
bool operator!=(const eddy &a, const eddy &b)
void cmptMax(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
label nDim() const
Count the number of positive, non-zero dimensions.
scalar maxDim() const
Largest length/height/width dimension.
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
point centre() const
The centre (midpoint) of the bounding box.
bool containsInside(const point &pt) const
Contains point? (inside only)
tmp< DimensionedField< typename DimensionedField< Type, GeoMesh >::cmptType, GeoMesh >> cmptAv(const DimensionedField< Type, GeoMesh > &df)
scalar minDim() const
Smallest length/height/width dimension.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
boundBox()
Construct without any points - an inverted bounding box.
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
bool empty() const
Bounding box is inverted, contains no points.
void clear()
Clear bounding box and make it an inverted box.
bool contains(const point &pt) const
Contains point? (inside or on edge)
const Cmpt & y() const
Access to the vector y component.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
scalar avgDim() const
Average length/height/width dimension.
void operator+=(const boundBox &bb)
Extend box to include the second box, as per the add() method.
A bounding box defined in terms of min/max extrema points.
bool valid() const
Bounding box is non-inverted.
static constexpr direction nComponents
Number of components in this vector space.
void add(const boundBox &bb)
Extend to include the second box.