Replies: 1 comment 1 reply
-
Hey @jtressle You're basically there - if you want a specific node type within the tree hierarchy you can use using MyTreeT = openvdb::FloatTree; // whatever tree type you have
using MyRootNodeT = MyTreeT::RootNodeType;
// Select the desired node level from the node chain, where 0 = Leaf
using DesiredNodeT1 = MyRootNodeT::NodeChainType::Get<1>; // Leaf node parents, lowest internal node
using DesiredNodeT2 = MyRootNodeT::NodeChainType::Get<2>; // lowest internal node parents, second internal node
using TheRootNodeT = MyRootNodeT::NodeChainType::Get<3>; // in default vdb tree configs, this will be the root
...
auto* node = grid->tree().probeNode<DesiredNodeT1>(voxel); // This should now return the DesiredNodeT1 that holds the child data associated with "voxel" |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Thanks for the openVDB software. It's been great to build upon.
One question is how to use the transient data values at the internal node level? What I'm trying to do is to basically attach additional data to a voxel (or node). I am able to do this via multiple grids, but I'm looking for a more memory efficient approach.
Here's an example of my code that I think is relevant. I'm basically running
Basically I tried doing a grid->probeNode and grid->probeLeaf, but I'm getting the voxel's leaf, and the transient data for that leaf.
For further clarification, if I'm able to do this correctly, I'll be able to use the transient data value:
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions