I am looking for an algorithm that determines the near and far intersection points between a line segment and an axis-aligned field.
Here is my method definition:
public static Point3D[] IntersectionOfLineSegmentWithAxisAlignedBox( Point3D rayBegin, Point3D rayEnd, Point3D boxCenter, Size3D boxSize)
If the line segment does not cross the field, the method should return an empty Point3D array.
From my research so far, I have come across some research papers with highly optimized algorithms, but they all seem to be written in C ++ and will require several large class files to be converted to C #. For my purposes, it is preferable that it is reasonably effective, it is easy to understand someone who receives point products and cross products, and simple / short.
source share