I'd just like to check that I'm doing this correctly.
Given three points $Q, R, S$ to define a plane:
$ QR = ( R_x - Q_x , R_x - Q_x , R_x - Q_x ) $
$ QS = ( S_x - Q_x , S_x - Q_x , S_x - Q_x ) $
We then do cross product on $QR$ and $QS$ to get $N$, which is a vector perpendicular to the plane.
This gives the equation of the plane as:
$ N_x(x-Q_x)+N_y(y-Q_y)+N_z(z-Q_z) = 0 $
We are then given two points $A, B$ to define a line
This can then be broken down into three parts:
$ x = A_x+(B_x-A_x)*t $
$ y = A_y+(B_y-A_y)*t $
$ z = A_z+(B_z-A_z)*t $
We can then substitute this into the plane equation to solve the plane for $t$.
Once we have $t$ we simply substitute it into the above equations to get the point of collision.
If it is not possible to solve for T, then there are either infinite collisions or no collisions.
Is all that correct or have I missed a step?