Version: 8.3.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
< _SegmentTree
Ptr
 
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 ()
 
bool isLeaf () const
 
int level () const
 
const box_typegetBox () const
 
int getHeight (const bool full=true) const
 

Static Public Member Functions

static int nbChildren ()
 

Protected Member Functions

 _SegmentTree ()
 
_SegmentTreenewChild () const
 
void buildChildrenData ()
 Redistrubute _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 ()
 

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

typedef Bnd_B2d SMESH_Tree< Bnd_B2d , NB_CHILDREN >::box_type
inherited
typedef boost::shared_ptr< _SegmentTree > VISCOUS_2D::_SegmentTree::Ptr
typedef SMESH_Tree< Bnd_B2d, 4> SMESH_Quadtree::TBaseTree
inherited

Constructor & Destructor Documentation

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

Constructor of SegmentTree.

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

VISCOUS_2D::_SegmentTree::_SegmentTree ( )
protected

Member Function Documentation

void SMESH_Tree< Bnd_B2d , NB_CHILDREN >::buildChildren ( )
protectedinherited

Build the children boxes and call buildChildrenData()

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

Return the maximal bnd box.

Implements SMESH_Tree< Bnd_B2d, 4 >.

References _segments.

void SMESH_Tree< Bnd_B2d , NB_CHILDREN >::compute ( )
inherited

Compute the Tree.

Referenced by _SegmentTree().

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

const box_type* SMESH_Tree< Bnd_B2d , NB_CHILDREN >::getBox ( ) const
inherited
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.

void _SegmentTree::GetSegmentsNear ( const _Segment seg,
vector< const _Segment * > &  found 
)
void _SegmentTree::GetSegmentsNear ( const gp_Ax2d &  ray,
vector< const _Segment * > &  found 
)
bool SMESH_Tree< Bnd_B2d , NB_CHILDREN >::isLeaf ( ) const
inherited

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

Referenced by GetSegmentsNear().

int SMESH_Tree< Bnd_B2d , NB_CHILDREN >::level ( ) const
inherited
static int VISCOUS_2D::_SegmentTree::maxNbSegInLeaf ( )
staticprivate

Referenced by buildChildrenData().

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

static int SMESH_Tree< Bnd_B2d , NB_CHILDREN >::nbChildren ( )
staticinherited
_SegmentTree* VISCOUS_2D::_SegmentTree::newChild ( ) const
protectedvirtual
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

vector< _SegBox > VISCOUS_2D::_SegmentTree::_segments
private
box_type* SMESH_Tree< Bnd_B2d , NB_CHILDREN >::myBox
protectedinherited
SMESH_Tree** SMESH_Tree< Bnd_B2d , NB_CHILDREN >::myChildren
protectedinherited
SMESH_Tree* SMESH_Tree< Bnd_B2d , NB_CHILDREN >::myFather
protectedinherited
bool SMESH_Tree< Bnd_B2d , NB_CHILDREN >::myIsLeaf
protectedinherited
int SMESH_Tree< Bnd_B2d , NB_CHILDREN >::myLevel
protectedinherited
const SMESH_TreeLimit* SMESH_Tree< Bnd_B2d , NB_CHILDREN >::myLimit
protectedinherited