A bounding box defined in terms of the points at its extremities. More...


Public Member Functions | |
| boundBox () | |
| Construct null, setting points to zero. More... | |
| boundBox (const point &min, const point &max) | |
| Construct from components. More... | |
| boundBox (const UList< point > &, const bool doReduce=true) | |
| Construct as the bounding box of the given points. More... | |
| boundBox (const tmp< pointField > &, const bool doReduce=true) | |
| Construct as the bounding box of the given temporary pointField. More... | |
| boundBox (const UList< point > &, const labelUList &indices, const bool doReduce=true) | |
| Construct bounding box as subset of the pointField. More... | |
| template<unsigned Size> | |
| boundBox (const UList< point > &, const FixedList< label, Size > &indices, const bool doReduce=true) | |
| Construct bounding box as subset of the pointField. More... | |
| boundBox (Istream &) | |
| Construct from Istream. More... | |
| boundBox (const dictionary &) | |
| Construct from dictionary. More... | |
| const point & | min () const |
| Minimum point defining the bounding box. More... | |
| const point & | max () const |
| Maximum point defining the bounding box. More... | |
| point & | min () |
| Minimum point defining the bounding box, non-const access. More... | |
| point & | max () |
| Maximum point defining the bounding box, non-const access. More... | |
| point | midpoint () const |
| The midpoint of the bounding box. More... | |
| vector | span () const |
| The bounding box span (from minimum to maximum) More... | |
| scalar | mag () const |
| The magnitude of the bounding box span. More... | |
| scalar | volume () const |
| The volume of the bound box. More... | |
| scalar | minDim () const |
| Smallest length/height/width dimension. More... | |
| scalar | maxDim () const |
| Largest length/height/width dimension. More... | |
| scalar | avgDim () const |
| Average length/height/width dimension. More... | |
| tmp< pointField > | points () const |
| Return corner points in an order corresponding to a 'hex' cell. More... | |
| void | inflate (const scalar s) |
| Inflate box by factor*mag(span) in all dimensions. More... | |
| bool | overlaps (const boundBox &) const |
| Overlaps/touches boundingBox? More... | |
| bool | overlaps (const point &, const scalar radiusSqr) const |
| Overlaps boundingSphere (centre + sqr(radius))? More... | |
| bool | contains (const point &) const |
| Contains point? (inside or on edge) More... | |
| bool | contains (const boundBox &) const |
| Fully contains other boundingBox? More... | |
| bool | containsInside (const point &) const |
| Contains point? (inside only) More... | |
| bool | contains (const UList< point > &) const |
| Contains all of the points? (inside or on edge) More... | |
| bool | contains (const UList< point > &, const labelUList &indices) const |
| Contains all of the points? (inside or on edge) More... | |
| template<unsigned Size> | |
| bool | contains (const UList< point > &, const FixedList< label, Size > &indices) const |
| Contains all of the points? (inside or on edge) More... | |
| bool | containsAny (const UList< point > &) const |
| Contains any of the points? (inside or on edge) More... | |
| bool | containsAny (const UList< point > &, const labelUList &indices) const |
| Contains any of the points? (inside or on edge) More... | |
| template<unsigned Size> | |
| bool | containsAny (const UList< point > &, const FixedList< label, Size > &indices) const |
| Contains any of the points? (inside or on edge) More... | |
| point | nearest (const point &) const |
| Return the nearest point on the boundBox to the supplied point. More... | |
Static Public Member Functions | |
| static bool | found (const dictionary &dict) |
| Does the dictionary have a bound box specified in it? More... | |
| static faceList | faces () |
| Return faces with correct point order. More... | |
Static Public Attributes | |
| static const boundBox | greatBox |
| A very large boundBox: min/max == -/+ vGreat. More... | |
| static const boundBox | invertedBox |
| A very large inverted boundBox: min/max == +/- vGreat. More... | |
Friends | |
| bool | operator== (const boundBox &, const boundBox &) |
| bool | operator!= (const boundBox &, const boundBox &) |
| Istream & | operator>> (Istream &, boundBox &) |
| Ostream & | operator<< (Ostream &, const boundBox &) |
A bounding box defined in terms of the points at its extremities.
Definition at line 59 of file boundBox.H.
|
inline |
Construct null, setting points to zero.
Definition at line 39 of file boundBoxI.H.
Construct from components.
Definition at line 46 of file boundBoxI.H.
Construct as the bounding box of the given points.
Does parallel communication (doReduce = true)
Definition at line 85 of file boundBox.C.
References boundBox::points().

