Templated tree of axis-aligned bounding boxes (AABB) More...
Public Member Functions | |
AABBTree () | |
AABBTree (const UList< Type > &objects, const pointField &points, const bool equalBinSize=true, const label maxLevel=3, const label minBinSize=100) | |
const List< treeBoundBox > & | boundBoxes () const |
const List< labelList > & | addressing () const |
bool | pointInside (const point &pt) const |
bool | overlaps (const boundBox &bbIn) const |
Protected Member Functions | |
void | writeOBJ (const bool writeLinesOnly, const treeBoundBox &bb, label &vertI, Ostream &os) const |
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 |
void | createBoxes (const bool equalBinSize, const label level, const List< Type > &objects, const pointField &points, const DynamicList< label > &objectIDs, const treeBoundBox &bb, const label nodeI, DynamicList< Pair< treeBoundBox >> &bbs, DynamicList< labelPair > &nodes, DynamicList< labelList > &addressing) const |
Protected Attributes | |
label | maxLevel_ |
label | minLeafSize_ |
List< treeBoundBox > | boundBoxes_ |
List< labelList > | addressing_ |
Static Protected Attributes | |
static scalar | tolerance_ = 1e-4 |
Friends | |
Istream & | operator>> (Istream &, AABBTree &) |
Ostream & | operator (Ostream &, const AABBTree &) |
Templated tree of axis-aligned bounding boxes (AABB)
Designed to be templated on either faces or cells, the AABBTree will decompose the input into a tree of AABB's. The maximum number of tree levels and minimum number of objects per leaf are provided on construction, and the contents (addressing) is stored.
Definition at line 55 of file AABBTree.H.
AABBTree | ( | ) |
Definition at line 315 of file AABBTree.C.
AABBTree | ( | const UList< Type > & | objects, |
const pointField & | points, | ||
const bool | equalBinSize = true , |
||
const label | maxLevel = 3 , |
||
const label | minBinSize = 100 |
||
) |
|
protected |
Definition at line 34 of file AABBTree.C.
References Foam::constant::electromagnetic::e, treeBoundBox::edges, f(), treeBoundBox::faces, Foam::nl, os(), treeBoundBox::points(), and Foam::meshTools::writeOBJ().
|
protected |
Definition at line 73 of file AABBTree.C.
References os(), AABBTree::writeOBJ(), and Foam::meshTools::writeOBJ().
Referenced by AABBTree::writeOBJ().
|
protected |
Definition at line 120 of file AABBTree.C.
References boundBox::add(), DynamicList::append(), Foam::component(), Foam::divide(), boundBox::inflate(), boundBox::min(), points, bitSet::set(), DynamicList::shrink(), Foam::sort(), and boundBox::span().
const Foam::List< Foam::treeBoundBox > & boundBoxes | ( | ) | const |
Definition at line 435 of file AABBTree.C.
Referenced by faceAreaWeightAMI2D::overlappingTgtFaces().
const Foam::List< Foam::labelList > & addressing | ( | ) | const |
Definition at line 442 of file AABBTree.C.
Referenced by faceAreaWeightAMI2D::overlappingTgtFaces().
Definition at line 449 of file AABBTree.C.
References treeBoundBox::contains().
Definition at line 464 of file AABBTree.C.
References treeBoundBox::overlaps().
|
staticprotected |
Definition at line 76 of file AABBTree.H.
|
protected |
Definition at line 79 of file AABBTree.H.
|
protected |
Definition at line 82 of file AABBTree.H.
|
protected |
Definition at line 85 of file AABBTree.H.
Definition at line 88 of file AABBTree.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.