SALOME - SMESH
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 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.)
 
bool NodesAround (const SMDS_MeshNode *Node, std::map< double, const SMDS_MeshNode *> &dist2Nodes, double precision)
 
void FindCoincidentNodes (std::set< const SMDS_MeshNode *> *nodes, const double theTolerance, std::list< std::list< const SMDS_MeshNode *> > *theGroupsOfNodes)
 
void UpdateByMoveNode (const SMDS_MeshNode *node, const gp_Pnt &toPnt)
 Update data according to node movement. More...
 
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 ()
 
bool isLeaf () const
 
int level () const
 
const Bnd_B3d & getBox () const
 
double maxSize () const
 
int getChildIndex (double x, double y, double z, const gp_XYZ &boxMiddle) const
 Return index of a child the given point is in. More...
 

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)
 

Protected Member Functions

 SMESH_OctreeNode (int maxNbNodes)
 
virtual Bnd_B3d * buildRootBox ()
 
virtual void buildChildrenData ()
 
virtual SMESH_OctreeallocateOctreeChild () const
 
void FindCoincidentNodes (const SMDS_MeshNode *Node, std::set< const SMDS_MeshNode *> *SetOfNodes, std::list< const SMDS_MeshNode *> *Result, const double precision)
 

Protected Attributes

int myMaxNbNodes
 
std::set< const SMDS_MeshNode * > myNodes
 
SMESH_Octree ** myChildren
 
SMESH_OctreemyFather
 
bool myIsLeaf
 
const LimitmyLimit
 

Detailed Description

Definition at line 48 of file SMESH_OctreeNode.hxx.

Constructor & Destructor Documentation

◆ SMESH_OctreeNode() [1/2]

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

Referenced by NbNodes().

Here is the caller graph for this function:

◆ ~SMESH_OctreeNode()

virtual SMESH_OctreeNode::~SMESH_OctreeNode ( )
virtual

Empty destructor.

Definition at line 61 of file SMESH_OctreeNode.hxx.

References FindCoincidentNodes(), GetChildrenIterator(), GetNodeIterator(), isInside(), NodesAround(), and UpdateByMoveNode().

Here is the call graph for this function:

◆ SMESH_OctreeNode() [2/2]

SMESH_OctreeNode::SMESH_OctreeNode ( int  maxNbNodes)
protected

Member Function Documentation

◆ isInside()

virtual const bool SMESH_OctreeNode::isInside ( const SMDS_MeshNode Node,
const double  precision = 0. 
)
virtual

Referenced by ~SMESH_OctreeNode().

Here is the caller graph for this function:

◆ NodesAround() [1/2]

void SMESH_OctreeNode::NodesAround ( const SMDS_MeshNode Node,
std::list< const SMDS_MeshNode *> *  Result,
const double  precision = 0. 
)

Referenced by ~SMESH_OctreeNode().

Here is the caller graph for this function:

◆ NodesAround() [2/2]

bool SMESH_OctreeNode::NodesAround ( const SMDS_MeshNode Node,
std::map< double, const SMDS_MeshNode *> &  dist2Nodes,
double  precision 
)

◆ FindCoincidentNodes() [1/3]

void SMESH_OctreeNode::FindCoincidentNodes ( std::set< const SMDS_MeshNode *> *  nodes,
const double  theTolerance,
std::list< std::list< const SMDS_MeshNode *> > *  theGroupsOfNodes 
)

Referenced by NbNodes(), and ~SMESH_OctreeNode().

Here is the caller graph for this function:

◆ FindCoincidentNodes() [2/3]

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

◆ UpdateByMoveNode()

void SMESH_OctreeNode::UpdateByMoveNode ( const SMDS_MeshNode node,
const gp_Pnt &  toPnt 
)

Update data according to node movement.

Referenced by ~SMESH_OctreeNode().

Here is the caller graph for this function:

◆ GetChildrenIterator()

SMESH_OctreeNodeIteratorPtr SMESH_OctreeNode::GetChildrenIterator ( )

Return iterator over children.

Referenced by ~SMESH_OctreeNode().

Here is the caller graph for this function:

◆ GetNodeIterator()

SMDS_NodeIteratorPtr SMESH_OctreeNode::GetNodeIterator ( )

Return nodes iterator.

Referenced by ~SMESH_OctreeNode().

Here is the caller graph for this function:

◆ NbNodes()

int SMESH_OctreeNode::NbNodes ( ) const

Return nb nodes in a tree.

Definition at line 104 of file SMESH_OctreeNode.hxx.

References allocateOctreeChild(), buildChildrenData(), buildRootBox(), FindCoincidentNodes(), myNodes, and SMESH_OctreeNode().

Here is the call graph for this function:

◆ buildRootBox()

virtual Bnd_B3d* SMESH_OctreeNode::buildRootBox ( )
protectedvirtual

Implements SMESH_Octree.

Referenced by NbNodes().

Here is the caller graph for this function:

◆ buildChildrenData()

virtual void SMESH_OctreeNode::buildChildrenData ( )
protectedvirtual

Implements SMESH_Octree.

Referenced by NbNodes().

Here is the caller graph for this function:

◆ allocateOctreeChild()

virtual SMESH_Octree* SMESH_OctreeNode::allocateOctreeChild ( ) const
protectedvirtual

Implements SMESH_Octree.

Referenced by NbNodes().

Here is the caller graph for this function:

◆ FindCoincidentNodes() [3/3]

void SMESH_OctreeNode::FindCoincidentNodes ( const SMDS_MeshNode Node,
std::set< const SMDS_MeshNode *> *  SetOfNodes,
std::list< const SMDS_MeshNode *> *  Result,
const double  precision 
)
protected

◆ compute()

void SMESH_Octree::compute ( )
inherited

Referenced by SMESH_Octree::Limit::~Limit().

Here is the caller graph for this function:

◆ isLeaf()

bool SMESH_Octree::isLeaf ( ) const
inherited

Referenced by SMESH_Octree::Limit::~Limit().

Here is the caller graph for this function:

◆ level()

int SMESH_Octree::level ( ) const
inherited

Definition at line 67 of file SMESH_Octree.hxx.

References SMESH_Octree::myLevel.

◆ getBox()

const Bnd_B3d& SMESH_Octree::getBox ( ) const
inherited

◆ maxSize()

double SMESH_Octree::maxSize ( ) const
inherited

Referenced by SMESH_Octree::getBox().

Here is the caller graph for this function:

◆ getChildIndex()

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

Return index of a child the given point is in.

Definition at line 118 of file SMESH_Octree.hxx.

Referenced by SMESH_Octree::getBox().

Here is the caller graph for this function:

Field Documentation

◆ myMaxNbNodes

int SMESH_OctreeNode::myMaxNbNodes
protected

Definition at line 126 of file SMESH_OctreeNode.hxx.

◆ myNodes

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

Definition at line 129 of file SMESH_OctreeNode.hxx.

Referenced by NbNodes().

◆ myChildren

SMESH_Octree** SMESH_Octree::myChildren
protectedinherited

Definition at line 91 of file SMESH_Octree.hxx.

◆ myFather

SMESH_Octree* SMESH_Octree::myFather
protectedinherited

Definition at line 94 of file SMESH_Octree.hxx.

◆ myIsLeaf

bool SMESH_Octree::myIsLeaf
protectedinherited

Definition at line 97 of file SMESH_Octree.hxx.

◆ myLimit

const Limit* SMESH_Octree::myLimit
protectedinherited

Definition at line 100 of file SMESH_Octree.hxx.