Version: 9.16.0
SMESH_Quadtree Class Referenceabstract

2D tree of anything. More...

#include <SMESH_Quadtree.hxx>

Inheritance diagram for SMESH_Quadtree:

Public Types

typedef SMESH_Tree< Bnd_B2d, 4 > TBaseTree
 
typedef Bnd_B2d box_type
 

Public Member Functions

 SMESH_Quadtree (SMESH_TreeLimit *limit=0)
 Constructor. More...
 
double maxSize () const
 Compute the bigger dimension of my box. 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...
 

Static Public Member Functions

static int nbChildren ()
 

Protected Member Functions

virtual Bnd_B2d * newChildBox (int childIndex) const
 Allocate a bndbox according to childIndex. More...
 
virtual void enlargeByFactor (Bnd_B2d *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 ()
 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

2D tree of anything.

Methods to implement in a descendant are:

Member Typedef Documentation

◆ box_type

typedef Bnd_B2d SMESH_Tree< Bnd_B2d , NB_CHILDREN >::box_type
inherited

◆ TBaseTree

typedef SMESH_Tree< Bnd_B2d, 4> SMESH_Quadtree::TBaseTree

Constructor & Destructor Documentation

◆ SMESH_Quadtree()

SMESH_Quadtree::SMESH_Quadtree ( SMESH_TreeLimit limit = 0)

Constructor.

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

Member Function Documentation

◆ buildChildren()

void SMESH_Tree< Bnd_B2d , NB_CHILDREN >::buildChildren
protectedinherited

Build the children boxes and call buildChildrenData()

◆ buildChildrenData()

virtual void SMESH_Tree< Bnd_B2d , NB_CHILDREN >::buildChildrenData ( )
protectedpure virtualinherited

Implemented in VISCOUS_2D::_SegmentTree.

◆ buildRootBox()

virtual box_type * SMESH_Tree< Bnd_B2d , NB_CHILDREN >::buildRootBox ( )
protectedpure virtualinherited

Implemented in VISCOUS_2D::_SegmentTree.

◆ compute()

void SMESH_Tree< Bnd_B2d , NB_CHILDREN >::compute
inherited

Compute the Tree.

◆ enlargeByFactor()

void SMESH_Quadtree::enlargeByFactor ( Bnd_B2d *  box,
double  factor 
) const
protectedvirtual

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

Implements SMESH_Tree< Bnd_B2d, 4 >.

◆ getBox()

const box_type * SMESH_Tree< Bnd_B2d , NB_CHILDREN >::getBox ( ) const
inherited

◆ getHeight()

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

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

◆ isLeaf()

bool SMESH_Tree< Bnd_B2d , NB_CHILDREN >::isLeaf
inherited

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

◆ level()

int SMESH_Tree< Bnd_B2d , NB_CHILDREN >::level ( ) const
inherited

◆ maxSize()

double SMESH_Quadtree::maxSize ( ) const
virtual

Compute the bigger dimension of my box.

Implements SMESH_Tree< Bnd_B2d, 4 >.

References SMESH_Tree< Bnd_B2d, 4 >::getBox().

◆ nbChildren()

static int SMESH_Tree< Bnd_B2d , NB_CHILDREN >::nbChildren ( )
staticinherited

◆ newChild()

virtual SMESH_Tree * SMESH_Tree< Bnd_B2d , NB_CHILDREN >::newChild ( ) const
protectedpure virtualinherited

Implemented in VISCOUS_2D::_SegmentTree.

◆ newChildBox()

Bnd_B2d * SMESH_Quadtree::newChildBox ( int  childIndex) const
protectedvirtual

Allocate a bndbox according to childIndex.

childIndex is zero based

Implements SMESH_Tree< Bnd_B2d, 4 >.

References SMESH_Tree< Bnd_B2d, 4 >::getBox().

Field Documentation

◆ myBox

box_type* SMESH_Tree< Bnd_B2d , NB_CHILDREN >::myBox
protectedinherited

◆ myChildren

SMESH_Tree** SMESH_Tree< Bnd_B2d , NB_CHILDREN >::myChildren
protectedinherited

◆ myFather

SMESH_Tree* SMESH_Tree< Bnd_B2d , NB_CHILDREN >::myFather
protectedinherited

◆ myIsLeaf

bool SMESH_Tree< Bnd_B2d , NB_CHILDREN >::myIsLeaf
protectedinherited

◆ myLevel

int SMESH_Tree< Bnd_B2d , NB_CHILDREN >::myLevel
protectedinherited

◆ myLimit

const SMESH_TreeLimit* SMESH_Tree< Bnd_B2d , NB_CHILDREN >::myLimit
protectedinherited