fast-voxel-traversal-algorithm
fast-voxel-traversal-algorithm copied to clipboard
A C++ implementation of the fast voxel traversal algorithm.
I'm trying to understand the suggestion on how to compute `tMax` which is describes as below ``` // grid.minBound.x is the lower left corner of the grid. // current_X_index is...
while (current_X_index != end_X_index || current_Y_index != end_Y_index || current_Z_index != end_Z_index) if for whatever reason these indexes never happen the loop will hang forever. I am not yet sure...
Code like this, seems to set the index to a minimum of 1 ? Why do that ? Does this code assume the voxel grid starts at index 1,1,1 ?...
Ray direction is not computed by the code/algorithm, I noticed this while trying to apply the code. Fortunately it does not seem to complex, though it could get a bit...
The link for 'safer' implementation is invalid. Don't you think that this resource is valid, for that task: https://www.pbr-book.org/3ed-2018/Shapes/Basic_Shape_Interface or this https://www.scratchapixel.com/lessons/3d-basic-rendering/minimal-ray-tracer-rendering-simple-shapes/ray-box-intersection.html#:~:text=time%3A%2010%20mins.-,Ray%2DBox%20Intersection,1%20and%20b%3D%2D1.