Tree of _Segment's used for a faster search of _Segment's. More...
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_type * | getBox () const |
int | getHeight (const bool full=true) const |
Static Public Member Functions | |
static int | nbChildren () |
Protected Member Functions | |
_SegmentTree () | |
_SegmentTree * | newChild () 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_Tree * | myFather |
bool | myIsLeaf |
const SMESH_TreeLimit * | myLimit |
box_type * | myBox |
int | myLevel |
Static Private Member Functions | |
static int | maxNbSegInLeaf () |
Private Attributes | |
vector< _SegBox > | _segments |
|
inherited |
typedef boost::shared_ptr< _SegmentTree > VISCOUS_2D::_SegmentTree::Ptr |
|
inherited |
_SegmentTree::_SegmentTree | ( | const vector< _Segment > & | segments | ) |
Constructor of SegmentTree.
References _segments, and SMESH_Tree< Bnd_B2d, 4 >::compute().
|
protected |
|
protectedinherited |
Build the children boxes and call buildChildrenData()
|
protectedvirtual |
Redistrubute _segments among children.
Implements SMESH_Tree< Bnd_B2d, 4 >.
References _segments, SMESHUtils::FreeVector(), SMESH_Tree< Bnd_B2d, 4 >::getBox(), maxNbSegInLeaf(), SMESH_Tree< Bnd_B2d, 4 >::myChildren, SMESH_Tree< BND_BOX, NB_CHILDREN >::myIsLeaf, and SMESH_Tree< Bnd_B2d, 4 >::nbChildren().
|
protectedvirtual |
|
inherited |
Compute the Tree.
Referenced by _SegmentTree().
|
protectedvirtualinherited |
Change size of a box by a factor; each dimension changes independently of others.
Implements SMESH_Tree< Bnd_B2d, 4 >.
|
inherited |
Referenced by buildChildrenData(), GetSegmentsNear(), SMESH_Quadtree::maxSize(), and SMESH_Quadtree::newChildBox().
|
inherited |
Return height of the tree, full or from this level to topest leaf.
Return elements which can include the point.
References _segments, VISCOUS_2D::_Segment::_uv, SMESH_Tree< Bnd_B2d, 4 >::getBox(), SMESH_Tree< Bnd_B2d, 4 >::isLeaf(), SMESH_MeshAlgos::IsOut(), SMESH_Tree< Bnd_B2d, 4 >::myChildren, and SMESH_Tree< Bnd_B2d, 4 >::nbChildren().
Referenced by GetSegmentsNear().
void _SegmentTree::GetSegmentsNear | ( | const gp_Ax2d & | ray, |
vector< const _Segment * > & | found | ||
) |
Return segments intersecting a ray.
References _segments, SMESH_Tree< Bnd_B2d, 4 >::getBox(), GetSegmentsNear(), SMESH_Tree< Bnd_B2d, 4 >::isLeaf(), SMESH_MeshAlgos::IsOut(), SMESH_Tree< Bnd_B2d, 4 >::myChildren, and SMESH_Tree< Bnd_B2d, 4 >::nbChildren().
|
inherited |
Tell if Tree is a leaf or not An inheriting class can influence it via myIsLeaf protected field.
Referenced by GetSegmentsNear().
|
inherited |
|
staticprivate |
Referenced by buildChildrenData().
|
virtualinherited |
Compute the bigger dimension of my box.
Implements SMESH_Tree< Bnd_B2d, 4 >.
References SMESH_Tree< Bnd_B2d, 4 >::getBox().
|
staticinherited |
Referenced by buildChildrenData(), and GetSegmentsNear().
|
protectedvirtual |
Implements SMESH_Tree< Bnd_B2d, 4 >.
|
protectedvirtualinherited |
Allocate a bndbox according to childIndex.
childIndex is zero based
Implements SMESH_Tree< Bnd_B2d, 4 >.
References SMESH_Tree< Bnd_B2d, 4 >::getBox().
|
private |
Referenced by _SegmentTree(), buildChildrenData(), buildRootBox(), and GetSegmentsNear().
|
protectedinherited |
|
protectedinherited |
Referenced by buildChildrenData(), and GetSegmentsNear().
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |