stk::OctTreeKey Class Reference
[Util_module]

#include <OctTree.hpp>

List of all members.


Detailed Description

Type for identifying a particular node in a hierarchical oct-tree.

Definition at line 35 of file OctTree.hpp.

Public Types

typedef unsigned value_type
 Integer type for the key components and indices.
 MaxDepth = 16
 MaskIndex = 0x0f
 BitsPerIndex = 4
 BitsPerWord = std::numeric_limits<value_type>::digits
 IndexPerWord = BitsPerWord / BitsPerIndex
 NWord = MaxDepth / IndexPerWord
 OKBits = StaticAssert< 0 == BitsPerWord % BitsPerIndex >::OK
 OKWord = StaticAssert< 0 == MaxDepth % IndexPerWord >::OK
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 }

Public Member Functions

 OctTreeKey ()
 Default construct to the root node.
 OctTreeKey (const OctTreeKey &k)
 Copy construct.
OctTreeKeyoperator= (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.
OctTreeKeyclear_index (const unsigned Depth)
 Clear index at depth.
OctTreeKeyset_index (const unsigned Depth, const unsigned Index)
 Set index at depth.
const value_typevalue () const
 Query raw value.
OctTreeKeyset_value (const value_type *val)
 Set raw value.
bool intersect (const OctTreeKey &k) const
 Intersects if either key contains the other.


Member Function Documentation

unsigned stk::OctTreeKey::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.

Definition at line 80 of file OctTree.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Jul 13 09:27:33 2010 for Sierra Toolkit by  doxygen 1.4.7