| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/container/spacetree.h>
Public Member Functions | |
| SpaceTreePath () | |
| SpaceTreePath (const SpaceTreePath< DIM > &other) | |
| SpaceTreePath (Iterator< ChildNumber > *childNumbers) | |
| SpaceTreePath | getChild (ChildNumber childNumber) const |
| SpaceTreePath | getParent () const |
| ChildNumber | getChildNumber () const |
| bool | getNeighbor (UINT directionBitCode) |
| Iterator< SpaceTreePath > * | getNeighbors () const |
| bool | getMainAxisNeighbor (UINT direction) |
| bool | isRoot () const |
| UINT | getLength () const |
| bool | valid () const |
| Iterator< ChildNumber > * | newIterator () const |
| const SpaceTreePath & | operator= (const SpaceTreePath &other) |
| bool | operator== (const SpaceTreePath &other) const |
| bool | operator< (const SpaceTreePath &other) const |
| bool | operator!= (const SpaceTreePath &other) const |
| SpaceTreePath (UINT pathCode) | |
| UINT | getPathCode () const |
| void | setPathCode (UINT c) |
Static Public Member Functions | |
| static Iterator< SpaceTreePath > * | newLevelIterator (UINT level) |
| static SO< Iterator < SpaceTreePath > > | newSubTreeLevelIterator (SpaceTreePath subTreeRoot, unsigned int level) |
| static UINT | MaxPathLength () |
Static Public Attributes | |
| static const UINT | Left |
| smaller x | |
| static const UINT | Right |
| greater x | |
| static const UINT | Down |
| smaller y | |
| static const UINT | Up |
| greater y | |
| static const UINT | Front |
| smaller z | |
| static const UINT | Back |
| greater z | |
| static const ChildNumber | MaxChilds |
| static const ChildNumber | InvalidChildNumber |
| static const SpaceTreePath | InvalidPath |
| VRS::SpaceTreePath< DIM >::SpaceTreePath | ( | ) |
| VRS::SpaceTreePath< DIM >::SpaceTreePath | ( | const SpaceTreePath< DIM > & | other | ) |
| VRS::SpaceTreePath< DIM >::SpaceTreePath | ( | Iterator< ChildNumber > * | childNumbers | ) |
| VRS::SpaceTreePath< DIM >::SpaceTreePath | ( | UINT | pathCode | ) |
| SpaceTreePath VRS::SpaceTreePath< DIM >::getChild | ( | ChildNumber | childNumber | ) | const |
returns the path to the given child node.
| SpaceTreePath VRS::SpaceTreePath< DIM >::getParent | ( | ) | const |
returns the parent node or an invalid Path, if the current path defines the root.
| ChildNumber VRS::SpaceTreePath< DIM >::getChildNumber | ( | ) | const |
getChildNumber() returns k if the currently represented node n is the k-th child of another node. if n ist the root, InvalidChildNumber is returned.
| bool VRS::SpaceTreePath< DIM >::getNeighbor | ( | UINT | directionBitCode | ) |
getNeighbor() changes the path, so that it leads to the neighbor in the specified direction. The return value is false only if such a neighbor cannot exist even in a complete tree. For example if you call getNeighbor(left) for a path, that leads to a leftmost node. For Dim<4 you do not need to calculate directionBitCodes, but can use the static constants left, right, etc. (see below) and combine them by bitwise or.
For DIM>4 the directionBitCode can be found as follows: To specify a direction of a neighbor in the "Dim"-dimensional space, you have to choose for each main axis if the position vector of the cell of the neighbor should have a smaller, equal or greater value in the corresponding component as the position vector of the currently represented node. Assign a 2-bit code to each case, namely 00 = equal, 01 = smaller, 10 = greater. Now connect the 2-bit values of each axis to a single number, where the first coordinate axis is represented by the 2 bits of lowest value. The system can be understood by first looking at a simpler case like Dim=2: If you want to find the directionBitCode for the upper right neighbor, the bitcodes for both main coordinate axes are 01 and 10.
bitvalue: 1 2 4 8 bit: 0 1 1 0
Therefore the bitcode is 6.
| Iterator<SpaceTreePath>* VRS::SpaceTreePath< DIM >::getNeighbors | ( | ) | const |
Returns an Iterator of paths to all neighbors of the currently represented node. Normally the number of these neighbors is 3^DIM-1, but it can be less (for boundary nodes).
| bool VRS::SpaceTreePath< DIM >::getMainAxisNeighbor | ( | UINT | direction | ) |
Simple neighbor access without the option of finding diagonal neighbors. The directions is specified as follows: 0 = left (lower x) 1 = right (greater x) 2 = up (lower y) 3 = down (greater y) ...
| bool VRS::SpaceTreePath< DIM >::isRoot | ( | ) | const |
| UINT VRS::SpaceTreePath< DIM >::getLength | ( | ) | const |
| bool VRS::SpaceTreePath< DIM >::valid | ( | ) | const |
| Iterator<ChildNumber>* VRS::SpaceTreePath< DIM >::newIterator | ( | ) | const |
| const SpaceTreePath& VRS::SpaceTreePath< DIM >::operator= | ( | const SpaceTreePath< DIM > & | other | ) |
| bool VRS::SpaceTreePath< DIM >::operator== | ( | const SpaceTreePath< DIM > & | other | ) | const |
| bool VRS::SpaceTreePath< DIM >::operator< | ( | const SpaceTreePath< DIM > & | other | ) | const |
| bool VRS::SpaceTreePath< DIM >::operator!= | ( | const SpaceTreePath< DIM > & | other | ) | const |
| static Iterator<SpaceTreePath>* VRS::SpaceTreePath< DIM >::newLevelIterator | ( | UINT | level | ) | [static] |
| static SO<Iterator<SpaceTreePath> > VRS::SpaceTreePath< DIM >::newSubTreeLevelIterator | ( | SpaceTreePath< DIM > | subTreeRoot, | |
| unsigned int | level | |||
| ) | [static] |
Creates an iterator containing paths to all nodes on the given level of the subtree with root 'path'. Direction constants for the first three dimensions. Note that the definitions of Left/Right, Up/Down, or Forward/Backward can be inverted dependent on the used coordinate system. The comments on the right give unique definitions.
The direction constants are suited ONLY as parameters for getNeighbor(), but NOT appropriate for getMainAxisNeighbor().
| static UINT VRS::SpaceTreePath< DIM >::MaxPathLength | ( | ) | [inline, static] |
The following methods provides direct access to the path code. Normally this methods should not be needed, but it can be used by static index-based trees to improve the performance.
| UINT VRS::SpaceTreePath< DIM >::getPathCode | ( | ) | const |
| void VRS::SpaceTreePath< DIM >::setPathCode | ( | UINT | c | ) |
const UINT VRS::SpaceTreePath< DIM >::Left [static] |
smaller x
const UINT VRS::SpaceTreePath< DIM >::Right [static] |
greater x
const UINT VRS::SpaceTreePath< DIM >::Down [static] |
smaller y
const UINT VRS::SpaceTreePath< DIM >::Up [static] |
greater y
const UINT VRS::SpaceTreePath< DIM >::Front [static] |
smaller z
const UINT VRS::SpaceTreePath< DIM >::Back [static] |
greater z
const ChildNumber VRS::SpaceTreePath< DIM >::MaxChilds [static] |
const ChildNumber VRS::SpaceTreePath< DIM >::InvalidChildNumber [static] |
const SpaceTreePath VRS::SpaceTreePath< DIM >::InvalidPath [static] |