fast-voxel-traversal-algorithm icon indicating copy to clipboard operation
fast-voxel-traversal-algorithm copied to clipboard

Why +1 ?

Open SkybuckFlying opened this issue 3 years ago • 0 comments

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 ?

size_t current_X_index = MAX(1, std::ceil(ray_start.x() - grid.minBound().x() / grid.voxelSizeX()));
const size_t end_X_index = MAX(1, std::ceil(ray_end.x() - grid.minBound().x() / grid.voxelSizeX()));

SkybuckFlying avatar Mar 09 '22 08:03 SkybuckFlying