SALOME - SMESH
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SMESH_OctreeNode Class Reference

#include <SMESH_OctreeNode.hxx>

Inheritance diagram for SMESH_OctreeNode:
Inheritance graph
Collaboration diagram for SMESH_OctreeNode:
Collaboration graph

Public Member Functions

 SMESH_OctreeNode (const std::set< const SMDS_MeshNode * > &theNodes, const int maxLevel=-1, const int maxNbNodes=5, const double minBoxSize=0.)
 
virtual ~SMESH_OctreeNode ()
 Empty destructor. More...
 
virtual const bool isLeaf ()
 
virtual const bool isInside (const SMDS_MeshNode *Node, const double precision=0.)
 
void NodesAround (const SMDS_MeshNode *Node, std::list< const SMDS_MeshNode * > *Result, const double precision=0.)
 
void FindCoincidentNodes (std::set< const SMDS_MeshNode * > *nodes, const double theTolerance, std::list< std::list< const SMDS_MeshNode * > > *theGroupsOfNodes)
 
SMESH_OctreeNodeIteratorPtr GetChildrenIterator ()
 Return iterator over children. More...
 
SMDS_NodeIteratorPtr GetNodeIterator ()
 Return nodes iterator. More...
 
int NbNodes () const
 Return nb nodes in a tree. More...
 
void Compute ()
 
void setMaxLevel (const int maxLevel)
 
void setMinBoxSize (const double minBoxSize)
 
void setBox (const Bnd_B3d *box)
 
void getBox (Bnd_B3d &box)
 
int level () const
 

Static Public Member Functions

static void FindCoincidentNodes (std::set< const SMDS_MeshNode * > nodes, std::list< std::list< const SMDS_MeshNode * > > *theGroupsOfNodes, const double theTolerance=0.00001, const int maxLevel=-1, const int maxNbNodes=5)
 
static double maxSize (const Bnd_B3d *box)
 

Protected Member Functions

 SMESH_OctreeNode ()
 Empty constructor. More...
 
virtual void buildChildrenData ()
 
void computeBoxForFather ()
 
virtual SMESH_OctreeallocateOctreeChild ()
 
void FindCoincidentNodes (const SMDS_MeshNode *Node, std::set< const SMDS_MeshNode * > *SetOfNodes, std::list< const SMDS_MeshNode * > *Result, const double precision)
 
void buildChildren ()
 

Protected Attributes

int myMaxNbNodes
 
std::set< const SMDS_MeshNode * > myNodes
 
int myNbNodes
 
Bnd_B3d * myBox
 
SMESH_Octree ** myChildren
 
SMESH_OctreemyFather
 
int myLevel
 
int myMaxLevel
 
double myMinBoxSize
 
int myIsLeaf
 

Detailed Description

Definition at line 47 of file SMESH_OctreeNode.hxx.

Constructor & Destructor Documentation

SMESH_OctreeNode::SMESH_OctreeNode ( const std::set< const SMDS_MeshNode * > &  theNodes,
const int  maxLevel = -1,
const int  maxNbNodes = 5,
const double  minBoxSize = 0. 
)
virtual SMESH_OctreeNode::~SMESH_OctreeNode ( )
virtual

Empty destructor.

Definition at line 60 of file SMESH_OctreeNode.hxx.

SMESH_OctreeNode::SMESH_OctreeNode ( )
protected

Empty constructor.

Definition at line 105 of file SMESH_OctreeNode.hxx.

Member Function Documentation

virtual const bool SMESH_OctreeNode::isLeaf ( )
virtual

Implements SMESH_Octree.

