SMESH_Octree Class Reference

3D tree of anything. Methods to implement in a descendant are: More...

#include <SMESH_Octree.hxx>

Public Types

typedef SMESH_Tree< Bnd_B3d, 8 > TBaseTree
 
- Public Types inherited from SMESH_Tree< Bnd_B3d, 8 >
typedef Bnd_B3d box_type
 

Public Member Functions

double maxSize () const
 Compute the bigger dimension of my box. More...
 
 SMESH_Octree (SMESH_TreeLimit *limit=0)
 
virtual ~SMESH_Octree ()
 
- Public Member Functions inherited from SMESH_Tree< Bnd_B3d, 8 >
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 getChildIndex (double x, double y, double z, const gp_XYZ &boxMiddle)
 Return index of a child the given point is in. More...
 
- Static Public Member Functions inherited from SMESH_Tree< Bnd_B3d, 8 >
static int nbChildren ()
 

Protected Member Functions

virtual Bnd_B3d * newChildBox (int childIndex) const
 Allocate a bndbox according to childIndex. childIndex is zero based. More...
 
- Protected Member Functions inherited from SMESH_Tree< Bnd_B3d, 8 >
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
 

Additional Inherited Members

- Protected Attributes inherited from SMESH_Tree< Bnd_B3d, 8 >
box_typemyBox
 
SMESH_Tree ** myChildren
 
SMESH_TreemyFather
 
bool myIsLeaf
 
int myLevel
 
const SMESH_TreeLimitmyLimit
 

Detailed Description

3D tree of anything. Methods to implement in a descendant are:

Member Typedef Documentation

◆ TBaseTree

typedef SMESH_Tree< Bnd_B3d, 8> SMESH_Octree::TBaseTree

Constructor & Destructor Documentation

◆ SMESH_Octree()

SMESH_Octree::SMESH_Octree ( SMESH_TreeLimit limit = 0)

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

◆ ~SMESH_Octree()

virtual SMESH_Octree::~SMESH_Octree ( )
virtual

Member Function Documentation

◆ getChildIndex()

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().

◆ maxSize()

double SMESH_Octree::maxSize ( ) const
virtual

◆ newChildBox()

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().


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