45#ifndef OPENVDB_TREE_VALUEACCESSOR_HAS_BEEN_INCLUDED 
   46#define OPENVDB_TREE_VALUEACCESSOR_HAS_BEEN_INCLUDED 
   48#include <openvdb/version.h> 
   52#include <tbb/spin_mutex.h> 
   64template<
typename TreeType,
 
   66    typename MutexT = void,
 
   68class ValueAccessorImpl;
 
   84template<
typename TreeType, 
bool IsSafe = 
true,
 
   85    size_t CacheLevels = std::max(
Index(1),TreeType::DEPTH)-1, 
typename MutexType = 
void>
 
   92template <
typename TreeType, 
bool IsSafe>
 
   98template <
typename TreeType, 
bool IsSafe, 
size_t L0 = 0>
 
  106template <
typename TreeType, 
bool IsSafe, 
size_t L0 = 0, 
size_t L1 = 1>
 
  114template <
typename TreeType, 
bool IsSafe, 
size_t L0 = 0, 
size_t L1 = 1, 
size_t L2 = 2>
 
  119template<
typename TreeType, 
bool IsSafe = 
true,
 
  120    size_t CacheLevels = std::max(
Index(1),TreeType::DEPTH)-1>
 
  150template<
typename TreeType, 
bool IsSafe>
 
  155    static constexpr bool IsConstTree = std::is_const<TreeType>::value;
 
  163    static constexpr bool isSafe() { 
return IsSafe; }
 
  171        if (IsSafe) 
