I think what Tom is asking is how to use HDDA to cast rays through voxels. AFAICT, DDA lets you step along individual voxels, but the HDDA classes (LevelSetHDDA and VolumeHDDA) both have similar but different APIs to the DDA class (I have trouble following those docs). There's the
LevelSetRayIntersector and
VolumeRayIntersector classes which may do what Tom wants?
What I can't figure out from the docs is how to cast a finite-length ray through a sparse volume and have it tell me at each step if it's gotten to the end of the ray and how many voxels it skipped. It looks like
LevelSetRayIntersector may do this with its
intersectsIS member function? (
TestLevelSetRayIntersector.cc shows example usage, although I don't see it showing misses: either misses that graze an active leaf and then miss or misses due to a finite-length ray.
Is
LevelSetRayIntersector the right thing for looking for occupied voxels along rays? Can it short-circuit if I want to search a finite distance or do I have to let it keep going until it finds something?
Thanks,
Ben