44#ifndef Foam_AABBTree_H
45#define Foam_AABBTree_H
100 const bool writeLinesOnly =
false
136 const bool leavesOnly,
137 const bool writeLinesOnly,
149 const bool equalBinSize,
176 const bool equalBinSize =
true,
178 label minBinSize = 100
205 bool overlaps(
const boundBox& bbIn)
const;
Template invariant parts for AABBTree.
static scalar tolerance_
Relative tolerance.
AABBTreeBase()=default
Default construct.
static void writeOBJ(Ostream &os, const treeBoundBox &bb, label &vertIndex, const bool writeLinesOnly=false)
Write treeBoundBox in OBJ format.
Templated tree of axis-aligned bounding boxes (AABB).
const List< labelList > & addressing() const noexcept
Return the contents addressing.
void createBoxes(const bool equalBinSize, const label level, const UList< Type > &objects, const pointField &points, const labelUList &objectIDs, const treeBoundBox &bb, const label nodeI, DynamicList< Pair< treeBoundBox > > &bbs, DynamicList< labelPair > &nodes, DynamicList< labelList > &addressing) const
Create the bounding boxes by interrogating points.
bool overlaps(const boundBox &bbIn) const
Determine whether a bounding box overlaps the tree bounding boxes.
label minLeafSize_
Minimum points per leaf.
AABBTree()
Default construct.
const List< treeBoundBox > & boundBoxes() const noexcept
Return the bounding boxes making up the tree.
void writeOBJ(const bool leavesOnly, const bool writeLinesOnly, const treeBoundBox &bb, const label nodeI, const List< Pair< treeBoundBox > > &bbs, const List< Pair< label > > &nodes, label &vertI, Ostream &os) const
Write OBJ for all bounding boxes.
label maxLevel_
Maximum tree level.
bool pointInside(const point &pt) const
Determine whether a point is inside the bounding boxes.
List< labelList > addressing_
Leaf addressing.
List< treeBoundBox > boundBoxes_
Bounding boxes making up the tree.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
An ordered pair of two objects of type <T> with first() and second() elements.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
A bounding box defined in terms of min/max extrema points.
Standard boundBox with extra functionality for use in octree.
OBJstream os(runTime.globalPath()/outputName)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
Istream & operator>>(Istream &, directionInfo &)
vector point
Point is a vector.
vectorField pointField
pointField is a vectorField.
UList< label > labelUList
A UList of labels.