Loading...
Searching...
No Matches
CacheItem< TreeCacheT, NodeVecT, AtRoot, BypassLeafAPI > Class Template Reference

`#include <openvdb/tree/ValueAccessor.h>`

## Public Types

using | NodeType = typename NodeVecT::Front
using | ValueType = typename NodeType::ValueType
using | LeafNodeType = typename NodeType::LeafNodeType
using | CoordLimits = std::numeric_limits<Int32>

## Public Member Functions

| CacheItem (TreeCacheT &parent)
| 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)
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.
void | addLeaf (LeafNodeType *leaf)
void | addTile (Index level, const Coord &xyz, const ValueType &value, bool state)
LeafNodeType * | touchLeaf (const Coord &xyz)
LeafNodeType * | probeLeaf (const Coord &xyz)
const LeafNodeType * | probeConstLeaf (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.
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)
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.
template<typename ModifyOp>
void | modifyValueAndActiveState (const Coord &xyz, const ModifyOp &op)
| Apply a functor to the voxel at the given coordinates.
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.

## Member Typedef Documentation

## CoordLimits

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

using CoordLimits = std::numeric_limits<Int32>

## LeafNodeType

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

using LeafNodeType = typename NodeType::LeafNodeType

## NodeType

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

using NodeType = typename NodeVecT::Front

## ValueType

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

using ValueType = typename NodeType::ValueType

## Constructor & Destructor Documentation

## CacheItem() [1/2]

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

CacheItem | ( | TreeCacheT & | parent | ) |

inline

## CacheItem() [2/2]

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

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

inline

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

## Member Function Documentation

## addLeaf()

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

void addLeaf | ( | LeafNodeType * | leaf | ) |

inline

## addTile()

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

void addTile | ( | Index | level,
|  | const Coord & | xyz,
|  | const ValueType & | value,
|  | bool | state )

inline

## clear()

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

void clear | ( |  | ) |

inline

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

## copy()

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

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

inline

## erase() [1/2]

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

void erase | ( | const NodeType * |  | ) |

inline

Erase the node at this level.

## erase() [2/2]

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>
template<typename OtherNodeType>

void erase | ( | const OtherNodeType * | node | ) |

inline

Erase the node at another level of the cache.

## getNode() [1/4]

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

void getNode | ( | const NodeType *& | node | ) |

inline

## getNode() [2/4]

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

void getNode | ( | const NodeType *& | node | ) | const

inline

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

## getNode() [3/4]

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

void getNode | ( | NodeType *& | node | ) |

inline

## getNode() [4/4]

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>
template<typename OtherNodeType>

void getNode | ( | OtherNodeType *& | node | ) |

inline

Forward the request to another level of the cache.

## getValue()

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

const ValueType & getValue | ( | const Coord & | xyz | ) |

inline

Return the value of the voxel at the given coordinates.

## getValueDepth()

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

int getValueDepth | ( | const Coord & | xyz | ) |

inline

## insert() [1/2]

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

void insert | ( | const Coord & | xyz,
|  | const NodeType * | node )

inline

Cache the given node at this level.

## insert() [2/2]

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>
template<typename OtherNodeType>

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

inline

Forward the given node to another level of the cache.

## isCached()

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

bool isCached | ( | const Coord & | xyz | ) | const

inline

## isValueOn()

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

bool isValueOn | ( | const Coord & | xyz | ) |

inline

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

## isVoxel()

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

bool isVoxel | ( | const Coord & | xyz | ) |

inline

## modifyValue()

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>
template<typename ModifyOp>

void 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.

## modifyValueAndActiveState()

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>
template<typename ModifyOp>

void modifyValueAndActiveState | ( | const Coord & | xyz,
|  | const ModifyOp & | op )

inline

Apply a functor to the voxel at the given coordinates.

See Tree::modifyValueAndActiveState() for details.

## probeConstLeaf()

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

const LeafNodeType * probeConstLeaf | ( | const Coord & | xyz | ) |

inline

## probeConstNode()

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>
template<typename NodeT>

const NodeT * probeConstNode | ( | const Coord & | xyz | ) |

inline

## probeLeaf()

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

LeafNodeType * probeLeaf | ( | const Coord & | xyz | ) |

inline

## probeNode()

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>
template<typename NodeT>

NodeT * probeNode | ( | const Coord & | xyz | ) |

inline

## probeValue()

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

bool probeValue | ( | const Coord & | xyz,
|  | ValueType & | value )

inline

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

## setActiveState()

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

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

inline

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

## setValue()

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

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.

## setValueOff()

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

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.

## setValueOn()

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

void setValueOn | ( | const Coord & | xyz,
|  | const ValueType & | value )

inline

## setValueOnly()

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

void setValueOnly | ( | const Coord & | xyz,
|  | const ValueType & | value )

inline

## touchLeaf()

template<typename TreeCacheT, typename NodeVecT, bool AtRoot, bool BypassLeafAPI>

LeafNodeType * touchLeaf | ( | const Coord & | xyz | ) |

inline