tree.attachAccessor(*
this);
 
 
  181        if (IsSafe && 
mTree) 
mTree->attachAccessor(*
this);
 
 
  186        if (&other != 
this) {
 
  187            if (IsSafe && 
mTree) 
mTree->releaseAccessor(*
this);
 
  189            if (IsSafe && 
mTree) 
mTree->attachAccessor(*
this);
 
 
  208    template<
typename> 
friend class Tree;
 
 
  217namespace value_accessor_internal
 
  220template<
typename ListT, 
size_t... Ts> 
struct NodeListBuilderImpl;
 
  222template <
typename NodeChainT>
 
  223struct NodeListBuilderImpl<NodeChainT>
 
  228template <
typename NodeChainT, 
size_t Idx>
 
  229struct NodeListBuilderImpl<NodeChainT, Idx>
 
  231    using NodeT = 
typename NodeChainT::template Get<Idx>;
 
  235template <
typename NodeChainT, 
size_t ThisIdx, 
size_t NextIdx, 
size_t... Idxs>
 
  236struct NodeListBuilderImpl<NodeChainT, ThisIdx, NextIdx, Idxs...>
 
  238    static_assert(ThisIdx < NextIdx,
 
  239        "Invalid cache level - Cache levels must be in increasing ascending order");
 
  240    static_assert(ThisIdx < NodeChainT::Size,
 
  241        "Invalid cache level - Cache level is larger than the number of tree nodes");
 
  242    static_assert(ThisIdx < NodeChainT::Back::LEVEL,
 
  243        "Invalid cache level - Cache level is larger than the number of tree nodes");
 
  245    using NodeT = 
typename NodeChainT::template Get<ThisIdx>;
 
  247        typename NodeListBuilderImpl<NodeChainT, NextIdx, Idxs...>::ListT>;
 
  250template<
typename NodeChainT, 
size_t RootLevel, 
typename IntegerSequence>
 
  251struct NodeListBuilder;
 
  253template<
typename NodeChainT, 
size_t RootLevel, 
size_t... Is>
 
  254struct NodeListBuilder<NodeChainT, RootLevel, 
std::integer_sequence<size_t, Is...>>
 
  256    using ListT = 
typename NodeListBuilderImpl<NodeChainT, Is..., RootLevel>::ListT;
 
  259template<
typename NodeChainT, 
size_t RootLevel, 
size_t... Is>
 
  260struct NodeListBuilder<NodeChainT, RootLevel, openvdb::index_sequence<Is...>>
 
  262    using ListT = 
typename NodeListBuilderImpl<NodeChainT, Is..., RootLevel>::ListT;
 
  266template<
typename TreeTypeT, 
typename NodeT>
 
  267struct EnableLeafBuffer
 
  269    using LeafNodeT = 
typename TreeTypeT::LeafNodeType;
 
  270    static constexpr bool value =
 
  271        std::is_same<NodeT, LeafNodeT>::value &&
 
  272        std::is_same<
typename LeafNodeT::Buffer::StorageType,
 
  273            typename LeafNodeT::ValueType>::value;
 
  276template<
typename TreeTypeT, 
size_t... Is>
 
  277struct EnableLeafBuffer<TreeTypeT, openvdb::index_sequence<Is...>>
 
  280    static constexpr bool value = 
false;
 
  283template<
typename TreeTypeT, 
size_t First, 
size_t... Is>
 
  284struct EnableLeafBuffer<TreeTypeT, openvdb::index_sequence<First, Is...>>
 
  287    using NodeChainT = 
typename TreeTypeT::RootNodeType::NodeChainType;
 
  288    using FirstNodeT = 
typename NodeChainT::template Get<First>;
 
  290    static constexpr bool value = EnableLeafBuffer<TreeTypeT, FirstNodeT>::value;
 
  310template <
typename MutexT>
 
  313    inline auto lock()
 const { 
return std::scoped_lock(m); }
 
 
  322    inline constexpr auto lock()
 const { 
return 0; }
 
 
  331template<
typename TreeTypeT, 
typename IntegerSequence, 
typename Enable = 
void>
 
  334    template <
typename NodeT>
 
  336        std::is_same<NodeT, typename TreeTypeT::LeafNodeType>::value;
 
  339    inline void setBuffer(
const typename TreeTypeT::ValueType* b)
 const { mBuffer = b; }
 
  341    mutable const typename TreeTypeT::ValueType* mBuffer;
 
 
  346template<
typename TreeTypeT, 
typename IntegerSequence>
 
  348    typename 
std::enable_if<
 
  349        !value_accessor_internal::EnableLeafBuffer<TreeTypeT, IntegerSequence>::value
 
 
  362template<
typename _TreeType, 
bool IsSafe, 
typename MutexT, 
typename IntegerSequence>
 
  385        typename value_accessor_internal::NodeListBuilder
 
  386            <
NodeChainT, RootNodeT::LEVEL, IntegerSequence>::ListT;
 
  387    using NodePtrList = 
typename NodeLevelList::template Transform<std::add_pointer_t>;
 
  401    template <
size_t Level>
 
  409    template <
typename NodeT>
 
  421    static_assert(TreeType::DEPTH >= NodeLevelList::Size-1, 
"cache size exceeds tree depth");
 
  422    static_assert(NodeLevelList::Size > 0, 
"unexpected cache size");
 
  443        return this->evalFirstIndex([&](
const auto Idx) -> 
bool 
  445                using NodeType = 
typename NodeLevelList::template Get<Idx>;
 
  447                constexpr bool IsRoot = std::is_same<RootNodeT, NodeType>::value;
 
  448                if constexpr(IsRoot) 
return false;
 
 
  459        return *this->evalFirstIndex([&](
const auto Idx) -> 
const ValueType*
 
  461                using NodeType = 
typename NodeLevelList::template Get<Idx>;
 
  471                    auto node = mNodes.template get<Idx>();
 
  473                    return &(node->getValueAndCache(xyz, *
this));
 
 
  482        return this->evalFirstCached(xyz, [&](
const auto node) -> 
bool {
 
  484                return node->isValueOnAndCache(xyz, *
this);
 
 
  494        return this->evalFirstCached(xyz, [&](
const auto node) -> 
bool 
  496                using NodeType = std::remove_pointer_t<
decltype(node)>;
 
  500                    const auto offset = LeafNodeT::coordToOffset(xyz);
 
  502                    return node->isValueOn(offset);
 
  505                    return node->probeValueAndCache(xyz, value, *
this);
 
 
  518        return this->evalFirstCached(xyz, [&](
const auto node) -> 
int 
  520                using NodeType = std::remove_pointer_t<
decltype(node)>;
 
  523                if constexpr(std::is_same<RootNodeT, NodeType>::value) {
 
  524                    return node->getValueDepthAndCache(xyz, *
this);
 
  527                    return int(RootNodeT::LEVEL - node->getValueLevelAndCache(xyz, *
this));
 
 
  539            static_cast<int>(RootNodeT::LEVEL);
 
 
  553        this->evalFirstCached(xyz, [&](
const auto node) -> 
void 
  555                using NodeType = std::remove_pointer_t<
decltype(node)>;
 
  559                    const auto offset = LeafNodeT::coordToOffset(xyz);
 
  561                    const_cast<NodeType*
>(node)->
setValueOn(offset);
 
  564                    const_cast<NodeType*
>(node)->setValueAndCache(xyz, value, *
this);
 
 
  583        this->evalFirstIndex([&](
const auto Idx) -> 
bool 
  585                using NodeType = 
typename NodeLevelList::template Get<Idx>;
 
  592                    auto node = mNodes.template get<Idx>();
 
  594                    const_cast<NodeType*
>(node)->setValueOnlyAndCache(xyz, value, *
this);
 
 
  610        this->evalFirstCached(xyz, [&](
const auto node) -> 
void 
  612                using NodeType = std::remove_pointer_t<
decltype(node)>;
 
  616                    const auto offset = LeafNodeT::coordToOffset(xyz);
 
  621                    const_cast<NodeType*
>(node)->setValueOffAndCache(xyz, value, *
this);
 
 
  631    template<
typename ModifyOp>
 
  635        this->evalFirstCached(xyz, [&](
const auto node) -> 
void 
  637                using NodeType = std::remove_pointer_t<
decltype(node)>;
 
  641                    const auto offset = LeafNodeT::coordToOffset(xyz);
 
  646                    const_cast<NodeType*
>(node)->modifyValueAndCache(xyz, op, *
this);
 
 
  655    template<
typename ModifyOp>
 
  659        this->evalFirstCached(xyz, [&](
const auto node) -> 
void 
  661                using NodeType = std::remove_pointer_t<
decltype(node)>;
 
  665                    const auto offset = LeafNodeT::coordToOffset(xyz);
 
  666                    bool state = node->isValueOn(offset);
 
  671                    const_cast<NodeType*
>(node)->modifyValueAndActiveStateAndCache(xyz, op, *
this);
 
 
  686        this->evalFirstCached(xyz, [&](
const auto node) -> 
void 
  688                using NodeType = std::remove_pointer_t<
decltype(node)>;
 
  690                const_cast<NodeType*
>(node)->setActiveStateAndCache(xyz, on, *
this);
 
 
  718        return this->evalFirstCached(xyz, [&](
const auto node) -> 
LeafNodeT*
 
  720                using NodeType = std::remove_pointer_t<
decltype(node)>;
 
  722                return const_cast<NodeType*
>(node)->touchLeafAndCache(xyz, *
this);
 
 
  733        static_assert(Start >= 0);
 
  735        this->evalFirstCached<Start>(leaf->origin(), [&](
const auto node) -> 
void 
  737                using NodeType = std::remove_pointer_t<decltype(node)>;
 
  738                OPENVDB_ASSERT(node);
 
  739                const_cast<NodeType*>(node)->addLeafAndCache(leaf, *this);
 
 
  758        static_assert(Start >= 0);
 
  759        this->evalFirstCached<Start>(xyz, [&](
const auto node) -> 
void 
  761                using NodeType = std::remove_pointer_t<
decltype(node)>;
 
  763                const_cast<NodeType*
>(node)->addTileAndCache(level, xyz, value, state, *
this);
 
 
  776    template<
typename NodeT>
 
  780        return this->evalFirstPred([&](
const auto Idx) -> 
bool 
  782                using NodeType = 
typename NodeLevelList::template Get<Idx>;
 
  784                constexpr bool NodeMayBeCached =
 
  785                    std::is_same<NodeT, NodeType>::value || NodeT::LEVEL < NodeType::LEVEL;
 
  790            [&](
const auto node) -> NodeT*
 
  792                using NodeType = std::remove_pointer_t<
decltype(node)>;
 
  794                if constexpr(std::is_same<NodeT, NodeType>::value) {
 
  795                    return const_cast<NodeT*
>(node);
 
  799                    return const_cast<NodeType*
>(node)->
template probeNodeAndCache<NodeT>(xyz, *
this);
 
 
  804    template<
typename NodeT>
 
  807        return this->evalFirstPred([&](
const auto Idx) -> 
bool 
  809                using NodeType = 
typename NodeLevelList::template Get<Idx>;
 
  811                constexpr bool NodeMayBeCached =
 
  812                    std::is_same<NodeT, NodeType>::value || NodeT::LEVEL < NodeType::LEVEL;
 
  817            [&](
const auto node) -> 
const NodeT*
 
  819                using NodeType = std::remove_pointer_t<
decltype(node)>;
 
  821                if constexpr(std::is_same<NodeT, NodeType>::value) {
 
  826                    return const_cast<NodeType*
>(node)->
template probeConstNodeAndCache<NodeT>(xyz, *
this);
 
 
  847    template<
typename NodeT>
 
  850        using NodeType = 
typename std::decay<NodeT>::type;
 
  851        static constexpr int64_t Idx = NodeLevelList::template 
Index<NodeType>;
 
  852        if constexpr (Idx >= 0) 
return mNodes.template get<Idx>();
 
 
  859    template<
typename NodeT>
 
  868    template<
typename NodeT>
 
  871        static constexpr int64_t Idx = NodeLevelList::template 
Index<NodeT>;
 
  872        if constexpr (Idx >= 0) {
 
  874            mNodes.template get<Idx>() = 
nullptr;
 
 
  883        mNodes.foreach([](
auto& node) { node = 
nullptr; });
 
 
  896        typename std::conditional<(NumCacheLevels > 0), NodeTypeAtLevel<0>, 
void>::type;
 
  898        typename std::conditional<(NumCacheLevels > 1), NodeTypeAtLevel<1>, 
void>::type;
 
  900        typename std::conditional<(NumCacheLevels > 2), NodeTypeAtLevel<2>, 
void>::type;
 
  911    template<
typename> 
friend class Tree;
 
  929    template<
typename NodeT>
 
  931        [[maybe_unused]] 
const Coord& xyz,
 
  932        [[maybe_unused]] 
const NodeT* node)
 const 
  935        if constexpr(!NodeLevelList::template Contains<NodeT>) 
return;
 
  937            constexpr uint64_t Idx = uint64_t(NodeLevelList::template 
Index<NodeT>);
 
  938            static_assert(NodeLevelList::template Contains<NodeT>);
 
  940            mKeys[Idx] = xyz & ~(NodeT::DIM-1);
 
  941            mNodes.template get<Idx>() = 
const_cast<NodeT*
>(node);
 
 
  948    template<
typename NodeT>
 
  951        if constexpr(!NodeLevelList::template Contains<NodeT>) 
return false;
 
  952        if constexpr(std::is_same<NodeT, RootNodeT>::value) {
 
  956            constexpr uint64_t Idx = uint64_t(NodeLevelList::template 
Index<NodeT>);
 
  957            static_assert(NodeLevelList::template Contains<NodeT>);
 
 
  969    template <
typename OpT>
 
  974        [[maybe_unused]] 
const auto lock = this->lock();
 
  976        using IndexT = std::integral_constant<std::size_t, 0>;
 
  977        using RetT = 
typename std::invoke_result<OpT, IndexT>::type;
 
  986    template <
typename PredT, 
typename OpT>
 
  991        [[maybe_unused]] 
const auto lock = this->lock();
 
  992        using RetT = 
typename std::invoke_result<OpT, RootNodeT*>::type;
 
  993        if constexpr(!std::is_same<RetT, void>::value) {
 
  994            return mNodes.evalFirstPred(pred, op, RetT(
false));
 
  997            return mNodes.evalFirstPred(pred, op);
 
 1006    template <
size_t Start = 0, 
typename OpT = 
void>
 
 1009        return this->evalFirstPred([&](
const auto Idx) -> 
bool 
 1011                if constexpr(Idx < Start)             
return false;
 
 1012                if constexpr(Idx > NumCacheLevels+1)  
return false;
 
 1013                using NodeType = 
typename NodeLevelList::template Get<Idx>;
 
 1014                return this->isHashed<NodeType>(xyz);
 
 1019    mutable std::array<Coord, NumCacheLevels> mKeys;
 
 1020    mutable typename NodePtrList::AsTupleList mNodes;
 
 
#define OPENVDB_ASSERT(X)
Definition Assert.h:41
Int32 ValueType
Definition Coord.h:33
static Coord max()
Return the largest possible coordinate.
Definition Coord.h:47
Signed (x, y, z) 32-bit integer coordinates.
Definition Coord.h:26
static constexpr bool isSafe()
Return true if this accessor is safe, i.e. registered by the tree from which it is constructed....
Definition ValueAccessor.h:163
TreeType * getTree() const
Return a pointer to the tree associated with this accessor.
Definition ValueAccessor.h:198
ValueAccessorBase(const ValueAccessorBase &other)
Copy constructor - if IsSafe, then the copy also registers itself against the tree it is accessing.
Definition ValueAccessor.h:178
ValueAccessorBase & operator=(const ValueAccessorBase &other)
Definition ValueAccessor.h:184
_TreeType * mTree
Definition ValueAccessor.h:210
virtual ~ValueAccessorBase()
Definition ValueAccessor.h:174
virtual void clear()=0
Pure virtual method, clears the derived accessor.
static constexpr bool IsConstTree
Definition ValueAccessor.h:155
ValueAccessorBase(TreeType &tree)
Construct from a tree. Should rarely be invoked directly, the drived implementation class calls this....
Definition ValueAccessor.h:168
friend class Tree
Definition ValueAccessor.h:208
_TreeType & tree() const
Definition ValueAccessor.h:201
virtual void release()
Definition ValueAccessor.h:209
The Value Accessor Implementation and API methods. The majoirty of the API matches the API of a compa...
Definition ValueAccessor.h:367
int getValueDepth(const Coord &xyz) const
Return the tree depth (0 = root) at which the value of voxel (x, y, z) resides, or -1 if (x,...
Definition ValueAccessor.h:516
static constexpr bool BypassLeafAPI
Definition ValueAccessor.h:415
typename value_accessor_internal::NodeListBuilder< NodeChainT, RootNodeT::LEVEL, openvdb::make_index_sequence< CacheLevels > >::ListT NodeLevelList
Definition ValueAccessor.h:384
typename RootNodeT::NodeChainType NodeChainT
Definition ValueAccessor.h:379
ValueAccessorLock< MutexType > LockT
Definition ValueAccessor.h:372
void clear() override final
Definition ValueAccessor.h:880
bool isValueOn(const Coord &xyz) const
Return the active state of the voxel at the given coordinates.
Definition ValueAccessor.h:480
void setActiveState(const Coord &xyz, bool on=true)
Definition ValueAccessor.h:683
bool isVoxel(const Coord &xyz) const
Return true if the value of voxel (x, y, z) resides at the leaf level of the tree,...
Definition ValueAccessor.h:535
LeafNodeT * touchLeaf(const Coord &xyz)
Returns the leaf node that contains voxel (x, y, z) and if it doesn't exist, create it,...
Definition ValueAccessor.h:715
typename TreeType::ValueType ValueType
Definition ValueAccessor.h:376
OPENVDB_FORCE_INLINE void insert(const Coord &xyz, const NodeT *node) const
Definition ValueAccessor.h:930
void addLeaf(LeafNodeT *leaf)
Add the specified leaf to this tree, possibly creating a child branch in the process....
Definition ValueAccessor.h:729
typename NodeLevelList::template Get< Level > NodeTypeAtLevel
Definition ValueAccessor.h:402
OPENVDB_FORCE_INLINE bool isHashed(const Coord &xyz) const
Definition ValueAccessor.h:949
LeafNodeT * probeLeaf(const Coord &xyz)
Return a pointer to the leaf node that contains the voxel coordinate xyz. If no LeafNode exists,...
Definition ValueAccessor.h:836
static constexpr Index numCacheLevels()
Definition ValueAccessor.h:903
void addTile(Index level, const Coord &xyz, const ValueType &value, bool state)
Add a tile at the specified tree level that contains the coordinate xyz, possibly deleting existing n...
Definition ValueAccessor.h:754
const LeafNodeT * probeConstLeaf(const Coord &xyz) const
Definition ValueAccessor.h:838
void modifyValueAndActiveState(const Coord &xyz, const ModifyOp &op)
Apply a functor to the voxel at the given coordinates.
Definition ValueAccessor.h:656
friend class InternalNode
Definition ValueAccessor.h:908
void setValueOnly(const Coord &xyz, const ValueType &value)
Set a particular value at the given coordinate but preserve its active state.
Definition ValueAccessor.h:578
typename TreeType::RootNodeType RootNodeT
Definition ValueAccessor.h:377
void setValueOff(const Coord &xyz, const ValueType &value)
Set a particular value at the given coordinate and mark the coordinate as inactive.
Definition ValueAccessor.h:607
bool probeValue(const Coord &xyz, ValueType &value) const
Return the active state of the value at a given coordinate as well as its value.
Definition ValueAccessor.h:492
typename TreeType::LeafNodeType LeafNodeT
Definition ValueAccessor.h:378
void setValue(const Coord &xyz, const ValueType &value)
Set a particular value at the given coordinate and mark the coordinate as active.
Definition ValueAccessor.h:550
typename NodeLevelList::template Transform< std::add_pointer_t > NodePtrList
Definition ValueAccessor.h:387
void eraseNode()
Explicitly remove this Value Accessors cached node of the given NodeT. If this Value Accessor does no...
Definition ValueAccessor.h:869
void setValueOff(const Coord &xyz)
Mark the voxel at the given coordinates as inactive without changing its value.
Definition ValueAccessor.h:704
NodeT * getNode()
Return the node of type NodeT that has been cached on this accessor. If this accessor does not cache ...
Definition ValueAccessor.h:848
friend class Tree
Definition ValueAccessor.h:911
void modifyValue(const Coord &xyz, const ModifyOp &op)
Apply a functor to the value at the given coordinate and mark mark the coordinate as active.
Definition ValueAccessor.h:632
ValueAccessorBase< TreeType, IsSafe > BaseT
Definition ValueAccessor.h:371
ValueAccessorImpl(TreeType &tree)
Constructor from a tree.
Definition ValueAccessor.h:425
friend class LeafNode
Definition ValueAccessor.h:909
ValueAccessorLeafBuffer< TreeType, openvdb::make_index_sequence< CacheLevels > > LeafCacheT
Definition ValueAccessor.h:373
const LeafNodeT * probeLeaf(const Coord &xyz) const
Return a pointer to the leaf node that contains the voxel coordinate xyz. If no LeafNode exists,...
Definition ValueAccessor.h:837
void insertNode(const Coord &xyz, NodeT &node)
Explicitly insert a node of the type NodeT into this Value Accessors cache.
Definition ValueAccessor.h:860
const NodeT * probeConstNode(const Coord &xyz) const
Return a pointer to the node of the specified type that contains the value located at xyz....
Definition ValueAccessor.h:805
bool isCached(const Coord &xyz) const
Definition ValueAccessor.h:441
~ValueAccessorImpl() override final=default
void setValueOn(const Coord &xyz)
Mark the voxel at the given coordinates as active without changing its value.
Definition ValueAccessor.h:698
static constexpr size_t NumCacheLevels
Definition ValueAccessor.h:420
void setValueOn(const Coord &xyz, const ValueType &value)
Definition ValueAccessor.h:569
TreeType TreeType
Definition ValueAccessor.h:375
NodeT * probeNode(const Coord &xyz)
Return a pointer to the node of the specified type that contains the value located at xyz....
Definition ValueAccessor.h:777
const ValueType & getValue(const Coord &xyz) const
Return the value of the voxel at the given coordinates.
Definition ValueAccessor.h:455
static constexpr bool IsLeafAndBypassLeafAPI
Definition ValueAccessor.h:410
void release() override final
Release this accessor from the tree, set the tree to null and clear the accessor cache....
Definition ValueAccessor.h:916
friend class RootNode
Definition ValueAccessor.h:907
ValueAccessorImpl< TreeType, IsSafe, MutexType, openvdb::make_index_sequence< CacheLevels > > ValueAccessor
Default alias for a ValueAccessor. This is simply a helper alias for the generic definition but takes...
Definition ValueAccessor.h:86
ValueAccessorImpl< TreeType, IsSafe, tbb::spin_mutex, openvdb::make_index_sequence< CacheLevels > > ValueAccessorRW
Helper alias for a ValueAccesor which spin locks every API call.
Definition ValueAccessor.h:121
ValueAccessorImpl< TreeType, IsSafe, void, openvdb::index_sequence< L0, L1 > > ValueAccessor2
Helper alias for a ValueAccessor which caches two node levels. By default the two lowest node levels ...
Definition ValueAccessor.h:107
ValueAccessorImpl< TreeType, IsSafe, void, openvdb::index_sequence< L0, L1, L2 > > ValueAccessor3
Helper alias for a ValueAccessor which caches three node levels. By default the three lowest node lev...
Definition ValueAccessor.h:115
ValueAccessorImpl< TreeType, IsSafe, void, openvdb::index_sequence<> > ValueAccessor0
Helper alias for a ValueAccessor which doesn't cache any Internal or Leaf nodes.
Definition ValueAccessor.h:93
ValueAccessorImpl< TreeType, IsSafe, void, openvdb::index_sequence< L0 > > ValueAccessor1
Helper alias for a ValueAccessor which caches a single node level. By default, the node level is 0,...
Definition ValueAccessor.h:99
Index32 Index
Definition Types.h:54
std::decay_t< decltype(make_index_sequence_impl< N >())> make_index_sequence
Definition Types.h:233
OPENVDB_FORCE_INLINE RetT evalFirstIndex(OpT op, const RetT def=RetT())
Definition TypeList.h:566
Definition Exceptions.h:13
constexpr void setBuffer(const typename TreeTypeT::ValueType *) const
Definition ValueAccessor.h:355
static constexpr bool BypassLeafAPI
Definition ValueAccessor.h:352
constexpr TreeTypeT::ValueType * buffer()
Definition ValueAccessor.h:353
constexpr TreeTypeT::ValueType * buffer() const
Definition ValueAccessor.h:354
A small class that contains a cached pointer to a LeafNode data buffer which is derived from by the i...
Definition ValueAccessor.h:333
const TreeTypeT::ValueType * buffer()
Definition ValueAccessor.h:337
const TreeTypeT::ValueType * buffer() const
Definition ValueAccessor.h:338
static constexpr bool BypassLeafAPI
Definition ValueAccessor.h:335
void setBuffer(const typename TreeTypeT::ValueType *b) const
Definition ValueAccessor.h:339
constexpr auto lock() const
Definition ValueAccessor.h:322
A small class that contains a Mutex which is derived from by the internal Value Accessor Implementati...
Definition ValueAccessor.h:312
auto lock() const
Definition ValueAccessor.h:313
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition version.h.in:121
#define OPENVDB_USE_VERSION_NAMESPACE
Definition version.h.in:218