Lets say I have a line defined in 3 dimensions like so:
class Line{
float startx;
float starty;
float startz;
float endx;
float endy;
float endz;
};
as well as a rectangle defined in 3 dimensions:
class Rectangle{
float ax;
float ay;
float az;
float bx;
//...
float dz;
};
How would I make a function to determine at what point, if at all, a given line and rectangle intersect?