![]() |
|
Public Member Functions | |
treeNode (const treeBoundBox &bb) | |
Construct from components. | |
treeNode (Istream &) | |
Construct from Istream. | |
~treeNode () | |
const point & | mid () const |
position of midPoint | |
treeElem< Type > *const * | subNodes () const |
array of 8 subNodes/leaves | |
label | isNode (const label octant) const |
octant contains pointer to treeNode(1) or treeLeaf(0) | |
treeNode< Type > * | getNodePtr (const label octant) const |
Get pointer to sub node. | |
treeLeaf< Type > * | getLeafPtr (const label octant) const |
Get pointer to sub leaf. | |
void | distribute (const label, octree< Type > &, const Type &shapes, const labelList &) |
Take list of shapes and distribute over the 8 octants. | |
void | redistribute (const label, octree< Type > &, const Type &shapes, const label) |
Distribute at certain level only. | |
label | setSubNodeType (const label level, octree< Type > &top, const Type &shapes) |
Set type of subnodes. | |
label | getSampleType (const label level, const octree< Type > &top, const Type &shapes, const point &sample) const |
Find type of node sample is in. Used for inside/outside. | |
label | find (const Type &shapes, const point &sample) const |
Find index of shape containing sample. | |
bool | findTightest (const Type &shapes, const point &sample, treeBoundBox &tightest) const |
Find tightest bounding box around sample which is guaranteed. | |
bool | findNearest (const Type &shapes, const point &sample, treeBoundBox &tightest, label &tightesti, scalar &tightestDist) const |
Find nearest shape to sample. | |
bool | findNearest (const Type &shapes, const linePointRef &ln, treeBoundBox &tightest, label &tightesti, point &linePoint, point &shapePoint) const |
Find nearest shape to line. | |
bool | findBox (const Type &shapes, const boundBox &bb, labelHashSet &elements) const |
Find shapes not outside box. Return true if anything found. | |
const treeLeaf< Type > * | findLeafLine (const label level, const Type &shapes, point &start, const point &end) const |
Find treeLeaves intersecting line segment [start..end]. | |
void | findLeaves (List< treeLeaf< Type > * > &leafArray, label &leafIndex) const |
Collect all treeLeafs in leafArray. leafIndex points to first. | |
void | findLeaves (List< const treeLeaf< Type > * > &leafArray, label &leafIndex) const |
Same but for const. | |
void | printNode (Ostream &os, const label level) const |
Print contents of node. | |
void | writeOBJ (Ostream &os, const label level, label &vertNo) const |
Write subleafs in OBJ format. | |
Friends | |
Istream & | operator>> (Istream &, treeNode< Type > &) |
Ostream & | operator (Ostream &, const treeNode< Type > &) |
|
Construct from components.
|
|
Construct from Istream.
|
|
|
|
Take list of shapes and distribute over the 8 octants.
|
|
Find index of shape containing sample.
|
|
Find shapes not outside box. Return true if anything found.
|
|
Find treeLeaves intersecting line segment [start..end]. Updates: start |
|
Same but for const.
|
|
Collect all treeLeafs in leafArray. leafIndex points to first. empty slot in leafArray and gets updated. |
|
Find nearest shape to line. Returns true if found nearer shape and updates nearest and tightest |
|
Find nearest shape to sample. Returns true if found nearer shape and updates tightest, tightesti, tightestDist |
|
Find tightest bounding box around sample which is guaranteed. to hold at least one cell. Current best bb in tightest, returns true if newTightest has changed, 0 otherwise. |
|
Get pointer to sub leaf.
Definition at line 92 of file treeNodeI.H. |
|
Get pointer to sub node.
Definition at line 75 of file treeNodeI.H. |
|
Find type of node sample is in. Used for inside/outside. determination |
|
octant contains pointer to treeNode(1) or treeLeaf(0)
Definition at line 68 of file treeNodeI.H. References Foam::abort(), Foam::FatalError, and FatalErrorIn. |
Here is the call graph for this function:
|
position of midPoint
Definition at line 55 of file treeNodeI.H. |
|
Print contents of node.
|
|
Distribute at certain level only.
|
|
Set type of subnodes.
|
|
array of 8 subNodes/leaves
Definition at line 61 of file treeNodeI.H. |
|
Write subleafs in OBJ format.
|
|
|
|
|