| boundBox | ( | const tmp< pointField > & | points, |
| const bool | doReduce = true |
||
| ) |
Construct as the bounding box of the given temporary pointField.
Does parallel communication (doReduce = true)
Definition at line 94 of file boundBox.C.
References boundBox::points().

| boundBox | ( | const UList< point > & | points, |
| const labelUList & | indices, | ||
| const bool | doReduce = true |
||
| ) |
Construct bounding box as subset of the pointField.
The indices could be from cell/face etc. Does parallel communication (doReduce = true)
Definition at line 104 of file boundBox.C.
References UList< T >::empty(), Foam::max(), Foam::min(), UPstream::parRun(), boundBox::points(), Foam::reduce(), VectorSpace< Form, Cmpt, Ncmpts >::rootMax, and VectorSpace< Form, Cmpt, Ncmpts >::rootMin.

| boundBox | ( | const UList< point > & | points, |
| const FixedList< label, Size > & | indices, | ||
| const bool | doReduce = true |
||
| ) |
Construct bounding box as subset of the pointField.
The indices could be from edge/triFace etc. Does parallel communication (doReduce = true)
Definition at line 34 of file boundBoxTemplates.C.
References Foam::max(), Foam::min(), UPstream::parRun(), boundBox::points(), and Foam::reduce().

Construct from Istream.
Definition at line 53 of file boundBoxI.H.
References Foam::operator>>().

|
inline |
Construct from dictionary.
Definition at line 59 of file boundBoxI.H.
References dict, Foam::dimLength, Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dictionary::found(), dictionary::lookup(), and dictionaryName::name().

|
inlinestatic |
Does the dictionary have a bound box specified in it?
Definition at line 31 of file boundBoxI.H.
References dict.
|
inline |
Minimum point defining the bounding box.
Definition at line 88 of file boundBoxI.H.
Referenced by cell::bb(), searchableSurfacesQueries::bounds(), PatchTools::calcBounds(), Foam::meshCheck::checkGeometry(), collection::collection(), Foam::combine(), Foam::meshTools::constrainToMeshCentre(), boundBox::contains(), Foam::convert(), disk::disk(), treeBoundBox::extend(), extrudedCircle::extrudedCircle(), dynamicIndexedOctree< Type >::findNearest(), dynamicTreeDataPoint::findNearest(), print::generate(), repatchMesh::getNearest(), triangleFuncs::intersectBb(), cellsToCells::maskCells(), projectVertex::operator point(), plate::overlaps(), powerLawLopesdaCostaZone::powerLawLopesdaCostaZone(), treeBoundBox::subBbox(), indexedOctree< Foam::treeDataPoint >::write(), topoSet::writeDebug(), triSurface::writeStats(), and distributedTriSurface::writeStats().

|
inline |
Maximum point defining the bounding box.
Definition at line 94 of file boundBoxI.H.
Referenced by cell::bb(), searchableSurfacesQueries::bounds(), PatchTools::calcBounds(), Foam::meshCheck::checkGeometry(), collection::collection(), Foam::combine(), Foam::meshTools::constrainToMeshCentre(), boundBox::contains(), Foam::convert(), disk::disk(), treeBoundBox::extend(), extrudedCircle::extrudedCircle(), dynamicIndexedOctree< Type >::findNearest(), dynamicTreeDataPoint::findNearest(), print::generate(), repatchMesh::getNearest(), triangleFuncs::intersectBb(), Kmesh::Kmesh(), cellsToCells::maskCells(), projectVertex::operator point(), orientedSurface::orientedSurface(), plate::overlaps(), powerLawLopesdaCostaZone::powerLawLopesdaCostaZone(), treeBoundBox::subBbox(), indexedOctree< Foam::treeDataPoint >::write(), topoSet::writeDebug(), triSurface::writeStats(), and distributedTriSurface::writeStats().

|
inline |
Minimum point defining the bounding box, non-const access.
Definition at line 100 of file boundBoxI.H.
|
inline |
Maximum point defining the bounding box, non-const access.
Definition at line 106 of file boundBoxI.H.
|
inline |
The midpoint of the bounding box.
Definition at line 112 of file boundBoxI.H.
Referenced by box::box(), and nearby::srcBox().

|
inline |
The bounding box span (from minimum to maximum)
Definition at line 118 of file boundBoxI.H.
Referenced by booleanSurface::booleanSurface(), mappedPatchBase::calcMapping(), Foam::meshCheck::checkGeometry(), treeBoundBox::extend(), indexedOctree< Foam::treeDataPoint >::findNear(), Kmesh::Kmesh(), projectVertex::operator point(), and orientedSurface::orientedSurface().

