Optimized the initialization of voxel boundary segments; Since the boundary segments for the maximum radius will be the same for all rays through a similar sphere, this can be done in the construction of the SphericalVoxelGrid.
In CalculateVoxelID(), I was using const std::vector instead of const std::vector & which was creating a copy on each call. Fixing this bug allowed for a major speedup.
@ak-2485 , @nukenukenukelol I'm going to push this for now so that Matt isn't being hindered by this. If you have any changes / comments, I will include them in the next PR.
const std::vector
instead ofconst std::vector &
which was creating a copy on each call. Fixing this bug allowed for a major speedup.