OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen OpenCFD Solutions Contact OpenFOAM

treeLeaf Class Template Reference

Inheritance diagram for treeLeaf:

Inheritance graph
[legend]
Collaboration diagram for treeLeaf:

Collaboration graph
[legend]
List of all members.

Detailed Description

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

Definition at line 82 of file treeLeaf.H.


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 size (  )  const [inline]

Definition at line 130 of file treeLeaf.H.

const labelList& indices (  )  const [inline]

Definition at line 135 of file treeLeaf.H.

References FatalErrorIn, and UList::size().

Here is the call graph for this function:

void insert ( const label  index  )  [inline]

Definition at line 142 of file treeLeaf.H.

void trim (  )  [inline]

Definition at line 158 of file treeLeaf.H.

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.

Returns true if found nearer shape and updates nearest and tightest

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:

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

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

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


Friends And Related Function Documentation

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

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


The documentation for this class was generated from the following file: Copyright © 2000-2007 OpenCFD Ltd