SMESH_Tree< BND_BOX, NB_CHILDREN > Class Template Referenceabstract

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

#include <SMESH_tree.hxx>

Public Types

typedef BND_BOX box_type
 

Public Member Functions

void compute ()
 Compute the Tree. More...
 
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...
 
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
 
virtual double maxSize () const =0
 
 SMESH_Tree (SMESH_TreeLimit *limit=0)
 
virtual ~SMESH_Tree ()
 SMESH_Tree Destructor. More...
 

Static Public Member Functions

static int nbChildren ()
 

Protected Member Functions

void buildChildren ()
 Build the children boxes and call buildChildrenData() More...
 
virtual void buildChildrenData ()=0
 
virtual box_typebuildRootBox ()=0
 
virtual SMESH_TreenewChild () const =0
 
virtual box_typenewChildBox (int childIndex) const =0
 

Protected Attributes

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

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

◆ box_type

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

Constructor & Destructor Documentation

◆ SMESH_Tree()

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.

◆ ~SMESH_Tree()

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

SMESH_Tree Destructor.

Member Function Documentation

◆ buildChildren()

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

◆ buildChildrenData()

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

◆ buildRootBox()

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

◆ compute()

template<class BND_BOX , int NB_CHILDREN>
void SMESH_Tree< BND_BOX, NB_CHILDREN >::compute

Compute the Tree.

◆ getBox()

template<class BND_BOX , int NB_CHILDREN>
const box_type * SMESH_Tree< BND_BOX, NB_CHILDREN >::getBox ( ) const

◆ getHeight()

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.

◆ isLeaf()

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

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

Referenced by SMESH_NodeSearcherImpl::FindClosestTo(), and SMESH_NodeSearcherImpl::SMESH_NodeSearcherImpl().

◆ level()

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

◆ maxSize()

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

◆ nbChildren()

template<class BND_BOX , int NB_CHILDREN>
static int SMESH_Tree< BND_BOX, NB_CHILDREN >::nbChildren ( )
static

◆ newChild()

template<class BND_BOX , int NB_CHILDREN>
virtual SMESH_Tree * SMESH_Tree< BND_BOX, NB_CHILDREN >::newChild ( ) const
protectedpure virtual

◆ newChildBox()

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.

Member Data Documentation

◆ myBox

template<class BND_BOX , int NB_CHILDREN>
box_type* SMESH_Tree< BND_BOX, NB_CHILDREN >::myBox
protected

◆ myChildren

template<class BND_BOX , int NB_CHILDREN>
SMESH_Tree** SMESH_Tree< BND_BOX, NB_CHILDREN >::myChildren
protected

◆ myFather

template<class BND_BOX , int NB_CHILDREN>
SMESH_Tree* SMESH_Tree< BND_BOX, NB_CHILDREN >::myFather
protected

◆ myIsLeaf

template<class BND_BOX , int NB_CHILDREN>
bool SMESH_Tree< BND_BOX, NB_CHILDREN >::myIsLeaf
protected

◆ myLevel

template<class BND_BOX , int NB_CHILDREN>
int SMESH_Tree< BND_BOX, NB_CHILDREN >::myLevel
protected

◆ myLimit

template<class BND_BOX , int NB_CHILDREN>
const SMESH_TreeLimit* SMESH_Tree< BND_BOX, NB_CHILDREN >::myLimit
protected

The documentation for this class was generated from the following file: