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

Public Types | |
| typedef SpaceTreePath< 3 > | Path |
| typedef DynamicSpaceTree < CONTENT, 3 >::NodePointer | NodePointer |
Public Member Functions | |
| DynamicOctree (const Bounds &bounds) | |
| SpaceTreePath< 3 > | findContainingNode (const Vector &point, UINT level, bool mustExist=true) |
| Iterator< SpaceTreePath< 3 > > * | findBoundsIntersectingNodes (const Bounds &bounds, UINT level, bool mustExist=true) |
| SpaceTreePath< 3 > | findSmallestBoundsEnclosingNode (const Bounds &bounds, UINT maxLevel=16, bool mustExist=true) |
See spacetree.h for further information.
| typedef SpaceTreePath<3> VRS::DynamicOctree< CONTENT >::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::DynamicSpaceTree< CONTENT, 3 >.
| typedef DynamicSpaceTree<CONTENT, 3>::NodePointer VRS::DynamicOctree< CONTENT >::NodePointer |
Reimplemented from VRS::DynamicSpaceTree< CONTENT, 3 >.
| VRS::DynamicOctree< CONTENT >::DynamicOctree | ( | const Bounds & | bounds | ) | [inline] |
| SpaceTreePath< 3 > VRS::DynamicOctree< CONTENT >::findContainingNode | ( | const Vector & | point, | |
| UINT | level, | |||
| bool | mustExist = true | |||
| ) | [inline] |
| Iterator< SpaceTreePath< 3 > > * VRS::DynamicOctree< CONTENT >::findBoundsIntersectingNodes | ( | const Bounds & | bounds, | |
| UINT | level, | |||
| bool | mustExist = true | |||
| ) | [inline] |
| SpaceTreePath< 3 > VRS::DynamicOctree< CONTENT >::findSmallestBoundsEnclosingNode | ( | const Bounds & | bounds, | |
| UINT | maxLevel = 16, |
|||
| bool | mustExist = true | |||
| ) | [inline] |