fast-voxel-traversal-algorithm
fast-voxel-traversal-algorithm copied to clipboard
Why +1 ?
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()));