A bounding box defined in terms of min/max extrema points. More...
Public Types | |
enum | directionBit : direction { XDIR = 1, YDIR = 2, ZDIR = 4 } |
Bits used for (x/y/z) directional encoding. More... | |
Public Member Functions | |
boundBox () | |
Default construct: an inverted bounding box. More... | |
boundBox (const boundBox &)=default | |
Copy construct. More... | |
boundBox & | operator= (const boundBox &)=default |
Copy assignment. More... | |
boundBox (const boundBox &bb, bool doReduce) | |
Copy construct with specified global reduction. More... | |
boundBox (const point &p) | |
Construct a bounding box containing a single initial point. More... | |
boundBox (const Foam::zero_one) | |
Construct a 0/1 unit bounding box. More... | |
boundBox (const point &min, const point &max) | |
Construct from bound box min/max points. More... | |
boundBox (const Pair< point > &bb) | |
Construct from bound box min/max points. More... | |
boundBox (const UList< point > &points, bool doReduce=true) | |
Construct as the bounding box of the given points. More... | |
boundBox (const tmp< pointField > &tpoints, bool doReduce=true) | |
Construct as the bounding box of the given temporary pointField. More... | |
boundBox (const UList< point > &points, const labelUList &indices, bool doReduce=true) | |
Construct bounding box as an indirect subset of the points. More... | |
template<unsigned N> | |
boundBox (const UList< point > &points, const FixedList< label, N > &indices, bool doReduce=true) | |
Construct bounding box as an indirect subset of the points. More... | |
boundBox (Istream &is) | |
Construct from Istream. More... | |
bool | empty () const |
Bounding box is inverted, contains no points. More... | |
bool | good () const |
Bounding box is non-inverted. More... | |
bool | valid () const |
Bounding box is non-inverted - same as good(). More... | |
const point & | min () const noexcept |
Minimum describing the bounding box. More... | |
const point & | max () const noexcept |
Maximum describing the bounding box. More... | |
point & | min () noexcept |
Minimum describing the bounding box, non-const access. More... | |
point & | max () noexcept |
Maximum describing the bounding box, non-const access. More... | |
point | centre () const |
The centre (midpoint) of the bounding box. More... | |
vector | span () const |
The bounding box span (from minimum to maximum) More... | |
scalar | mag () const |
The magnitude/length of the bounding box diagonal. More... | |
scalar | magSqr () const |
The magnitude/length squared of bounding box diagonal. 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... | |
direction | minDir () const |
Direction (X/Y/Z) of the smallest span (for empty box: 0) More... | |
direction | maxDir () const |
Direction (X/Y/Z) of the largest span (for empty box: 0) More... | |
int | nDim () const |
Count the number of positive, non-zero dimensions. More... | |
template<direction CornerNumber> | |
point | hexCorner () const |
Return corner point [0..7] corresponding to a 'hex' cell. More... | |
tmp< pointField > | hexCorners () const |
Corner points in an order corresponding to a 'hex' cell. More... | |
tmp< pointField > | points () const |
Corner points in an order corresponding to a 'hex' cell. More... | |
tmp< pointField > | faceCentres () const |
Face midpoints. More... | |
point | faceCentre (const direction facei) const |
Face centre of given face index. More... | |
void | reset () |
Reset to an inverted box. More... | |
void | reset (const Foam::zero_one) |
Reset to a 0/1 unit bounding box. More... | |
void | reset (const point &pt) |
Reset min/max to be identical to the specified point. More... | |
void | reset (const point &min, const point &max) |
Reset min/max to specified values. More... | |
void | clear () |
Same as reset() - reset to an inverted box. More... | |
void | add (const boundBox &bb) |
Extend to include the second box. More... | |
void | add (const point &pt) |
Extend to include the point. More... | |
void | add (const point &pt0, const point &pt1) |
Extend to include two additional points. More... | |
void | add (const Pair< point > &points) |
Extend to include two additional points. More... | |
void | add (const UList< point > &points) |
Extend to include the points. More... | |
void | add (const tmp< pointField > &tpoints) |
Extend to include the points from the temporary point field. More... | |
template<unsigned N> | |
void | add (const FixedList< point, N > &points) |
Extend to include the points. More... | |
template<unsigned N> | |
void | add (const UList< point > &points, const FixedList< label, N > &indices) |
Extend to include a (subsetted) point field. More... | |
template<class IntContainer > | |
void | add (const UList< point > &points, const IntContainer &indices) |
Extend to include a (subsetted) point field. More... | |
void | grow (const scalar delta) |
Expand box by adjusting min/max by specified amount in each dimension. More... | |
void | grow (const vector &delta) |
Expand box by adjusting min/max by specified amounts. More... | |
void | inflate (const scalar factor) |
Expand box by factor*mag(span) in all dimensions. More... | |
void | inflate (Random &rndGen, const scalar factor) |
Expand box slightly by expanding all dimensions with factor*span*(random 0-1) and guarantees factor*mag(span) minimum width in any direction. More... | |
void | inflate (Random &r, const scalar factor, const scalar delta) |
As per two parameter version but with additional grow() by given amount in each dimension. More... | |
void | reduce () |
Inplace parallel reduction of min/max values. More... | |
bool | intersects (const plane &pln) const |
Does plane intersect this bounding box. More... | |
bool | intersects (const triPointRef &tri) const |
Does triangle intersect this bounding box or is contained within this bounding box. More... | |
bool | overlaps (const boundBox &bb) const |
Overlaps/touches boundingBox? More... | |
bool | overlaps (const point ¢re, const scalar radiusSqr) const |
Overlaps boundingSphere (centre + sqr(radius))? More... | |
bool | contains (const point &pt) const |
Contains point? (inside or on edge) More... | |
bool | contains (const boundBox &bb) const |
Fully contains other boundingBox? More... | |
bool | containsInside (const point &pt) const |
Contains point? (inside only) More... | |
bool | contains (const UList< point > &points) const |
Contains all points? (inside or on edge) More... | |
template<unsigned N> | |
bool | contains (const UList< point > &points, const FixedList< label, N > &indices) const |
Contains all of the (subsetted) points? (inside or on edge) More... | |
template<class IntContainer > | |
bool | contains (const UList< point > &points, const IntContainer &indices) const |
Contains all of the (subsetted) points? (inside or on edge) More... | |
bool | containsAny (const UList< point > &points) const |
Contains any of the points? (inside or on edge) More... | |
template<unsigned N> | |
bool | containsAny (const UList< point > &points, const FixedList< label, N > &indices) const |
Contains any of the (subsetted) points? (inside or on edge) More... | |
template<class IntContainer > | |
bool | containsAny (const UList< point > &points, const IntContainer &indices) const |
Contains any of the (subsetted) points? (inside or on edge) More... | |
point | nearest (const point &p) const |
Return the nearest point on the boundBox to the supplied point. More... | |
void | operator &= (const boundBox &bb) |
Restrict min/max to union with other box. More... | |
void | operator+= (const boundBox &bb) |
Extend box to include the second box, as per the add() method. More... | |
bool | intersect (const boundBox &bb) |
Deprecated(2022-10) - use 'operator&=' to avoid confusion with other intersects() methods. More... | |
point | midpoint () const |
Identical to centre() More... | |
template<> | |
Foam::point | hexCorner () const |
template<> | |
Foam::point | hexCorner () const |
template<> | |
Foam::point | hexCorner () const |
template<> | |
Foam::point | hexCorner () const |
template<> | |
Foam::point | hexCorner () const |
template<> | |
Foam::point | hexCorner () const |
template<> | |
Foam::point | hexCorner () const |
template<> | |
Foam::point | hexCorner () const |
template<Foam::direction CornerNumber> | |
Foam::point | hexCorner () const |
Static Public Member Functions | |
static const boundBox & | null () noexcept |
The null boundBox is the same as an inverted box. More... | |
static const Foam::faceList & | hexFaces () |
The boundBox faces as a hexCell, using hexCorner points. Same as hexCell::modelFaces() More... | |
static constexpr label | nPoints () noexcept |
Number of points for boundBox and HEX. More... | |
static constexpr label | nEdges () noexcept |
Number of edges for boundBox and HEX. More... | |
static constexpr label | nFaces () noexcept |
Number of faces for boundBox and HEX. More... | |
static boundBox | returnReduce (const boundBox &bb) |
Perform a reduction on a copy and return the result. More... | |
Static Public Attributes | |
static const boundBox | greatBox |
A large boundBox: min/max == -/+ ROOTVGREAT. More... | |
static const boundBox | invertedBox |
A large inverted boundBox: min/max == +/- ROOTVGREAT. More... | |
static const FixedList< vector, 6 > | faceNormals |
The unit normal per face. More... | |
Static Protected Member Functions | |
static bool | box_box_overlaps (const point &minA, const point &maxA, const point &minB, const point &maxB) |
Test for overlap of box and box (inclusive check) More... | |
static bool | box_sphere_overlaps (const point &corner0, const point &corner1, const point ¢re, const scalar radiusSqr) |
Test for overlap of box and boundingSphere (centre + sqr(radius)) More... | |
Friends | |
Istream & | operator>> (Istream &is, boundBox &bb) |
Ostream & | operator<< (Ostream &os, const boundBox &bb) |
A bounding box defined in terms of min/max extrema points.
Definition at line 63 of file boundBox.H.
enum directionBit : direction |
Bits used for (x/y/z) directional encoding.
Enumerator | |
---|---|
XDIR | 1: x-direction. Same as (1 << vector::X) |
YDIR | 2: y-direction. Same as (1 << vector::Y) |
ZDIR | 4: z-direction. Same as (1 << vector::Z) |
Definition at line 109 of file boundBox.H.
|
inline |
Default construct: an inverted bounding box.
Definition at line 101 of file boundBoxI.H.
Copy construct with specified global reduction.
Definition at line 65 of file boundBox.C.
References boundBox::reduce().
Construct a bounding box containing a single initial point.
Definition at line 115 of file boundBoxI.H.
|
inlineexplicit |
Construct a 0/1 unit bounding box.
Definition at line 108 of file boundBoxI.H.
Construct from bound box min/max points.
Definition at line 122 of file boundBoxI.H.
Construct from bound box min/max points.
TBD: Construct from bound box min/max points inline explicit boundBox(const MinMax<point>& bb);
Definition at line 129 of file boundBoxI.H.
Construct as the bounding box of the given points.
Does parallel communication (doReduce = true)
Definition at line 76 of file boundBox.C.
References boundBox::add(), boundBox::points(), and boundBox::reduce().
|
explicit |
Construct as the bounding box of the given temporary pointField.
Does parallel communication (doReduce = true)
Definition at line 89 of file boundBox.C.
References boundBox::add(), and boundBox::reduce().
boundBox | ( | const UList< point > & | points, |
const labelUList & | indices, | ||
bool | doReduce = true |
||
) |
Construct bounding box as an indirect subset of the points.
The indices could be from cell/face etc. Does parallel communication (doReduce = true)
Definition at line 103 of file boundBox.C.
References Foam::add(), points, and Foam::reduce().
boundBox | ( | const UList< point > & | points, |
const FixedList< label, N > & | indices, | ||
bool | doReduce = true |
||
) |
Construct bounding box as an indirect subset of the points.
The indices could be from edge/triFace etc. Does parallel communication (doReduce = true)
Definition at line 29 of file boundBoxTemplates.C.
References Foam::add(), points, and Foam::reduce().
Construct from Istream.
Definition at line 136 of file boundBoxI.H.
References Foam::operator>>().
|
inlinestaticprotected |
Test for overlap of box and box (inclusive check)
Definition at line 388 of file boundBoxI.H.
|
inlinestaticprotected |
Test for overlap of box and boundingSphere (centre + sqr(radius))
Note: ordering of corners is irrelevant
Definition at line 403 of file boundBoxI.H.
References Foam::magSqr(), and Foam::min().
|
inlinestaticnoexcept |
The null boundBox is the same as an inverted box.
Definition at line 137 of file boundBox.H.
References boundBox::invertedBox.
|
static |
The boundBox faces as a hexCell, using hexCorner points. Same as hexCell::modelFaces()
Definition at line 57 of file boundBox.C.
References hexCell::modelFaces().
|
inlinestaticnoexcept |
Number of points for boundBox and HEX.
Definition at line 151 of file boundBox.H.
Referenced by boundBox::hexCorners().
|
inlinestaticnoexcept |
Number of edges for boundBox and HEX.
Definition at line 156 of file boundBox.H.
|
inlinestaticnoexcept |
Number of faces for boundBox and HEX.
Definition at line 161 of file boundBox.H.
Referenced by boundBox::faceCentres().
|
inline |
Bounding box is inverted, contains no points.
Definition at line 144 of file boundBoxI.H.
Referenced by fieldExtents::calcFieldExtents(), and cuttingSurfaceBase::cellSelection().
|
inline |
Bounding box is non-inverted.
Definition at line 156 of file boundBoxI.H.
Referenced by boundBox::intersect(), and boundBox::valid().
|
inline |
Bounding box is non-inverted - same as good().
Definition at line 276 of file boundBox.H.
References boundBox::good().
Referenced by isoSurfaceBase::blockCells(), cuttingPlane::checkOverlap(), cuttingSurfaceBase::checkOverlap(), searchableSphere::overlaps(), and searchableBox::searchableBox().
|
inlinenoexcept |
Minimum describing the bounding box.
Definition at line 162 of file boundBoxI.H.
Referenced by PDRblock::blockMeshDict(), eddy::bounds(), fieldExtents::calcFieldExtents(), voxelMeshSearch::centre(), boundBox::contains(), AABBTree< Type >::createBoxes(), inverseDistance::fill(), voxelMeshSearch::fill(), boundaryMesh::getNearest(), voxelMeshSearch::index(), inverseDistance::index3(), voxelMeshSearch::index3(), waveModel::initialiseGeometry(), waveMakerPointPatchVectorField::initialiseGeometry(), boundBox::intersects(), projectVertex::operator point(), Foam::operator<(), Foam::operator==(), inverseDistance::overlaps(), voxelMeshSearch::overlaps(), searchableSphere::overlaps(), boundBox::overlaps(), inverseDistance::position(), Foam::readBoxDim(), PDRblock::reset(), searchableSurfaceCollection::searchableSurfaceCollection(), treeBoundBox::subBbox(), treeBoundBox::subHalf(), treeBoundBox::subOverlaps(), trackingInverseDistance::update(), inverseDistance::update(), topoSet::writeDebug(), and voxelMeshSearch::writeGrid().
|
inlinenoexcept |
Maximum describing the bounding box.
Definition at line 168 of file boundBoxI.H.
Referenced by PDRblock::blockMeshDict(), eddy::bounds(), fieldExtents::calcFieldExtents(), boundBox::contains(), inverseDistance::fill(), voxelMeshSearch::fill(), boundaryMesh::getNearest(), waveModel::initialiseGeometry(), waveMakerPointPatchVectorField::initialiseGeometry(), boundBox::intersects(), Kmesh::Kmesh(), projectVertex::operator point(), Foam::operator<(), Foam::operator==(), inverseDistance::overlaps(), voxelMeshSearch::overlaps(), searchableSphere::overlaps(), boundBox::overlaps(), Foam::readBoxDim(), PDRblock::reset(), searchableSurfaceCollection::searchableSurfaceCollection(), treeBoundBox::subBbox(), treeBoundBox::subHalf(), treeBoundBox::subOverlaps(), and topoSet::writeDebug().
|
inlinenoexcept |
Minimum describing the bounding box, non-const access.
Definition at line 174 of file boundBoxI.H.
|
inlinenoexcept |
Maximum describing the bounding box, non-const access.
Definition at line 180 of file boundBoxI.H.
|
inline |
The centre (midpoint) of the bounding box.
Definition at line 186 of file boundBoxI.H.
Referenced by PDRblock::blockMeshDict(), boundBox::faceCentre(), advancingFrontAMI::findTargetFace(), and boundBox::midpoint().
|
inline |
The bounding box span (from minimum to maximum)
Definition at line 192 of file boundBoxI.H.
Referenced by PDRblock::blockMeshDict(), voxelMeshSearch::centre(), sensitivitySurface::computeRadius(), AABBTree< Type >::createBoxes(), voxelMeshSearch::index(), inverseDistance::index3(), voxelMeshSearch::index3(), Kmesh::Kmesh(), porosityModel::porosityModel(), inverseDistance::position(), trackingInverseDistance::update(), inverseDistance::update(), points0MotionSolver::updateMesh(), and voxelMeshSearch::writeGrid().
|
inline |
The magnitude/length of the bounding box diagonal.
Definition at line 198 of file boundBoxI.H.
Referenced by nearWallFields::calcAddressing(), refinementFeatures::checkSizes(), searchableSurfaces::checkSizes(), isoSurfaceCell::isoSurfaceCell(), isoSurfaceTopo::isoSurfaceTopo(), streamLineParticle::move(), and triSurfaceTools::writeCloseness().
|
inline |
The magnitude/length squared of bounding box diagonal.
Definition at line 204 of file boundBoxI.H.
Referenced by advancingFrontAMI::findTargetFace(), and projectVertex::operator point().
|
inline |
The volume of the bound box.
Definition at line 210 of file boundBoxI.H.
References Foam::cmptProduct().
|
inline |
Smallest length/height/width dimension.
Definition at line 216 of file boundBoxI.H.
References Foam::cmptMin().
|
inline |
Largest length/height/width dimension.
Definition at line 222 of file boundBoxI.H.
References Foam::cmptMax().
|
inline |
Average length/height/width dimension.
Definition at line 228 of file boundBoxI.H.
References Foam::cmptAv().
Referenced by boundaryMesh::getNearest(), and treeBoundBox::typDim().
|
inline |
Direction (X/Y/Z) of the smallest span (for empty box: 0)
Definition at line 234 of file boundBoxI.H.
|
inline |
Direction (X/Y/Z) of the largest span (for empty box: 0)
Definition at line 254 of file boundBoxI.H.
Referenced by AABBTree< Type >::createBoxes().
|
inline |
Count the number of positive, non-zero dimensions.
Definition at line 274 of file boundBoxI.H.
|
inline |
Return corner point [0..7] corresponding to a 'hex' cell.
Referenced by boundBox::intersects().
Foam::tmp< Foam::pointField > hexCorners | ( | ) | const |
Corner points in an order corresponding to a 'hex' cell.
Definition at line 122 of file boundBox.C.
References tmp< T >::New(), boundBox::nPoints(), and pts.
Referenced by boundBox::points().
|
inline |
Corner points in an order corresponding to a 'hex' cell.
Definition at line 374 of file boundBox.H.
References boundBox::hexCorners().
Referenced by PDRblock::blockMeshDict(), boundBox::boundBox(), searchableRotatedBox::overlaps(), and faceAreaWeightAMI2D::writeNoMatch().
Foam::tmp< Foam::pointField > faceCentres | ( | ) | const |
Face midpoints.
Definition at line 140 of file boundBox.C.
References tmp< T >::New(), boundBox::nFaces(), and pts.
Foam::point faceCentre | ( | const direction | facei | ) | const |
Face centre of given face index.
Definition at line 154 of file boundBox.C.
References Foam::abort(), boundBox::centre(), Foam::FatalError, FatalErrorInFunction, Foam::max(), and Foam::min().
|
inline |
Reset to an inverted box.
Definition at line 295 of file boundBoxI.H.
Referenced by PatchTools::calcBounds(), fieldExtents::calcFieldExtents(), and boundBox::clear().
|
inline |
Reset to a 0/1 unit bounding box.
Definition at line 302 of file boundBoxI.H.
|
inline |
Reset min/max to be identical to the specified point.
Definition at line 309 of file boundBoxI.H.
Reset min/max to specified values.
Definition at line 316 of file boundBoxI.H.
References Foam::max(), and Foam::min().
|
inline |
Same as reset() - reset to an inverted box.
Definition at line 412 of file boundBox.H.
References boundBox::reset().
Referenced by cuttingSurfaceBase::cellSelection().
|
inline |
Extend to include the second box.
Definition at line 323 of file boundBoxI.H.
References Foam::max(), and Foam::min().
Referenced by boundBox::boundBox(), treeDataPoint::bounds(), searchableSurfacesQueries::bounds(), treeDataCell::bounds(), treeDataPrimitivePatch< PatchType >::bounds(), treeDataFace::bounds(), treeDataEdge::bounds(), Foam::boundsImpl(), PatchTools::calcBounds(), fieldExtents::calcFieldExtents(), cuttingSurfaceBase::cellSelection(), AABBTree< Type >::createBoxes(), patchProbes::findElements(), boundBox::operator+=(), porosityModel::porosityModel(), and triSurface::writeStats().
|
inline |
Extend to include the point.
Definition at line 330 of file boundBoxI.H.
References Foam::max(), and Foam::min().
Extend to include two additional points.
Definition at line 337 of file boundBoxI.H.
References Foam::add().
Extend to include two additional points.
Definition at line 344 of file boundBoxI.H.
References Foam::add(), UList< T >::first(), and points.
Extend to include the points.
Definition at line 351 of file boundBoxI.H.
References Foam::add(), p, and points.
|
inline |
Extend to include the points from the temporary point field.
Definition at line 360 of file boundBoxI.H.
References Foam::add(), and tmp< T >::clear().
Extend to include the points.
Definition at line 50 of file boundBoxTemplates.C.
References Foam::add(), p, and points.
Extend to include a (subsetted) point field.
The indices could be from edge/triFace etc.
Definition at line 63 of file boundBoxTemplates.C.
References Foam::add(), and points.
Extend to include a (subsetted) point field.
IntContainer | A container with an iterator that dereferences to an label |
Definition at line 88 of file boundBoxTemplates.C.
References Foam::add(), and points.
|
inline |
Expand box by adjusting min/max by specified amount in each dimension.
Definition at line 367 of file boundBoxI.H.
References delta.
Referenced by faceAreaWeightAMI2D::calculate(), Foam::createTree(), dynamicTreeDataPoint::findNearest(), trackingInverseDistance::markBoundaries(), inverseDistance::markBoundaries(), trackingInverseDistance::markDonors(), inverseDistance::markDonors(), trackingInverseDistance::markPatchesAsHoles(), inverseDistance::markPatchesAsHoles(), searchableExtrudedCircle::searchableExtrudedCircle(), and sampledMeshedSurface::update().
|
inline |
Expand box by adjusting min/max by specified amounts.
Definition at line 374 of file boundBoxI.H.
References delta.
|
inline |
Expand box by factor*mag(span) in all dimensions.
Definition at line 381 of file boundBoxI.H.
References Foam::mag().
Referenced by AABBTree< Type >::AABBTree(), box::box(), polyMesh::cellTree(), AABBTree< Type >::createBoxes(), AMIInterpolation::createTree(), triSurfaceMesh::edgeTree(), treeBoundBox::extend(), patchProbes::findElements(), meshToMeshMethod::maskCells(), surfaceFeatures::nearestSurfEdge(), primitiveMesh::pointInCellBB(), refinementFeatures::regionEdgeTrees(), lumpedPointMovement::setInterpolator(), lumpedPointMovement::setPatchControl(), Foam::simpleGeometricFilter(), triSurfaceSearch::tree(), triSurfaceRegionSearch::treeByRegion(), and propellerInfo::updateSampleDiskCells().
void inflate | ( | Random & | rndGen, |
const scalar | factor | ||
) |
Expand box slightly by expanding all dimensions with factor*span*(random 0-1) and guarantees factor*mag(span) minimum width in any direction.
Definition at line 416 of file boundBox.C.
References Foam::cmptMultiply(), Foam::mag(), Foam::max(), rndGen, and Random::sample01().
void inflate | ( | Random & | r, |
const scalar | factor, | ||
const scalar | delta | ||
) |
As per two parameter version but with additional grow() by given amount in each dimension.
Definition at line 434 of file boundBox.C.
void reduce | ( | ) |
Inplace parallel reduction of min/max values.
Definition at line 178 of file boundBox.C.
References Foam::reduce().
Referenced by boundBox::boundBox(), fieldExtents::calcFieldExtents(), cuttingSurfaceBase::cellSelection(), distributedTriSurfaceMesh::distributedTriSurfaceMesh(), porosityModel::porosityModel(), boundBox::returnReduce(), and distributedTriSurfaceMesh::writeStats().
|
static |
Perform a reduction on a copy and return the result.
Definition at line 185 of file boundBox.C.
References boundBox::reduce().
bool intersects | ( | const plane & | pln | ) | const |
Does plane intersect this bounding box.
There is an intersection if the plane segments the corner points
Definition at line 193 of file boundBox.C.
References doLocalCode.
Referenced by cuttingPlane::checkOverlap().
bool intersects | ( | const triPointRef & | tri | ) | const |
Does triangle intersect this bounding box or is contained within this bounding box.
Definition at line 227 of file boundBox.C.
References triangle< Point, PointRef >::a(), MinMax< T >::add(), triangle< Point, PointRef >::areaNormal(), triangle< Point, PointRef >::b(), triangle< Point, PointRef >::c(), boundBox::hexCorner(), boundBox::max(), boundBox::min(), MinMax< T >::overlaps(), MinMax< T >::reset(), triangle< Point, PointRef >::vecA(), triangle< Point, PointRef >::vecB(), triangle< Point, PointRef >::vecC(), and Foam::Zero.
|
inline |
Overlaps/touches boundingBox?
Definition at line 439 of file boundBoxI.H.
References boundBox::max(), and boundBox::min().
Referenced by cuttingSurfaceBase::checkOverlap(), trackingInverseDistance::markBoundaries(), inverseDistance::markBoundaries(), faceAreaWeightAMI2D::overlappingTgtFaces(), searchableBox::overlaps(), searchableRotatedBox::overlaps(), searchablePlate::overlaps(), searchableSphere::overlaps(), and interRegionOption::setMapper().
|
inline |
Overlaps boundingSphere (centre + sqr(radius))?
Definition at line 446 of file boundBoxI.H.
|
inline |
Contains point? (inside or on edge)
Definition at line 455 of file boundBoxI.H.
Referenced by isoSurfaceBase::blockCells(), cuttingSurfaceBase::cellSelection(), trackingInverseDistance::markBoundaries(), and primitiveMesh::pointInCellBB().
|
inline |
Fully contains other boundingBox?
Definition at line 466 of file boundBoxI.H.
References boundBox::max(), and boundBox::min().
|
inline |
Contains point? (inside only)
Definition at line 472 of file boundBoxI.H.
Contains all points? (inside or on edge)
Definition at line 366 of file boundBox.C.
References UList< T >::empty(), p, and points.
Contains all of the (subsetted) points? (inside or on edge)
Definition at line 113 of file boundBoxTemplates.C.
References points.
Contains all of the (subsetted) points? (inside or on edge)
IntContainer | A container with an iterator that dereferences to an label |
Definition at line 142 of file boundBoxTemplates.C.
References points.
Contains any of the points? (inside or on edge)
Definition at line 385 of file boundBox.C.
References UList< T >::empty(), p, and points.
Referenced by searchableRotatedBox::overlaps(), treeDataPrimitivePatch< PatchType >::overlaps(), treeDataFace::overlaps(), and triSurfaceTools::triangulate().
|
inline |
Contains any of the (subsetted) points? (inside or on edge)
Definition at line 171 of file boundBoxTemplates.C.
References points.
Contains any of the (subsetted) points? (inside or on edge)
IntContainer | A container with an iterator that dereferences to an label |
Definition at line 204 of file boundBoxTemplates.C.
References points.
Foam::point nearest | ( | const point & | p | ) | 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 404 of file boundBox.C.
References Foam::max(), Foam::min(), and p.
void operator&= | ( | const boundBox & | bb | ) |
Restrict min/max to union with other box.
|
inline |
Extend box to include the second box, as per the add() method.
Can be used in a reduction operation.
Definition at line 650 of file boundBox.H.
References boundBox::add().
|
inline |
Deprecated(2022-10) - use 'operator&=' to avoid confusion with other intersects() methods.
Definition at line 668 of file boundBox.H.
References boundBox::good().
|
inline |
Identical to centre()
Definition at line 673 of file boundBox.H.
References boundBox::centre().
|
inline |
Definition at line 32 of file boundBoxI.H.
|
inline |
Definition at line 39 of file boundBoxI.H.
|
inline |
Definition at line 46 of file boundBoxI.H.
|
inline |
Definition at line 53 of file boundBoxI.H.
|
inline |
Definition at line 60 of file boundBoxI.H.
|
inline |
Definition at line 67 of file boundBoxI.H.
|
inline |
Definition at line 74 of file boundBoxI.H.
|
inline |
Definition at line 81 of file boundBoxI.H.
|
inline |
Definition at line 92 of file boundBoxI.H.
|
static |
A large boundBox: min/max == -/+ ROOTVGREAT.
Definition at line 119 of file boundBox.H.
|
static |
A large inverted boundBox: min/max == +/- ROOTVGREAT.
Definition at line 124 of file boundBox.H.
Referenced by boundBox::null(), and treeBoundBox::null().
|
static |
The unit normal per face.
Definition at line 129 of file boundBox.H.
Referenced by searchableBox::getNormal().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.