library of assembled shared sources

http://lass.cocamware.com

lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode Struct Reference

Collaboration diagram for lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode:

Collaboration graph
[legend]

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

QuadNodenode [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

Detailed Description

template<class ObjectType, class ObjectTraits = DefaultObjectTraits<ObjectType>>
struct lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode

Definition at line 198 of file quad_tree.h.


Constructor & Destructor Documentation

template<typename O , typename OT >
lass::spat::QuadTree< O, OT >::QuadNode::QuadNode ( const TPoint aCenter,
const TVector aExtents 
) [inline]

template<typename O , typename OT >
lass::spat::QuadTree< O, OT >::QuadNode::~QuadNode (  )  [inline]


Member Function Documentation

template<typename O , typename OT >
void lass::spat::QuadTree< O, OT >::QuadNode::add ( TObjectIterator  object,
size_t  maxSize,
size_t  maxLevel,
size_t  level = 0,
bool  mayDecompose = true 
) [inline]

template<typename O , typename OT >
size_t lass::spat::QuadTree< O, OT >::QuadNode::objectCount (  )  const [inline]

template<typename O , typename OT >
size_t lass::spat::QuadTree< O, OT >::QuadNode::depth (  )  const [inline]

template<typename O , typename OT >
const QuadTree< O, OT >::TValue lass::spat::QuadTree< O, OT >::QuadNode::averageDepth (  )  const [inline]

template<typename O , typename OT >
void lass::spat::QuadTree< O, OT >::QuadNode::decompose ( size_t  maxSize,
size_t  maxLevel,
size_t  level = 0 
) [inline]

template<typename O , typename OT >
void lass::spat::QuadTree< O, OT >::QuadNode::absorb (  )  [inline]

template<typename O , typename OT >
QuadTree< O, OT >::TAabb lass::spat::QuadTree< O, OT >::QuadNode::aabb (  )  const [inline]


Field Documentation

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>>
QuadNode* lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::node[subNodeCount]

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>>
TPoint lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::center

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>>
TVector lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::extents

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>>
TObjectIterators lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::data

template<class ObjectType , class ObjectTraits = DefaultObjectTraits<ObjectType>>
bool lass::spat::QuadTree< ObjectType, ObjectTraits >::QuadNode::leaf


The documentation for this struct was generated from the following files:

Generated on Mon Nov 10 14:22:15 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo