NVIDIA / gvdb-voxels

Sparse volume compute and rendering on NVIDIA GPUs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

is it possible to perfrom collision checks Whether there is collsion between a given volume box and gvdb-voxels?

jediofgever opened this issue · comments

Hi I am wondering whats the most efficient way to perform collision checks within gvdb-voxels?
I look through whole documentation and API but didn't see anything related to it.

You could write a kernel to do this.
Pass the bounding box min/max into a voxel compute kernel.
Then for each voxel above your threshold check if its inside the test volume. Each thread can write a single bit/byte into a global array as out (0=no hit, 1=hit). Bring back the output array to CPU. Then perform a compute reduction (sum all 1 entries) on the global array, that will tell you whether there is a collision and also the amount of collision (volume integral).
There is no build-in function to do collision tests, but the function for reductions is there.