Non-pointer based hierarchical recursive searching. Storage is dynamic, so elements can be deleted. More...
Classes | |
class | node |
Public Member Functions | |
dynamicIndexedOctree (const Type &shapes, const treeBoundBox &bb, const label maxLevels, const scalar maxLeafRatio, const scalar maxDuplicity) | |
autoPtr< dynamicIndexedOctree< Type > > | clone () const |
const Type & | shapes () const |
const List< node > & | nodes () const |
const contentListList & | contents () const |
const treeBoundBox & | bb () const |
pointIndexHit | findNearest (const point &sample, const scalar nearestDistSqr) const |
void | findNearest (const label nodeI, const point &, scalar &nearestDistSqr, label &nearestShapeI, point &nearestPoint) const |
pointIndexHit | findNearest (const linePointRef &ln, treeBoundBox &tightest, point &linePoint) const |
pointIndexHit | findLine (const point &start, const point &end) const |
pointIndexHit | findLineAny (const point &start, const point &end) const |
labelList | findBox (const treeBoundBox &bb) const |
labelList | findSphere (const point ¢re, const scalar radiusSqr) const |
labelBits | findNode (const label nodeI, const point &) const |
label | findInside (const point &) const |
const labelList & | findIndices (const point &) const |
volumeType | getVolumeType (const point &) const |
template<class CompareOp > | |
void | findNear (const scalar nearDist, const dynamicIndexedOctree< Type > &tree2, CompareOp &cop) const |
bool | insert (label startIndex, label endIndex) |
bool | insertIndex (const label nodIndex, const label index, label &nLevels) |
bool | remove (const label index) |
label | removeIndex (const label nodIndex, const label index) |
void | print (prefixOSstream &, const bool printContents, const label) const |
bool | write (Ostream &os) const |
void | writeTreeInfo () const |
Static Public Member Functions | |
static scalar & | perturbTol () |
static bool | isContent (const labelBits i) |
static bool | isEmpty (const labelBits i) |
static bool | isNode (const labelBits i) |
static label | getContent (const labelBits i) |
static label | getNode (const labelBits i) |
static direction | getOctant (const labelBits i) |
static volumeType | getSide (const vector &outsideNormal, const vector &vec) |
static bool | overlaps (const point &bbMin, const point &bbMax, const scalar nearestDistSqr, const point &sample) |
Friends | |
Ostream & | operator (Ostream &, const dynamicIndexedOctree< Type > &) |
Non-pointer based hierarchical recursive searching. Storage is dynamic, so elements can be deleted.
Definition at line 53 of file dynamicIndexedOctree.H.
dynamicIndexedOctree | ( | const Type & | shapes, |
const treeBoundBox & | bb, | ||
const label | maxLevels, | ||
const scalar | maxLeafRatio, | ||
const scalar | maxDuplicity | ||
) |
Definition at line 2130 of file dynamicIndexedOctree.C.
References Foam::expressions::patchExpr::debug, and insert().
|
static |
Definition at line 2166 of file dynamicIndexedOctree.C.
|
inline |
Definition at line 416 of file dynamicIndexedOctree.H.
References Foam::New().
|
inline |
Definition at line 427 of file dynamicIndexedOctree.H.
Definition at line 433 of file dynamicIndexedOctree.H.
|
inline |
Definition at line 440 of file dynamicIndexedOctree.H.
|
inline |
Definition at line 446 of file dynamicIndexedOctree.H.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
Referenced by dynamicIndexedOctree::findNear().
Definition at line 459 of file dynamicIndexedOctree.H.
References labelBits::val().
Referenced by dynamicIndexedOctree::getContent().
Definition at line 464 of file dynamicIndexedOctree.H.
References labelBits::val().
Definition at line 469 of file dynamicIndexedOctree.H.
References labelBits::val().
Referenced by dynamicIndexedOctree::getNode().
|
inlinestatic |
Definition at line 474 of file dynamicIndexedOctree.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, dynamicIndexedOctree::isContent(), and labelBits::val().
|
inlinestatic |
Definition at line 484 of file dynamicIndexedOctree.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, dynamicIndexedOctree::isNode(), and labelBits::val().
Definition at line 494 of file dynamicIndexedOctree.H.
References labelBits::bits().
pointIndexHit findNearest | ( | const point & | sample, |
const scalar | nearestDistSqr | ||
) | const |
void findNearest | ( | const label | nodeI, |
const point & | , | ||
scalar & | nearestDistSqr, | ||
label & | nearestShapeI, | ||
point & | nearestPoint | ||
) | const |
Foam::pointIndexHit findNearest | ( | const linePointRef & | ln, |
treeBoundBox & | tightest, | ||
point & | linePoint | ||
) | const |
Definition at line 2202 of file dynamicIndexedOctree.C.
References Foam::ln(), and Foam::Zero.
Foam::pointIndexHit findLine | ( | const point & | start, |
const point & | end | ||
) | const |
Definition at line 2235 of file dynamicIndexedOctree.C.
References stdFoam::end().
Foam::pointIndexHit findLineAny | ( | const point & | start, |
const point & | end | ||
) | const |
Definition at line 2246 of file dynamicIndexedOctree.C.
References stdFoam::end().
labelList findBox | ( | const treeBoundBox & | bb | ) | const |
Foam::labelList findSphere | ( | const point & | centre, |
const scalar | radiusSqr | ||
) | const |
Definition at line 2277 of file dynamicIndexedOctree.C.
Foam::labelBits findNode | ( | const label | nodeI, |
const point & | sample | ||
) | const |
Definition at line 2298 of file dynamicIndexedOctree.C.
References Foam::abort(), dynamicIndexedOctree::node::bb_, treeBoundBox::contains(), Foam::expressions::patchExpr::debug, Foam::FatalError, FatalErrorInFunction, dynamicIndexedOctree::node::subNodes_, and treeBoundBox::subOctant().
Foam::label findInside | ( | const point & | sample | ) | const |
Definition at line 2345 of file dynamicIndexedOctree.C.
References forAll, Foam::getOctant(), and dynamicIndexedOctree::node::subNodes_.
const Foam::labelList & findIndices | ( | const point & | sample | ) | const |
Definition at line 2377 of file dynamicIndexedOctree.C.
References Foam::getOctant(), and dynamicIndexedOctree::node::subNodes_.
volumeType getVolumeType | ( | const point & | ) | const |
|
static |
Definition at line 445 of file dynamicIndexedOctree.C.
|
static |
void findNear | ( | const scalar | nearDist, |
const dynamicIndexedOctree< Type > & | tree2, | ||
CompareOp & | cop | ||
) | const |
Definition at line 2469 of file dynamicIndexedOctree.C.
References dynamicIndexedOctree::bb().
bool insert | ( | label | startIndex, |
label | endIndex | ||
) |
Definition at line 2491 of file dynamicIndexedOctree.C.
References Foam::divide(), Foam::max(), and success.
bool insertIndex | ( | const label | nodIndex, |
const label | index, | ||
label & | nLevels | ||
) |
Definition at line 2538 of file dynamicIndexedOctree.C.
References treeBoundBox::subBbox().
bool remove | ( | const label | index | ) |
Definition at line 2614 of file dynamicIndexedOctree.C.
Foam::label removeIndex | ( | const label | nodIndex, |
const label | index | ||
) |
Definition at line 2629 of file dynamicIndexedOctree.C.
References DynamicList::append(), forAll, DynamicList::shrink(), treeBoundBox::subBbox(), and DynamicList::transfer().
void print | ( | prefixOSstream & | os, |
const bool | printContents, | ||
const label | nodeI | ||
) | const |
Definition at line 2712 of file dynamicIndexedOctree.C.
References dynamicIndexedOctree::node::bb_, Foam::endl(), forAll, Foam::nl, os(), dynamicIndexedOctree::node::parent_, Foam::BitOps::print(), treeBoundBox::subBbox(), dynamicIndexedOctree::node::subNodes_, and Foam::meshTools::writeOBJ().
Definition at line 2810 of file dynamicIndexedOctree.C.
References os().
void writeTreeInfo | ( | ) | const |
Definition at line 2784 of file dynamicIndexedOctree.C.
References Foam::endl(), forAll, Foam::nl, and Foam::Pout.
|
friend |
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.