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

Public Types | |
| typedef SpaceTreePath< 2 > | Path |
| typedef StaticSpaceTree < CONTENT, 2 >::NodePointer | NodePointer |
Public Member Functions | |
| StaticQuadtree (const Vector &p1, const Vector &p2, UINT depth, const Vector &xAxis=Vector(1, 0, 0), const Vector &yAxis=Vector(0, 1, 0)) | |
| SpaceTreePath< 2 > | findContainingNode (const Vector &point, UINT level, bool mustExist=true) |
| Iterator< SpaceTreePath< 2 > > * | findBoundsIntersectingNodes (const Bounds &bounds, UINT level, bool mustExist=true) |
| SpaceTreePath< 2 > | findSmallestBoundsEnclosingNode (const Bounds &bounds, UINT maxLevel=16, bool mustExist=true) |
| virtual QuadtreeCell | getQuadtreeCell (const Path &path) |
| virtual QuadtreeCell | getQuadtreeCell (const NodePointer &np) |
| const Matrix & | getTransform () |
| const Matrix & | getInverseTransform () |
| typedef SpaceTreePath<2> VRS::StaticQuadtree< 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::StaticSpaceTree< CONTENT, 2 >.
| typedef StaticSpaceTree<CONTENT, 2>::NodePointer VRS::StaticQuadtree< CONTENT >::NodePointer |
Reimplemented from VRS::StaticSpaceTree< CONTENT, 2 >.
| VRS::StaticQuadtree< CONTENT >::StaticQuadtree | ( | const Vector & | p1, | |
| const Vector & | p2, | |||
| UINT | depth, | |||
| const Vector & | xAxis = Vector(1, 0, 0), |
|||
| const Vector & | yAxis = Vector(0, 1, 0) | |||
| ) |
| SpaceTreePath<2> VRS::StaticQuadtree< CONTENT >::findContainingNode | ( | const Vector & | point, | |
| UINT | level, | |||
| bool | mustExist = true | |||
| ) |
| Iterator<SpaceTreePath<2> >* VRS::StaticQuadtree< CONTENT >::findBoundsIntersectingNodes | ( | const Bounds & | bounds, | |
| UINT | level, | |||
| bool | mustExist = true | |||
| ) |
| SpaceTreePath<2> VRS::StaticQuadtree< CONTENT >::findSmallestBoundsEnclosingNode | ( | const Bounds & | bounds, | |
| UINT | maxLevel = 16, |
|||
| bool | mustExist = true | |||
| ) |
| virtual QuadtreeCell VRS::StaticQuadtree< CONTENT >::getQuadtreeCell | ( | const Path & | path | ) | [virtual] |
| virtual QuadtreeCell VRS::StaticQuadtree< CONTENT >::getQuadtreeCell | ( | const NodePointer & | np | ) | [virtual] |
| const Matrix& VRS::StaticQuadtree< CONTENT >::getTransform | ( | ) |
| const Matrix& VRS::StaticQuadtree< CONTENT >::getInverseTransform | ( | ) |