HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot > Class Template Reference

#include <ValueAccessor.h>

Public Types

using NodeType = typename hboost::mpl::front< NodeVecT >::type
 
using ValueType = typename NodeType::ValueType
 
using LeafNodeType = typename NodeType::LeafNodeType
 
using CoordLimits = std::numeric_limits< Int32 >
 

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. More...
 
template<typename OtherNodeType >
void insert (const Coord &xyz, const OtherNodeType *node)
 Forward the given node to another level of the cache. More...
 
void erase (const NodeType *)
 Erase the node at this level. More...
 
template<typename OtherNodeType >
void erase (const OtherNodeType *node)
 Erase the node at another level of the cache. More...
 
void clear ()
 Erase the nodes at this and lower levels of the cache. More...
 
void getNode (const NodeType *&node) const
 Return the cached node (if any) at this level. More...
 
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. More...
 
const ValueTypegetValue (const Coord &xyz)
 Return the value of the voxel at the given coordinates. More...
 
void addLeaf (LeafNodeType *leaf)
 
void addTile (Index level, const Coord &xyz, const ValueType &value, bool state)
 
LeafNodeTypetouchLeaf (const Coord &xyz)
 
LeafNodeTypeprobeLeaf (const Coord &xyz)
 
const LeafNodeTypeprobeConstLeaf (const Coord &xyz)
 
template<typename NodeT >
NodeT * probeNode (const Coord &xyz)
 
template<typename NodeT >
const NodeT * probeConstNode (const Coord &xyz)
 
bool isValueOn (const Coord &xyz)
 Return the active state of the voxel at the given coordinates. More...
 
bool probeValue (const Coord &xyz, ValueType &value)
 Return the active state and value of the voxel at the given coordinates. More...
 
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. More...
 
void setValueOnly (const Coord &xyz, const ValueType &value)
 
void setValueOn (const Coord &xyz, const ValueType &value)
 
template<typename ModifyOp >
void modifyValue (const Coord &xyz, const ModifyOp &op)
 Apply a functor to the value of the voxel at the given coordinates and mark the voxel as active. More...
 
template<typename ModifyOp >
void modifyValueAndActiveState (const Coord &xyz, const ModifyOp &op)
 Apply a functor to the voxel at the given coordinates. More...
 
void setValueOff (const Coord &xyz, const ValueType &value)
 Set the value of the voxel at the given coordinates and mark the voxel as inactive. More...
 
void setActiveState (const Coord &xyz, bool on)
 Set the active state of the voxel at the given coordinates. More...
 
 CacheItem (TreeCacheT &parent, const CacheItem &other)
 Copy another CacheItem's node pointers and hash keys, but not its parent pointer. More...
 
CacheItemcopy (TreeCacheT &parent, const CacheItem &other)
 Copy another CacheItem's node pointers and hash keys, but not its parent pointer. More...
 

Detailed Description

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
class openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >

Definition at line 95 of file ValueAccessor.h.

Member Typedef Documentation

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
using openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::CoordLimits = std::numeric_limits<Int32>

Definition at line 573 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
using openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::LeafNodeType = typename NodeType::LeafNodeType

Definition at line 572 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
using openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::NodeType = typename hboost::mpl::front<NodeVecT>::type

Definition at line 570 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
using openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::ValueType = typename NodeType::ValueType

Definition at line 571 of file ValueAccessor.h.

Constructor & Destructor Documentation

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::CacheItem ( TreeCacheT &  parent)
inline

Definition at line 575 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::CacheItem ( TreeCacheT &  parent,
const CacheItem< TreeCacheT, NodeVecT, AtRoot > &  other 
)
inline

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

Definition at line 585 of file ValueAccessor.h.

Member Function Documentation

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
void openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::addLeaf ( LeafNodeType leaf)
inline

Definition at line 651 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
void openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::addTile ( Index  level,
const Coord &  xyz,
const ValueType value,
bool  state 
)
inline

