library of assembled shared sources |
http://lass.cocamware.com |
Public Member Functions | |
QuadNode (const TPoint &aCenter, const TVector &aExtents) | |
~QuadNode () | |
void | add (TObjectIterator object, size_t maxSize, size_t maxLevel, size_t level=0, bool mayDecompose=true) |
size_t | objectCount () const |
number of objects in this node and all its children | |
size_t | depth () const |
depth of the child tree | |
const TValue | averageDepth () const |
void | decompose (size_t maxSize, size_t maxLevel, size_t level=0) |
split the current node into 4 children | |
void | absorb () |
absorb all children into the current node | |
TAabb | aabb () const |
Data Fields | |
QuadNode * | node [subNodeCount] |
0 = NW, 1 = NE, 2 = SE, 3 = SW for quadtrees | |
TPoint | center |
center of quadnode | |
TVector | extents |
x = half of widht, y = half of height | |
TObjectIterators | data |
the list containing the data | |
bool | leaf |
true for leaf nodes |
Definition at line 198 of file quad_tree.h.
lass::spat::QuadTree< O, OT >::QuadNode::QuadNode | ( | const TPoint & | aCenter, | |
const TVector & | aExtents | |||
) | [inline] |
Definition at line 682 of file quad_tree.inl.
References lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::node, and lass::spat::QuadTree< ObjectType, ObjectTraits >::subNodeCount.
lass::spat::QuadTree< O, OT >::QuadNode::~QuadNode | ( | ) | [inline] |
Definition at line 691 of file quad_tree.inl.
References lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::node, and lass::spat::QuadTree< ObjectType, ObjectTraits >::subNodeCount.
void lass::spat::QuadTree< O, OT >::QuadNode::add | ( | TObjectIterator | object, | |
size_t | maxSize, | |||
size_t | maxLevel, | |||
size_t | level = 0 , |
|||
bool | mayDecompose = true | |||
) | [inline] |
Definition at line 718 of file quad_tree.inl.
References lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::aabb(), lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::add(), lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::data, lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::decompose(), lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::leaf, lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::node, and lass::spat::QuadTree< ObjectType, ObjectTraits >::subNodeCount.
Referenced by lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::add(), lass::spat::QuadTree< ObjectType, ObjectTraits >::add(), and lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::decompose().
size_t lass::spat::QuadTree< O, OT >::QuadNode::objectCount | ( | ) | const [inline] |
number of objects in this node and all its children
Definition at line 704 of file quad_tree.inl.
References lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::data, lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::node, lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::objectCount(), and lass::spat::QuadTree< ObjectType, ObjectTraits >::subNodeCount.
Referenced by lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::objectCount(), and lass::spat::QuadTree< ObjectType, ObjectTraits >::objectCount().
size_t lass::spat::QuadTree< O, OT >::QuadNode::depth | ( | ) | const [inline] |
depth of the child tree
Definition at line 820 of file quad_tree.inl.
References lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::depth(), lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::leaf, lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::node, and lass::spat::QuadTree< ObjectType, ObjectTraits >::subNodeCount.
Referenced by lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::averageDepth(), lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::depth(), and lass::spat::QuadTree< ObjectType, ObjectTraits >::depth().
const QuadTree< O, OT >::TValue lass::spat::QuadTree< O, OT >::QuadNode::averageDepth | ( | ) | const [inline] |
Definition at line 835 of file quad_tree.inl.
References lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::depth(), lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::leaf, lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::node, and lass::spat::QuadTree< ObjectType, ObjectTraits >::subNodeCount.
Referenced by lass::spat::QuadTree< ObjectType, ObjectTraits >::averageDepth().
void lass::spat::QuadTree< O, OT >::QuadNode::decompose | ( | size_t | maxSize, | |
size_t | maxLevel, | |||
size_t | level = 0 | |||
) | [inline] |
split the current node into 4 children
Definition at line 762 of file quad_tree.inl.
References lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::aabb(), lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::add(), lass::spat::impl::QuadTreeHelper< ObjectTraits, ObjectTraits::dimension >::buildSubNodes(), lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::data, lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::leaf, lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::node, and lass::spat::QuadTree< ObjectType, ObjectTraits >::subNodeCount.
Referenced by lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::add().
void lass::spat::QuadTree< O, OT >::QuadNode::absorb | ( | ) | [inline] |
absorb all children into the current node
Definition at line 800 of file quad_tree.inl.
References lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::absorb(), lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::data, lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::leaf, lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::node, and lass::spat::QuadTree< ObjectType, ObjectTraits >::subNodeCount.
Referenced by lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::absorb().
QuadTree< O, OT >::TAabb lass::spat::QuadTree< O, OT >::QuadNode::aabb | ( | ) | const [inline] |
Definition at line 744 of file quad_tree.inl.
References lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::center, and lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::extents.
Referenced by lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::add(), and lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::decompose().
QuadNode* lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::node[subNodeCount] |
0 = NW, 1 = NE, 2 = SE, 3 = SW for quadtrees
Definition at line 200 of file quad_tree.h.
Referenced by lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::absorb(), lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::add(), lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::averageDepth(), lass::spat::QuadTree< ObjectType, ObjectTraits >::contains(), lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::decompose(), lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::depth(), lass::spat::QuadTree< ObjectType, ObjectTraits >::doIntersect(), lass::spat::QuadTree< ObjectType, ObjectTraits >::doIntersects(), lass::spat::QuadTree< ObjectType, ObjectTraits >::doNearestNeighbour(), lass::spat::QuadTree< ObjectType, ObjectTraits >::doRangeSearch(), lass::spat::QuadTree< ObjectType, ObjectTraits >::find(), lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::objectCount(), lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::QuadNode(), and lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::~QuadNode().
TPoint lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::center |
center of quadnode
Definition at line 201 of file quad_tree.h.
Referenced by lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::aabb(), lass::spat::QuadTree< ObjectType, ObjectTraits >::contains(), lass::spat::QuadTree< ObjectType, ObjectTraits >::doNearestNeighbour(), lass::spat::QuadTree< ObjectType, ObjectTraits >::doRangeSearch(), and lass::spat::QuadTree< ObjectType, ObjectTraits >::find().
TVector lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::extents |
x = half of widht, y = half of height
Definition at line 202 of file quad_tree.h.
Referenced by lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::aabb(), lass::spat::QuadTree< ObjectType, ObjectTraits >::doNearestNeighbour(), and lass::spat::QuadTree< ObjectType, ObjectTraits >::doRangeSearch().
TObjectIterators lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::data |
the list containing the data
Definition at line 203 of file quad_tree.h.
Referenced by lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::absorb(), lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::add(), lass::spat::QuadTree< ObjectType, ObjectTraits >::contains(), lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::decompose(), lass::spat::QuadTree< ObjectType, ObjectTraits >::doIntersect(), lass::spat::QuadTree< ObjectType, ObjectTraits >::doIntersects(), lass::spat::QuadTree< ObjectType, ObjectTraits >::doNearestNeighbour(), lass::spat::QuadTree< ObjectType, ObjectTraits >::doRangeSearch(), lass::spat::QuadTree< ObjectType, ObjectTraits >::find(), and lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::objectCount().
bool lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::leaf |
true for leaf nodes
Definition at line 204 of file quad_tree.h.
Referenced by lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::absorb(), lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::add(), lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::averageDepth(), lass::spat::QuadTree< ObjectType, ObjectTraits >::contains(), lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::decompose(), lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::depth(), lass::spat::QuadTree< ObjectType, ObjectTraits >::doIntersect(), lass::spat::QuadTree< ObjectType, ObjectTraits >::doIntersects(), lass::spat::QuadTree< ObjectType, ObjectTraits >::doNearestNeighbour(), lass::spat::QuadTree< ObjectType, ObjectTraits >::doRangeSearch(), and lass::spat::QuadTree< ObjectType, ObjectTraits >::find().
Generated on Mon Nov 10 14:22:15 2008 for Library of Assembled Shared Sources by 1.5.7.1 |