44 #ifndef Foam_AABBTree_H 45 #define Foam_AABBTree_H 66 Ostream& operator<<(Ostream&, const AABBTree<Type>&);
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;
List< labelList > addressing_
Leaf addressing.
bool overlaps(const boundBox &bbIn) const
Determine whether a bounding box overlaps the tree bounding boxes.
List< treeBoundBox > boundBoxes_
Bounding boxes making up the tree.
bool pointInside(const point &pt) const
Determine whether a point is inside the bounding boxes.
static void writeOBJ(Ostream &os, const treeBoundBox &bb, label &vertIndex, const bool writeLinesOnly=false)
Write treeBoundBox in OBJ format.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
static scalar tolerance_
Relative tolerance.
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.
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.
AABBTreeBase()=default
Default construct.
label maxLevel_
Maximum tree level.
An ordered pair of two objects of type <T> with first() and second() elements.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
Istream & operator>>(Istream &, directionInfo &)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
Templated tree of axis-aligned bounding boxes (AABB)
AABBTree()
Default construct.
vector point
Point is a vector.
label minLeafSize_
Minimum points per leaf.
Standard boundBox with extra functionality for use in octree.
Template invariant parts for AABBTree.
const List< labelList > & addressing() const noexcept
Return the contents addressing.
const List< treeBoundBox > & boundBoxes() const noexcept
Return the bounding boxes making up the tree.