Definition at line 662 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
void openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::clear ( void  )
inline

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

Definition at line 625 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
CacheItem& openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::copy ( TreeCacheT &  parent,
const CacheItem< TreeCacheT, NodeVecT, AtRoot > &  other 
)
inline

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

Definition at line 593 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
void openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::erase ( const NodeType )
inline

Erase the node at this level.

Definition at line 619 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
template<typename OtherNodeType >
void openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::erase ( const OtherNodeType *  node)
inline

Erase the node at another level of the cache.

Definition at line 622 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
void openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::getNode ( const NodeType *&  node) const
inline

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

Definition at line 628 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
void openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::getNode ( const NodeType *&  node)
inline

Definition at line 629 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
void openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::getNode ( NodeType *&  node)
inline

Definition at line 630 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
template<typename OtherNodeType >
void openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::getNode ( OtherNodeType *&  node)
inline

Forward the request to another level of the cache.

Definition at line 639 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
const ValueType& openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::getValue ( const Coord &  xyz)
inline

Return the value of the voxel at the given coordinates.

Definition at line 642 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
int openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::getValueDepth ( const Coord &  xyz)
inline

Definition at line 754 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
void openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::insert ( const Coord &  xyz,
const NodeType node 
)
inline

Cache the given node at this level.

Definition at line 609 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
template<typename OtherNodeType >
void openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::insert ( const Coord &  xyz,
const OtherNodeType *  node 
)
inline

Forward the given node to another level of the cache.

Definition at line 616 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
bool openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::isCached ( const Coord &  xyz) const
inline

Definition at line 603 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
bool openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::isValueOn ( const Coord &  xyz)
inline

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

Definition at line 735 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
bool openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::isVoxel ( const Coord &  xyz)
inline

Definition at line 765 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
template<typename ModifyOp >
void openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::modifyValue ( const Coord &  xyz,
const ModifyOp &  op 
)
inline

Apply a functor to the value of the voxel at the given coordinates and mark the voxel as active.

See Tree::modifyValue() for details.

Definition at line 802 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
template<typename ModifyOp >
void openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::modifyValueAndActiveState ( const Coord &  xyz,
const ModifyOp &  op 
)
inline

Apply a functor to the voxel at the given coordinates.

See Tree::modifyValueAndActiveState() for details.

Definition at line 816 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
const LeafNodeType* openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::probeConstLeaf ( const Coord &  xyz)
inline

Definition at line 694 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
template<typename NodeT >
const NodeT* openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::probeConstNode ( const Coord &  xyz)
inline

Definition at line 720 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
LeafNodeType* openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::probeLeaf ( const Coord &  xyz)
inline

Definition at line 684 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
template<typename NodeT >
NodeT* openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::probeNode ( const Coord &  xyz)
inline

Definition at line 704 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
bool openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::probeValue ( const Coord &  xyz,
ValueType value 
)
inline

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

Definition at line 745 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
void openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::setActiveState ( const Coord &  xyz,
bool  on 
)
inline

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

Definition at line 840 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
void openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::setValue ( const Coord &  xyz,
const ValueType value 
)
inline

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

Definition at line 776 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
void openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::setValueOff ( const Coord &  xyz,
const ValueType value 
)
inline

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

Definition at line 828 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
void openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::setValueOn ( const Coord &  xyz,
const ValueType value 
)
inline

Definition at line 796 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
void openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::setValueOnly ( const Coord &  xyz,
const ValueType value 
)
inline

Definition at line 786 of file ValueAccessor.h.

template<typename TreeCacheT, typename NodeVecT, bool AtRoot>
LeafNodeType* openvdb::OPENVDB_VERSION_NAME::tree::CacheItem< TreeCacheT, NodeVecT, AtRoot >::touchLeaf ( const Coord &  xyz)
inline

Definition at line 674 of file ValueAccessor.h.


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