Version: 8.3.0
SMESH_Octree Class Referenceabstract

3D tree of anything. More...

#include <SMESH_Octree.hxx>

Inheritance diagram for SMESH_Octree:

Public Types

typedef SMESH_Tree< Bnd_B3d, 8 > TBaseTree
 
typedef Bnd_B3d box_type
 

Public Member Functions

 SMESH_Octree (SMESH_TreeLimit *limit=0)
 Constructor. More...
 
virtual ~SMESH_Octree ()
 
double maxSize () const
 Compute the bigger dimension of my box. More...
 
void compute ()
 
bool isLeaf () const
 
int level () const
 
const box_typegetBox () const
 
int getHeight (const bool full=true) const
 

Static Public Member Functions

static int getChildIndex (double x, double y, double z, const gp_XYZ &boxMiddle)
 Return index of a child the given point is in. More...
 
static int nbChildren ()
 

Protected Member Functions

virtual Bnd_B3d * newChildBox (int childIndex) const
 Allocate a bndbox according to childIndex. More...
 
virtual void enlargeByFactor (Bnd_B3d *box, double factor) const
 Change size of a box by a factor; each dimension changes independently of others. More...
 
virtual box_typebuildRootBox ()=0
 
virtual SMESH_TreenewChild () const =0
 
virtual void buildChildrenData ()=0
 
void buildChildren ()
 

Protected Attributes

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

Detailed Description

3D tree of anything.

Methods to implement in a descendant are:

Member Typedef Documentation

typedef Bnd_B3d SMESH_Tree< Bnd_B3d , NB_CHILDREN >::box_type
inherited
typedef SMESH_Tree< Bnd_B3d, 8> SMESH_Octree::TBaseTree

Constructor & Destructor Documentation

SMESH_Octree::SMESH_Octree ( SMESH_TreeLimit limit = 0)

Constructor.

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

virtual SMESH_Octree::~SMESH_Octree ( )
virtual

Member Function Documentation

void SMESH_Tree< Bnd_B3d , NB_CHILDREN >::buildChildren ( )
protectedinherited

Build the children boxes and call buildChildrenData()

virtual void SMESH_Tree< Bnd_B3d , NB_CHILDREN >::buildChildrenData ( )
protectedpure virtualinherited
virtual box_type* SMESH_Tree< Bnd_B3d , NB_CHILDREN >::buildRootBox ( )
protectedpure virtualinherited
void SMESH_Tree< Bnd_B3d , NB_CHILDREN >::compute ( )
inherited
void SMESH_Octree::enlargeByFactor ( Bnd_B3d *  box,
double  factor 
) const
protectedvirtual

Change size of a box by a factor; each dimension changes independently of others.

Implements SMESH_Tree< Bnd_B3d, 8 >.

int SMESH_Octree::getChildIndex ( double  x,
double  y,
double  z,
const gp_XYZ &  boxMiddle 
)
static

Return index of a child the given point is in.

Referenced by SMESH_OctreeNode::buildChildrenData(), SMESH_OctreeNode::NodesAround(), and SMESH_OctreeNode::UpdateByMoveNode().

int SMESH_Tree< Bnd_B3d , NB_CHILDREN >::getHeight ( const bool  full = true) const
inherited

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

bool SMESH_Tree< Bnd_B3d , NB_CHILDREN >::isLeaf ( ) const
inherited

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

Referenced by SMESH_OctreeNode::FindCoincidentNodes(), SMESH_OctreeNode::GetChildrenIterator(), SMESH_OctreeNode::NodesAround(), and SMESH_OctreeNode::UpdateByMoveNode().

int SMESH_Tree< Bnd_B3d , NB_CHILDREN >::level ( ) const
inherited
double SMESH_Octree::maxSize ( ) const
virtual
static int SMESH_Tree< Bnd_B3d , NB_CHILDREN >::nbChildren ( )
staticinherited
virtual SMESH_Tree* SMESH_Tree< Bnd_B3d , NB_CHILDREN >::newChild ( ) const
protectedpure virtualinherited
Bnd_B3d * SMESH_Octree::newChildBox ( int  childIndex) const
protectedvirtual

Allocate a bndbox according to childIndex.

childIndex is zero based

Implements SMESH_Tree< Bnd_B3d, 8 >.

References SMESH_Tree< Bnd_B3d, 8 >::getBox().

Field Documentation

box_type* SMESH_Tree< Bnd_B3d , NB_CHILDREN >::myBox
protectedinherited
SMESH_Tree* SMESH_Tree< Bnd_B3d , NB_CHILDREN >::myFather
protectedinherited
bool SMESH_Tree< Bnd_B3d , NB_CHILDREN >::myIsLeaf
protectedinherited
int SMESH_Tree< Bnd_B3d , NB_CHILDREN >::myLevel
protectedinherited
const SMESH_TreeLimit* SMESH_Tree< Bnd_B3d , NB_CHILDREN >::myLimit
protectedinherited