Version: 9.16.0
VISCOUS_2D::_SegmentTree Struct Reference

Tree of _Segment's used for a faster search of _Segment's. More...

Inheritance diagram for VISCOUS_2D::_SegmentTree:

Data Structures

struct  _SegBox
 

Public Types

typedef boost::shared_ptr< _SegmentTreePtr
 
typedef SMESH_Tree< Bnd_B2d, 4 > TBaseTree
 
typedef Bnd_B2d box_type
 

Public Member Functions

 _SegmentTree (const vector< _Segment > &segments)
 Constructor of SegmentTree. More...
 
void GetSegmentsNear (const _Segment &seg, vector< const _Segment * > &found)
 Return elements which can include the point. More...
 
void GetSegmentsNear (const gp_Ax2d &ray, vector< const _Segment * > &found)
 Return segments intersecting a ray. 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

 _SegmentTree ()
 
_SegmentTreenewChild () const
 
void buildChildrenData ()
 Redistribute _segments among children. More...
 
Bnd_B2d * buildRootBox ()
 Return the maximal bnd box. More...
 
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...
 
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
 

Static Private Member Functions

static int maxNbSegInLeaf ()
 

Private Attributes

vector< _SegBox_segments
 

Detailed Description

Tree of _Segment's used for a faster search of _Segment's.

Member Typedef Documentation

◆ box_type

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

◆ Ptr

typedef boost::shared_ptr< _SegmentTree > VISCOUS_2D::_SegmentTree::Ptr

◆ TBaseTree

typedef SMESH_Tree< Bnd_B2d, 4> SMESH_Quadtree::TBaseTree
inherited

Constructor & Destructor Documentation

◆ _SegmentTree() [1/2]

_SegmentTree::_SegmentTree ( const vector< _Segment > &  segments)

Constructor of SegmentTree.

References _segments, and SMESH_Tree< Bnd_B2d, 4 >::compute().

◆ _SegmentTree() [2/2]

VISCOUS_2D::_SegmentTree::_SegmentTree ( )
protected

Referenced by newChild().

Member Function Documentation

◆ buildChildren()

void SMESH_Tree< Bnd_B2d , NB_CHILDREN >::buildChildren
protectedinherited

Build the children boxes and call buildChildrenData()

◆ buildChildrenData()

◆ buildRootBox()

_SegmentTree::box_type * _SegmentTree::buildRootBox ( )
protectedvirtual

Return the maximal bnd box.

Implements SMESH_Tree< Bnd_B2d, 4 >.

References _segments.

◆ compute()

void SMESH_Tree< Bnd_B2d , NB_CHILDREN >::compute
inherited

Compute the Tree.

◆ enlargeByFactor()

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

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.

◆ GetSegmentsNear() [1/2]

void _SegmentTree::GetSegmentsNear ( const _Segment seg,
vector< const _Segment * > &  found 
)

◆ GetSegmentsNear() [2/2]

void _SegmentTree::GetSegmentsNear ( const gp_Ax2d &  ray,
vector< const _Segment * > &  found 
)

◆ 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

◆ maxNbSegInLeaf()

static int VISCOUS_2D::_SegmentTree::maxNbSegInLeaf ( )
staticprivate

Referenced by buildChildrenData().

◆ maxSize()

double SMESH_Quadtree::maxSize ( ) const
virtualinherited

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

_SegmentTree * VISCOUS_2D::_SegmentTree::newChild ( ) const
protectedvirtual

Implements SMESH_Tree< Bnd_B2d, 4 >.

References _SegmentTree().

◆ newChildBox()

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

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

◆ _segments

vector< _SegBox > VISCOUS_2D::_SegmentTree::_segments
private

◆ 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