|
inline |
The magnitude of the bounding box span.
Definition at line 124 of file boundBoxI.H.
References Foam::mag().
Referenced by searchableSurfaceList::checkSizes(), Foam::tracking::crossWedge(), and streamlinesParticle::move().


|
inline |
The volume of the bound box.
Definition at line 130 of file boundBoxI.H.
References Foam::cmptProduct().

|
inline |
Smallest length/height/width dimension.
Definition at line 136 of file boundBoxI.H.
References Foam::cmptMin().
Referenced by Foam::meshCheck::checkMesh().


|
inline |
Largest length/height/width dimension.
Definition at line 142 of file boundBoxI.H.
References Foam::cmptMax().
Referenced by nearby::srcBox().


|
inline |
Average length/height/width dimension.
Definition at line 148 of file boundBoxI.H.
References Foam::cmptAv().
Referenced by repatchMesh::getNearest().


| Foam::tmp< Foam::pointField > points | ( | ) | const |
Return corner points in an order corresponding to a 'hex' cell.
Definition at line 146 of file boundBox.C.
References tmp< T >::ref().
Referenced by boundBox::boundBox().


|
static |
Return faces with correct point order.
Definition at line 164 of file boundBox.C.
References forAll, and List< T >::setSize().

| void inflate | ( | const scalar | s | ) |
Inflate box by factor*mag(span) in all dimensions.
Definition at line 207 of file boundBox.C.
References Foam::mag(), VectorSpace< Form, Cmpt, Ncmpts >::one, and s().
Referenced by surfaceFeatures::nearestFeatEdge(), surfaceFeatures::nearestSurfEdge(), patchToPatch::srcBox(), and patchToPatch::tgtBox().


|
inline |
Overlaps/touches boundingBox?
Definition at line 154 of file boundBoxI.H.
References Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
Referenced by tetOverlapVolume::cellCellOverlapMinDecomp(), tetOverlapVolume::cellCellOverlapVolumeMinDecomp(), Foam::searchableSurfaces::insideFraction(), box::overlaps(), sphere::overlaps(), and indexedOctree< Type >::overlaps().


|
inline |
Overlaps boundingSphere (centre + sqr(radius))?
Definition at line 165 of file boundBoxI.H.
References Foam::mag(), and VectorSpace< Form, Cmpt, Ncmpts >::nComponents.

|
inline |
Contains point? (inside or on edge)
Definition at line 204 of file boundBoxI.H.
References Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().
Referenced by powerLawLopesdaCostaZone::powerLawLopesdaCostaZone(), and Foam::selectBox().


|
inline |
Fully contains other boundingBox?
Definition at line 216 of file boundBoxI.H.
References boundBox::max(), and boundBox::min().

|
inline |
Contains point? (inside only)
Definition at line 222 of file boundBoxI.H.
References Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Contains all of the points? (inside or on edge)
Definition at line 216 of file boundBox.C.
References UList< T >::empty(), forAll, and points.

| bool contains | ( | const UList< point > & | points, |
| const labelUList & | indices | ||
| ) | const |
Contains all of the points? (inside or on edge)
Definition at line 235 of file boundBox.C.
References UList< T >::empty(), forAll, and points.

Contains all of the points? (inside or on edge)
Definition at line 78 of file boundBoxTemplates.C.
References UList< T >::empty(), forAll, and points.

Contains any of the points? (inside or on edge)
Definition at line 258 of file boundBox.C.
References UList< T >::empty(), forAll, and points.
Referenced by treeDataFace::overlaps(), treeDataPrimitivePatch< PatchType >::overlaps(), and triSurfaceTools::triangulate().


| bool containsAny | ( | const UList< point > & | points, |
| const labelUList & | indices | ||
| ) | const |
Contains any of the points? (inside or on edge)
Definition at line 277 of file boundBox.C.
References UList< T >::empty(), forAll, and points.

Contains any of the points? (inside or on edge)
Definition at line 103 of file boundBoxTemplates.C.
References UList< T >::empty(), forAll, and points.

| Foam::point nearest | ( | const point & | pt | ) | const |
Return the nearest point on the boundBox to the supplied point.
If point is inside the boundBox then the point is returned unchanged.
Definition at line 300 of file boundBox.C.
References Foam::max(), Foam::min(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

|
static |
A very large boundBox: min/max == -/+ vGreat.
Definition at line 77 of file boundBox.H.
|
static |
A very large inverted boundBox: min/max == +/- vGreat.
Definition at line 80 of file boundBox.H.
Referenced by cell::bb(), PatchTools::calcBounds(), and triSurface::writeStats().