|
Sierra Toolkit Version of the Day
|
Type for identifying a particular node in a hierarchical oct-tree. More...
#include <OctTree.hpp>
Public Types | |
| enum | { MaxDepth = 16 } |
| enum | { MaskIndex = 0x0f } |
| enum | { BitsPerIndex = 4 } |
| enum | { BitsPerWord = std::numeric_limits<value_type>::digits } |
| enum | { IndexPerWord = BitsPerWord / BitsPerIndex } |
| enum | { NWord = MaxDepth / IndexPerWord } |
| enum | { OKBits = StaticAssert< 0 == BitsPerWord % BitsPerIndex >::OK } |
| enum | { OKWord = StaticAssert< 0 == MaxDepth % IndexPerWord >::OK } |
| typedef unsigned | value_type |
| Integer type for the key components and indices. | |
Public Member Functions | |
| OctTreeKey () | |
| Default construct to the root node. | |
| OctTreeKey (const OctTreeKey &k) | |
| Copy construct. | |
| OctTreeKey & | operator= (const OctTreeKey &k) |
| Assignment. | |
| unsigned | depth () const |
| Query depth of this key. | |
| unsigned | index (const unsigned Depth) const |
| Index of the key at the depth [1..8] A zero value indicates it is not defined at that depth. | |
| OctTreeKey & | clear_index (const unsigned Depth) |
| Clear index at depth. | |
| OctTreeKey & | set_index (const unsigned Depth, const unsigned Index) |
| Set index at depth. | |
| const value_type * | value () const |
| Query raw value. | |
| OctTreeKey & | set_value (const value_type *val) |
| Set raw value. | |
| bool | intersect (const OctTreeKey &k) const |
| Intersects if either key contains the other. | |
Type for identifying a particular node in a hierarchical oct-tree.
Definition at line 35 of file OctTree.hpp.
| bool stk::OctTreeKey::intersect | ( | const OctTreeKey & | k | ) | const |
Intersects if either key contains the other.
Definition at line 139 of file OctTree.cpp.