NVIDIA / gvdb-voxels

Sparse volume compute and rendering on NVIDIA GPUs
Other
679 stars 145 forks source link

Is it safe to use mValue for nodes at intermediate levels ? #16

Closed oursnoir closed 6 years ago

oursnoir commented 6 years ago

Hi !

I would like to know if I can put arbitrary custom data inside mValue for nodes that are not bricks ?

Thanks in advance !

ramakarl commented 6 years ago

Yes, mValue is not currently used on interior nodes, and was intended to be used for additional data.

Keep in mind if you attach arbitrary user data, you would also need to manage how that data resides on GPU. This is why GVDB uses indices rather than pointers for brick data. That way you can index another data structure regardless of whether it is on cpu or gpu.

oursnoir commented 6 years ago

Thanks for the clarification !