| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/container/spacetree.h>

Public Types | |
| typedef SpaceTree< StaticNode < CONTENT >, DIM > | BaseClass |
| typedef SpaceTree< StaticNode < CONTENT >, DIM > ::NodePointer | NodePointer |
| typedef SpaceTreePath< DIM > | Path |
| typedef StaticNode< CONTENT > | Node |
Public Member Functions | |
| VRS_TYPEINFO (StaticSpaceTree, BaseClass) | |
| VRS_SERIALIZABLE (StaticSpaceTree) | |
| StaticSpaceTree (const Cell< DIM > &mainCell, UINT depth) | |
| virtual | ~StaticSpaceTree () |
| UINT | getSize () const |
| UINT | getDepth () const |
| child, parent and path access | |
| virtual NodePointer | getRoot () |
| virtual NodePointer | getParent (const NodePointer &node) |
| virtual NodePointer | getChild (const NodePointer &node, ChildNumber childNumber) |
| virtual ChildNumber | getChildNumber (const NodePointer &node) const |
| Optimized overloads of the default implementations that utilize the static structure. | |
| virtual SpaceTreePath< DIM > | getPath (const NodePointer &node) const |
| virtual NodePointer | getNode (const SpaceTreePath< DIM > &path) |
Protected Member Functions | |
| StaticSpaceTree (UINT depth) | |
| typedef SpaceTree<StaticNode<CONTENT>, DIM> VRS::StaticSpaceTree< CONTENT, DIM >::BaseClass |
| typedef SpaceTree<StaticNode<CONTENT>, DIM>::NodePointer VRS::StaticSpaceTree< CONTENT, DIM >::NodePointer |
Reimplemented in VRS::StaticOctree< CONTENT >, and VRS::StaticQuadtree< CONTENT >.
| typedef SpaceTreePath<DIM> VRS::StaticSpaceTree< CONTENT, DIM >::Path |
The original declaration of the following methods are part of a quite unreadable code section that need not to be read to understand how to use a SpaceTree. Therefore their declarations are repeated here: template<typename POINTSET,typename INCLUSIONTEST> SpaceTreePath<DIM> findSmallestEnclosingNode( const POINTSET& pointSet, UINT maxLevel = Path::MaxPathLength(), bool mustExist = true, INCLUSIONTEST test = DefaultInclusionTest<POINTSET>()); Returns the longest path that leads to a node whose cell completely encloses a given point set. If the path length attains "maxLevel", the search is aborted and the path of length maxLevel is returned. Not that the length of a path cannot exceed Path::MaxPathLength(). If "mustExist" is true, only existing nodes are considered. Otherwise the result can be a path leading to a still not existing node, whose cell would enclose the point set. The parameter "test" is a function object that provides an operator() with two parameters pointSet and cell, that returns true if the pointSet is contained in the cell. You can see how to realize the function object on the example of the DefaultIntersectionTest class (see below). If POINTSET provides a method isContainedIn(Cell), the test parameter can be left out. template<typename POINTSET, typename INTERSECTIONTEST> Iterator<SpaceTreePath<DIM> >* findIntersectingNodes( const POINTSET& pointSet, UINT level, bool mustExist = true, INTERSECTIONTEST test = DefaultIntersectionTest<POINTSET>()); Returns an iterator of paths to all nodes on a specified tree level that intersect a given point set. For the "mustExist" parameter see above. The intersection test of a point set and a cell is performed similar to the inclusion test above. The parameter "test" can be left out if POINTSET provides a method intersects(Cell). template<typename POINTSET, typename INCLUSIONTEST> Iterator<SpaceTreePath<DIM> >* findEnclosingNodes( const POINTSET& pointSet, UINT level, bool mustExist, INCLUSIONTEST test) { This method is only useful for derivates of SpaceTree that enable overlapping cells. Otherwise the result is empty or contains exactly one element,
Reimplemented from VRS::SpaceTree< NODE, DIM >.
Reimplemented in VRS::StaticOctree< CONTENT >, and VRS::StaticQuadtree< CONTENT >.
| typedef StaticNode<CONTENT> VRS::StaticSpaceTree< CONTENT, DIM >::Node |
| VRS::StaticSpaceTree< CONTENT, DIM >::StaticSpaceTree | ( | const Cell< DIM > & | mainCell, | |
| UINT | depth | |||
| ) |
| virtual VRS::StaticSpaceTree< CONTENT, DIM >::~StaticSpaceTree | ( | ) | [virtual] |
| VRS::StaticSpaceTree< CONTENT, DIM >::StaticSpaceTree | ( | UINT | depth | ) | [protected] |
| VRS::StaticSpaceTree< CONTENT, DIM >::VRS_TYPEINFO | ( | StaticSpaceTree< CONTENT, DIM > | , | |
| BaseClass | ||||
| ) |
| VRS::StaticSpaceTree< CONTENT, DIM >::VRS_SERIALIZABLE | ( | StaticSpaceTree< CONTENT, DIM > | ) |
| UINT VRS::StaticSpaceTree< CONTENT, DIM >::getSize | ( | ) | const |
| UINT VRS::StaticSpaceTree< CONTENT, DIM >::getDepth | ( | ) | const |
child, parent and path access
| virtual NodePointer VRS::StaticSpaceTree< CONTENT, DIM >::getRoot | ( | ) | [virtual] |
Each node access is done by an via NodePointers. A NodePointer provides access to a specific node of a specific tree similar to a usual pointer by * and -> operator. Using invalid NodePointers causes an assertion. Invalid pointers are return for example if a requested node does not exist. The NodePointer provides a validity check method valid(). Note: If a node of a tree is deleted, all existing NodePointers pointing to any nodes of the tree become invalid. Basic SpaceTree access methods. If you want to derive a class from SpaceTree, please note: It is assumed that the first three of the methods below return an invalid NodePointer if the requested Node does not exist.
Implements VRS::SpaceTree< NODE, DIM >.
| virtual NodePointer VRS::StaticSpaceTree< CONTENT, DIM >::getParent | ( | const NodePointer & | node | ) | [virtual] |
Implements VRS::SpaceTree< NODE, DIM >.
| virtual NodePointer VRS::StaticSpaceTree< CONTENT, DIM >::getChild | ( | const NodePointer & | node, | |
| ChildNumber | childNumber | |||
| ) | [virtual] |
Implements VRS::SpaceTree< NODE, DIM >.
| virtual ChildNumber VRS::StaticSpaceTree< CONTENT, DIM >::getChildNumber | ( | const NodePointer & | node | ) | const [virtual] |
Optimized overloads of the default implementations that utilize the static structure.
Implements VRS::SpaceTree< NODE, DIM >.
| virtual SpaceTreePath<DIM> VRS::StaticSpaceTree< CONTENT, DIM >::getPath | ( | const NodePointer & | node | ) | const [virtual] |
Reimplemented from VRS::SpaceTree< NODE, DIM >.
| virtual NodePointer VRS::StaticSpaceTree< CONTENT, DIM >::getNode | ( | const SpaceTreePath< DIM > & | path | ) | [virtual] |
Reimplemented from VRS::SpaceTree< NODE, DIM >.