virtual const bool SMESH_OctreeNode::isInside ( const SMDS_MeshNode Node,
const double  precision = 0. 
)
virtual
void SMESH_OctreeNode::NodesAround ( const SMDS_MeshNode Node,
std::list< const SMDS_MeshNode * > *  Result,
const double  precision = 0. 
)
void SMESH_OctreeNode::FindCoincidentNodes ( std::set< const SMDS_MeshNode * > *  nodes,
const double  theTolerance,
std::list< std::list< const SMDS_MeshNode * > > *  theGroupsOfNodes 
)
static void SMESH_OctreeNode::FindCoincidentNodes ( std::set< const SMDS_MeshNode * >  nodes,
std::list< std::list< const SMDS_MeshNode * > > *  theGroupsOfNodes,
const double  theTolerance = 0.00001,
const int  maxLevel = -1,
const int  maxNbNodes = 5 
)
static
SMESH_OctreeNodeIteratorPtr SMESH_OctreeNode::GetChildrenIterator ( )

Return iterator over children.

SMDS_NodeIteratorPtr SMESH_OctreeNode::GetNodeIterator ( )

Return nodes iterator.

int SMESH_OctreeNode::NbNodes ( ) const

Return nb nodes in a tree.

Definition at line 96 of file SMESH_OctreeNode.hxx.

References myNbNodes.

virtual void SMESH_OctreeNode::buildChildrenData ( )
protectedvirtual

Implements SMESH_Octree.

void SMESH_OctreeNode::computeBoxForFather ( )
protected
virtual SMESH_Octree* SMESH_OctreeNode::allocateOctreeChild ( )
protectedvirtual

Implements SMESH_Octree.

void SMESH_OctreeNode::FindCoincidentNodes ( const SMDS_MeshNode Node,
std::set< const SMDS_MeshNode * > *  SetOfNodes,
std::list< const SMDS_MeshNode * > *  Result,
const double  precision 
)
protected
void SMESH_Octree::Compute ( )
inherited
void SMESH_Octree::setMaxLevel ( const int  maxLevel)
inherited
void SMESH_Octree::setMinBoxSize ( const double  minBoxSize)
inherited

Definition at line 52 of file SMESH_Octree.hxx.

References SMESH_Octree::myMinBoxSize.

void SMESH_Octree::setBox ( const Bnd_B3d *  box)
inherited
void SMESH_Octree::getBox ( Bnd_B3d &  box)
inherited
static double SMESH_Octree::maxSize ( const Bnd_B3d *  box)
staticinherited
int SMESH_Octree::level ( ) const
inherited

Definition at line 64 of file SMESH_Octree.hxx.

References SMESH_Octree::myLevel.

void SMESH_Octree::buildChildren ( )
protectedinherited

Field Documentation

int SMESH_OctreeNode::myMaxNbNodes
protected

Definition at line 123 of file SMESH_OctreeNode.hxx.

std::set<const SMDS_MeshNode*> SMESH_OctreeNode::myNodes
protected

Definition at line 126 of file SMESH_OctreeNode.hxx.

int SMESH_OctreeNode::myNbNodes
protected

Definition at line 129 of file SMESH_OctreeNode.hxx.

Referenced by NbNodes().

Bnd_B3d* SMESH_Octree::myBox
protectedinherited

Definition at line 79 of file SMESH_Octree.hxx.

SMESH_Octree** SMESH_Octree::myChildren
protectedinherited

Definition at line 82 of file SMESH_Octree.hxx.

SMESH_Octree* SMESH_Octree::myFather
protectedinherited

Definition at line 85 of file SMESH_Octree.hxx.

int SMESH_Octree::myLevel
protectedinherited

Definition at line 88 of file SMESH_Octree.hxx.

Referenced by SMESH_Octree::level().

int SMESH_Octree::myMaxLevel
protectedinherited

Definition at line 91 of file SMESH_Octree.hxx.

double SMESH_Octree::myMinBoxSize
protectedinherited

Definition at line 94 of file SMESH_Octree.hxx.

Referenced by SMESH_Octree::setMinBoxSize().

int SMESH_Octree::myIsLeaf
protectedinherited

Definition at line 97 of file SMESH_Octree.hxx.