OpenFOAM logo
Open Source CFD Toolkit

treeLeaf Class Template Reference

Inheritance diagram for treeLeaf:

Inheritance graph
[legend]
Collaboration diagram for treeLeaf:

Collaboration graph
[legend]
List of all members.

template<class Type>
class Foam::treeLeaf< Type >


Public Member Functions

 treeLeaf (const treeBoundBox &bb, const label size)
 Construct with size.
 treeLeaf (const treeBoundBox &bb, const labelList &indices)
 Construct from list.
 treeLeaf (Istream &)
 Construct from Istream.
 ~treeLeaf ()
label size () const
const labelList & indices () const
void insert (const label index)
void trim ()
treeLeaf< Type > * redistribute (const label, octree< Type > &, const Type &)
 Take indices at refineLevel and distribute them to lower levels.
label setSubNodeType (const label level, octree< Type > &top, const Type &shapes) const
label getSampleType (const label level, const octree< Type > &top, const Type &shapes, const point &sample) const
 Get type of sample.
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 fitting bounding box in leaf.
bool findNearest (const Type &shapes, const point &sample, treeBoundBox &tightest, label &tightesti, scalar &tightestDist) const
 Find nearest point.
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.
void printLeaf (Ostream &, const label) const
 Debug: print a leaf.
void writeOBJ (Ostream &os, const label level, label &vertNo) const
 Debug: Write bb in OBJ format.
label countLeaf (Ostream &, const label) const
 debug:
template<>
label find (const octreeDataPoint &shapes, const point &sample) const
template<>
bool findNearest (const octreeDataPoint &shapes, const point &sample, treeBoundBox &tightest, label &tightesti, scalar &tightestDist) const
template<>
bool findNearest (const octreeDataTriSurface &shapes, const point &sample, treeBoundBox &tightest, label &tightesti, scalar &tightestDist) const

Friends

Istream & operator>> (Istream &, treeLeaf< Type > &)
Ostream & operator (Ostream &, const treeLeaf< Type > &)

Constructor & Destructor Documentation

treeLeaf (  const treeBoundBox &  bb,
const label  size
) 
 

Construct with size.

treeLeaf (  const treeBoundBox &  bb,
const labelList &  indices
) 
 

Construct from list.

treeLeaf (  Istream &   ) 
 

Construct from Istream.

~treeLeaf (   ) 
 


Member Function Documentation

label countLeaf (  Ostream &  ,
const   label
)  const
 

debug:

label find (  const octreeDataPoint &  shapes,
const point &  sample
)  const
 

label find (  const Type &  shapes,
const point &  sample
)  const
 

Find index of shape containing sample.

bool findBox (  const Type &  shapes,
const boundBox &  bb,
labelHashSet &  elements
)  const
 

Find shapes not outside box. Return true if anything found.

bool findNearest (  const octreeDataTriSurface &  shapes,
const point &  sample,
treeBoundBox &  tightest,
label &  tightesti,
scalar &  tightestDist
)  const
 

bool findNearest (  const octreeDataPoint &  shapes,
const point &  sample,
treeBoundBox &  tightest,
label &  tightesti,
scalar &  tightestDist
)  const
 

bool findNearest (  const Type &  shapes,
const linePointRef &  ln,
treeBoundBox &  tightest,
label &  tightesti,
point &  linePoint,
point &  shapePoint
)  const
 

Find nearest shape to line.

Returns true if found nearer shape and updates nearest and tightest

bool findNearest (  const Type &  shapes,
const point &  sample,
treeBoundBox &  tightest,
label &  tightesti,
scalar &  tightestDist
)  const
 

Find nearest point.

bool findTightest (  const Type &  shapes,
const point &  sample,
treeBoundBox &  tightest
)  const
 

Find tightest fitting bounding box in leaf.

label getSampleType (  const label  level,
const octree< Type > &  top,
const Type &  shapes,
const point &  sample
)  const
 

Get type of sample.

const labelList& indices (   )  const [inline]
 

Definition at line 135 of file treeLeaf.H.

References FatalErrorIn.

void insert (  const label  index  )  [inline]
 

Definition at line 142 of file treeLeaf.H.

void printLeaf (  Ostream &  ,
const   label
)  const
 

Debug: print a leaf.

treeLeaf<Type>* redistribute (  const   label,
octree< Type > &  ,
const Type & 
) 
 

Take indices at refineLevel and distribute them to lower levels.

label setSubNodeType (  const label  level,
octree< Type > &  top,
const Type &  shapes
)  const
 

label size (   )  const [inline]
 

Definition at line 130 of file treeLeaf.H.

void trim (   )  [inline]
 

Definition at line 158 of file treeLeaf.H.

References Foam::endl().

Here is the call graph for this function:

void writeOBJ (  Ostream &  os,
const label  level,
label &  vertNo
)  const
 

Debug: Write bb in OBJ format.


Friends And Related Function Documentation

Ostream& operator (  Ostream &  ,
const treeLeaf< Type > & 
)  [friend]
 

Istream& operator>> (  Istream &  ,
treeLeaf< Type > & 
)  [friend]
 


The documentation for this class was generated from the following file:
For further information go to www.openfoam.org