Version: 8.3.0
SMESH_Tree< BND_BOX, NB_CHILDREN > Class Template Referenceabstract

Base class for 2D and 3D trees. More...

#include <SMESH_Tree.hxx>

Inheritance diagram for SMESH_Tree< BND_BOX, NB_CHILDREN >:

Public Types

typedef BND_BOX box_type
 

Public Member Functions

 SMESH_Tree (SMESH_TreeLimit *limit=0)
 Constructor. More...
 
virtual ~SMESH_Tree ()
 SMESH_Tree Destructor. More...
 
void compute ()
 Compute the Tree. More...
 
bool isLeaf () const
 Tell if Tree is a leaf or not An inheriting class can influence it via myIsLeaf protected field. More...
 
int level () const
 
const box_typegetBox () const
 
int getHeight (const bool full=true) const
 Return height of the tree, full or from this level to topest leaf. More...
 
virtual double maxSize () const =0
 

Static Public Member Functions

static int nbChildren ()
 

Protected Member Functions

virtual box_typebuildRootBox ()=0
 
virtual SMESH_TreenewChild () const =0
 
virtual box_typenewChildBox (int childIndex) const =0
 
virtual void enlargeByFactor (box_type *box, double factor) const =0
 
virtual void buildChildrenData ()=0
 
void buildChildren ()
 Build the children boxes and call buildChildrenData() More...
 

Protected Attributes

SMESH_Tree ** myChildren
 
SMESH_TreemyFather
 
bool myIsLeaf
 
const SMESH_TreeLimitmyLimit
 
box_typemyBox
 
int myLevel
 

Detailed Description

template<class BND_BOX, int NB_CHILDREN>
class SMESH_Tree< BND_BOX, NB_CHILDREN >

Base class for 2D and 3D trees.

Member Typedef Documentation

template<class BND_BOX, int NB_CHILDREN>
typedef BND_BOX SMESH_Tree< BND_BOX, NB_CHILDREN >::box_type

Constructor & Destructor Documentation

template<class BND_BOX , int NB_CHILDREN>
SMESH_Tree< BND_BOX, NB_CHILDREN >::SMESH_Tree ( SMESH_TreeLimit limit = 0)

Constructor.

limit must be provided at tree root construction. limit will be deleted by SMESH_Tree.

template<class BND_BOX , int NB_CHILDREN>
SMESH_Tree< BND_BOX, NB_CHILDREN >::~SMESH_Tree ( )
virtual

SMESH_Tree Destructor.

Member Function Documentation

template<class BND_BOX , int NB_CHILDREN>
void SMESH_Tree< BND_BOX, NB_CHILDREN >::buildChildren ( )
protected

Build the children boxes and call buildChildrenData()

template<class BND_BOX, int NB_CHILDREN>
virtual void SMESH_Tree< BND_BOX, NB_CHILDREN >::buildChildrenData ( )
protectedpure virtual
template<class BND_BOX, int NB_CHILDREN>
virtual box_type* SMESH_Tree< BND_BOX, NB_CHILDREN >::buildRootBox ( )
protectedpure virtual
template<class BND_BOX , int NB_CHILDREN>
void SMESH_Tree< BND_BOX, NB_CHILDREN >::compute ( )

Compute the Tree.

template<class BND_BOX, int NB_CHILDREN>
virtual void SMESH_Tree< BND_BOX, NB_CHILDREN >::enlargeByFactor ( box_type box,
double  factor 
) const
protectedpure virtual

Implemented in SMESH_Octree, and SMESH_Quadtree.

template<class BND_BOX, int NB_CHILDREN>
const box_type* SMESH_Tree< BND_BOX, NB_CHILDREN >::getBox ( ) const
template<class BND_BOX , int NB_CHILDREN>
int SMESH_Tree< BND_BOX, NB_CHILDREN >::getHeight ( const bool  full = true) const

Return height of the tree, full or from this level to topest leaf.

template<class BND_BOX , int NB_CHILDREN>
bool SMESH_Tree< BND_BOX, NB_CHILDREN >::isLeaf ( ) const

Tell if Tree is a leaf or not An inheriting class can influence it via myIsLeaf protected field.

Referenced by SMESH_NodeSearcherImpl::FindClosestTo(), SMESH::Controls::ElementsOnShape::OctreeClassifier::OctreeClassifier(), and SMESH_NodeSearcherImpl::SMESH_NodeSearcherImpl().

template<class BND_BOX, int NB_CHILDREN>
int SMESH_Tree< BND_BOX, NB_CHILDREN >::level ( ) const
template<class BND_BOX, int NB_CHILDREN>
virtual double SMESH_Tree< BND_BOX, NB_CHILDREN >::maxSize ( ) const
pure virtual

Implemented in SMESH_Octree, and SMESH_Quadtree.

template<class BND_BOX, int NB_CHILDREN>
static int SMESH_Tree< BND_BOX, NB_CHILDREN >::nbChildren ( )
static
template<class BND_BOX, int NB_CHILDREN>
virtual SMESH_Tree* SMESH_Tree< BND_BOX, NB_CHILDREN >::newChild ( ) const
protectedpure virtual
template<class BND_BOX, int NB_CHILDREN>
virtual box_type* SMESH_Tree< BND_BOX, NB_CHILDREN >::newChildBox ( int  childIndex) const
protectedpure virtual

Implemented in SMESH_Octree, and SMESH_Quadtree.

Field Documentation

template<class BND_BOX, int NB_CHILDREN>
box_type* SMESH_Tree< BND_BOX, NB_CHILDREN >::myBox
protected
template<class BND_BOX, int NB_CHILDREN>
SMESH_Tree** SMESH_Tree< BND_BOX, NB_CHILDREN >::myChildren
protected
template<class BND_BOX, int NB_CHILDREN>
SMESH_Tree* SMESH_Tree< BND_BOX, NB_CHILDREN >::myFather
protected
template<class BND_BOX, int NB_CHILDREN>
bool SMESH_Tree< BND_BOX, NB_CHILDREN >::myIsLeaf
protected
template<class BND_BOX, int NB_CHILDREN>
int SMESH_Tree< BND_BOX, NB_CHILDREN >::myLevel
protected
template<class BND_BOX, int NB_CHILDREN>
const SMESH_TreeLimit* SMESH_Tree< BND_BOX, NB_CHILDREN >::myLimit
protected