OpenVDB  1.1.0
Public Types | Public Member Functions | List of all members
CacheItem< TreeCacheT, NodeVecT, AtRoot > Class Template Reference

#include <ValueAccessor.h>

Public Types

typedef boost::mpl::front
< NodeVecT >::type 
NodeType
typedef NodeType::ValueType ValueType
typedef NodeType::LeafNodeType LeafNodeType
typedef std::numeric_limits
< Int32 > 
CoordLimits

Public Member Functions

 CacheItem (TreeCacheT &parent)
bool isCached (const Coord &xyz) const
void insert (const Coord &xyz, const NodeType *node)
 Cache the given node at this level.
template<typename OtherNodeType >
void insert (const Coord &xyz, const OtherNodeType *node)
 Forward the given node to another level of the cache.
void erase (const NodeType *)
 Erase the node at this level.
template<typename OtherNodeType >
void erase (const OtherNodeType *node)
 Erase the node at another level of the cache.
void clear ()
 Erase the nodes at this and lower levels of the cache.
void getNode (const NodeType *&node) const
 Return the cached node (if any) at this level.
void getNode (const NodeType *&node)
void getNode (NodeType *&node)
template<typename OtherNodeType >
void getNode (OtherNodeType *&node)
 Forward the request to another level of the cache.
const ValueType & getValue (const Coord &xyz)
 Return the value of the voxel at the given coordinates.
LeafNodeType * touchLeaf (const Coord &xyz)
LeafNodeType * probeLeaf (const Coord &xyz)
const LeafNodeType * probeConstLeaf (const Coord &xyz)
bool isValueOn (const Coord &xyz)
 Return the active state of the voxel at the given coordinates.
bool probeValue (const Coord &xyz, ValueType &value)
 Return the active state and value of the voxel at the given coordinates.
int getValueDepth (const Coord &xyz)
bool isVoxel (const Coord &xyz)
void setValue (const Coord &xyz, const ValueType &value)
 Set the value of the voxel at the given coordinates and mark the voxel as active.
void setValueOnly (const Coord &xyz, const ValueType &value)
void setValueOn (const Coord &xyz, const ValueType &value)
void setValueOnSum (const Coord &xyz, const ValueType &value)
void setValueOff (const Coord &xyz, const ValueType &value)
 Set the value of the voxel at the given coordinates and mark the voxel as inactive.
void setActiveState (const Coord &xyz, bool on)
 Set the active state of the voxel at the given coordinates.
 CacheItem (TreeCacheT &parent, const CacheItem &other)
 Copy another CacheItem's node pointers and hash keys, but not its parent pointer.
CacheItem & copy (TreeCacheT &parent, const CacheItem &other)
 Copy another CacheItem's node pointers and hash keys, but not its parent pointer.

Member Typedef Documentation

typedef std::numeric_limits<Int32> CoordLimits
typedef NodeType::LeafNodeType LeafNodeType
typedef boost::mpl::front<NodeVecT>::type NodeType
typedef NodeType::ValueType ValueType

Constructor & Destructor Documentation

CacheItem ( TreeCacheT &  parent)
inline
CacheItem ( TreeCacheT &  parent,
const CacheItem< TreeCacheT, NodeVecT, AtRoot > &  other 
)
inline

Copy another CacheItem's node pointers and hash keys, but not its parent pointer.

Member Function Documentation

void clear ( )
inline

Erase the nodes at this and lower levels of the cache.

CacheItem& copy ( TreeCacheT &  parent,
const CacheItem< TreeCacheT, NodeVecT, AtRoot > &  other 
)
inline

Copy another CacheItem's node pointers and hash keys, but not its parent pointer.

void erase ( const NodeType *  )
inline

Erase the node at this level.

void erase ( const OtherNodeType *  node)
inline

Erase the node at another level of the cache.

void getNode ( const NodeType *&  node) const
inline

Return the cached node (if any) at this level.

void getNode ( const NodeType *&  node)
inline
void getNode ( NodeType *&  node)
inline
void getNode ( OtherNodeType *&  node)
inline

Forward the request to another level of the cache.

const ValueType& getValue ( const Coord &  xyz)
inline

Return the value of the voxel at the given coordinates.

int getValueDepth ( const Coord &  xyz)
inline
void insert ( const Coord &  xyz,
const NodeType *  node 
)
inline

Cache the given node at this level.

void insert ( const Coord &  xyz,
const OtherNodeType *  node 
)
inline

Forward the given node to another level of the cache.

bool isCached ( const Coord &  xyz) const
inline
bool isValueOn ( const Coord &  xyz)
inline

Return the active state of the voxel at the given coordinates.

bool isVoxel ( const Coord &  xyz)
inline
const LeafNodeType* probeConstLeaf ( const Coord &  xyz)
inline
LeafNodeType* probeLeaf ( const Coord &  xyz)
inline
bool probeValue ( const Coord &  xyz,
ValueType &  value 
)
inline

Return the active state and value of the voxel at the given coordinates.

void setActiveState ( const Coord &  xyz,
bool  on 
)
inline

Set the active state of the voxel at the given coordinates.

void setValue ( const Coord &  xyz,
const ValueType &  value 
)
inline

Set the value of the voxel at the given coordinates and mark the voxel as active.

void setValueOff ( const Coord &  xyz,
const ValueType &  value 
)
inline

Set the value of the voxel at the given coordinates and mark the voxel as inactive.

void setValueOn ( const Coord &  xyz,
const ValueType &  value 
)
inline
void setValueOnly ( const Coord &  xyz,
const ValueType &  value 
)
inline
void setValueOnSum ( const Coord &  xyz,
const ValueType &  value 
)
inline

Set the value of the voxel at the given coordinates to the sum of its current value and the given value, and mark the voxel as active.

LeafNodeType* touchLeaf ( const Coord &  xyz)
inline

The documentation for this class was generated from the following file: