AcademySoftwareFoundation / openvdb

OpenVDB - Sparse volume data structure and tools
http://www.openvdb.org/
Mozilla Public License 2.0
2.62k stars 647 forks source link

Get indices from leaf in nanovdb? #1782

Open DiegoBergondo opened 6 months ago

DiegoBergondo commented 6 months ago

Hi,

I'm working on a project with nanovdb and I need the indices() of leaf, like in OpenVDB:

grid->tree().probeLeaf(Coord(x,y,z))->indices()

But I can't find anything similar in the nanovdb leaf:

nanoGrid->getAccessor().probeLeaf(Coord(x,y,z))-> ?

I really need them, is there something equal or equivalent?

Thanks.

kmuseth commented 6 months ago

There is no such method:openvdb::tree::LeafNode::indices()What exactly are you trying to do? Accessing values in a leaf node by linear index?-KenOn Mar 27, 2024, at 6:10 PM, Diego Bergondo @.***> wrote: Hi, I'm working on a project with nanovdb and I need the indices() of leaf, like in OpenVDB: grid->tree().probeLeaf(Coord(x,y,z))->indices() But I can't find anything similar in the nanovdb leaf: nanoGrid->getAccessor().probeLeaf(Coord(x,y,z))-> ? I really need them, is there something equal or equivalent? Thanks.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

DiegoBergondo commented 6 months ago

Hi Ken, thanks for your answer.

I'm trying to do a similar but very small and very limited version of "searchAndApply" from PointIndexFilter of OpenVDB for Cuda, and I have everything I need on the nanogrid but indices and I would need to know if that data is stored somewhere on the nanogrid.

There is no such method:openvdb::tree::LeafNode::indices()What exactly are you trying to do? Accessing values in a leaf node by linear index?-KenOn Mar 27, 2024, at 6:10 PM, Diego Bergondo @.> wrote: Hi, I'm working on a project with nanovdb and I need the indices() of leaf, like in OpenVDB: grid->tree().probeLeaf(Coord(x,y,z))->indices() But I can't find anything similar in the nanovdb leaf: nanoGrid->getAccessor().probeLeaf(Coord(x,y,z))-> ? I really need them, is there something equal or equivalent? Thanks. —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.>