   rotation matrix from plane equation?
  HowdyOk, I have a question that I'll sure will be an easy one for anyone who passed 2nd grade maths but I must have missed it somehow... :)I have a plane equation. I have a vector along the plane and an "up" vector (the normal). I would like to rotate an object so that it's up is the same as the up, and it faces forward along the plane.Is there an easy way to work out a rotation matrix out of these 2 vectors? Now I think about it, I basically need a function like OpenGL's gluLookAt, but that returns a matrix. I think I can do that by simply using the up, right, and front vectors and plugging them into a matrix? But I'm a little stuck on how to exactly do it, and how to get that right vector from the other 2?Hmm, this might sound a little stupid, I hope I explained it well enough.Any help would be greatly appreciated.Thanks!Rob.   
  The 'right' vector is simply the cross product of the up and forward vectors. To submit the transform to OpenGL, load the right, up, and forward vectors into elements [0,1,2], [4,5,6], and [8,9,10] of a 1-d array. (Note that what we're really doing here is loading the basis vectors into the columns of a column-major 4x4 matrix.)Make sure the rest of the matrix is set to identity, and then upload the matrix to OpenGL via glMultMatrix*() or glLoadMatrix*().   ;  Thank you!I had the order wrong and was getting some weird results. Now wonder! :)   