I have an input as set of voxels with their centre's (x,y,z) given. I have a set of lines. I want to find if a line is intersected by any voxel in the given voxel set. (Yes/No Question). The current algorithm I am using is to traverse through the complete voxel set until I found intersection with any voxel. This takes much time. Is it any way to do it faster?
I am finding intersection of a voxel with the line by calculating the distance of the centre of the voxel from the line and checking whether it is less than some small quantity.