OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

treeLeaf< Type > Class Template Reference

An octree treeLeaf. More...

Inheritance diagram for treeLeaf< Type >:
Collaboration diagram for treeLeaf< Type >:

List of all members.


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<>
Foam::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<>
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
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 > &)

Detailed Description

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

An octree treeLeaf.

Source files

Definition at line 72 of file treeLeaf.H.


Constructor & Destructor Documentation

treeLeaf ( const treeBoundBox &  bb,
const label  size 
) [inline]

Construct with size.

Definition at line 43 of file treeLeaf.C.

treeLeaf ( const treeBoundBox &  bb,
const labelList &  indices 
) [inline]

Construct from list.

Definition at line 51 of file treeLeaf.C.

treeLeaf ( Istream &  is  )  [inline]

Construct from Istream.

Definition at line 60 of file treeLeaf.C.

~treeLeaf (  )  [inline]

Definition at line 69 of file treeLeaf.C.


Member Function Documentation

label size (  )  const [inline]

Definition at line 120 of file treeLeaf.H.

const labelList& indices (  )  const [inline]

Definition at line 125 of file treeLeaf.H.

void insert ( const label  index  )  [inline]

Definition at line 132 of file treeLeaf.H.

void trim (  )  [inline]

Definition at line 148 of file treeLeaf.H.

Foam::treeLeaf< Type > * redistribute ( const label  level,
octree< Type > &  top,
const Type &  shapes 
) [inline]

Take indices at refineLevel and distribute them to lower levels.

Definition at line 78 of file treeLeaf.C.

Foam::label setSubNodeType ( const label  level,
octree< Type > &  top,
const Type &  shapes 
) const [inline]

Definition at line 131 of file treeLeaf.C.

Foam::label getSampleType ( const label  level,
const octree< Type > &  top,
const Type &  shapes,
const point &  sample 
) const [inline]

Get type of sample.

Definition at line 152 of file treeLeaf.C.

Foam::label find ( const Type &  shapes,
const point &  sample 
) const [inline]

Find index of shape containing sample.

Definition at line 165 of file treeLeaf.C.

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

Find tightest fitting bounding box in leaf.

Definition at line 184 of file treeLeaf.C.

bool findNearest ( const Type &  shapes,
const point &  sample,
treeBoundBox &  tightest,
label &  tightestI,
scalar &  tightestDist 
) const [inline]

Find nearest point.

Definition at line 208 of file treeLeaf.C.

bool findNearest ( const Type &  shapes,
const linePointRef &  ln,
treeBoundBox &  tightest,
label &  tightestI,
point &  linePoint,
point &  shapePoint 
) const [inline]

Find nearest shape to line.

Returns true if found nearer shape and updates nearest and tightest

Definition at line 274 of file treeLeaf.C.

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

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

Definition at line 327 of file treeLeaf.C.

void printLeaf ( Ostream &  os,
const label  level 
) const [inline]

Debug: print a leaf.

Definition at line 351 of file treeLeaf.C.

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

Debug: Write bb in OBJ format.

Definition at line 370 of file treeLeaf.C.

Foam::label countLeaf ( Ostream &  os,
const label  level 
) const [inline]

debug:

Definition at line 410 of file treeLeaf.C.

Foam::label find ( const octreeDataPoint &  shapes,
const point &  sample 
) const [inline]

Definition at line 29 of file octreeDataPointTreeLeaf.C.

References notImplemented.

bool findNearest ( const octreeDataPoint &  shapes,
const point &  sample,
treeBoundBox &  tightest,
label &  tightestI,
scalar &  tightestDist 
) const [inline]

Definition at line 47 of file octreeDataPointTreeLeaf.C.

label find ( const octreeDataPoint &  shapes,
const point &  sample 
) const [inline]

bool findNearest ( const octreeDataPoint &  shapes,
const point &  sample,
treeBoundBox &  tightest,
label &  tightestI,
scalar &  tightestDist 
) const [inline]

bool findNearest ( const octreeDataTriSurface &  shapes,
const point &  sample,
treeBoundBox &  tightest,
label &  tightestI,
scalar &  tightestDist 
) const [inline]

bool findNearest ( const octreeDataTriSurface &  shapes,
const point &  sample,
treeBoundBox &  tightest,
label &  tightestI,
scalar &  tightestDist 
) const [inline]


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 files:
Copyright © 2000-2009 OpenCFD Ltd