PDA

View Full Version : how to calculate a particular transformation matrix



amhigh
03-31-2005, 07:47 AM
Dear All:

I am using OpenGL under Window XP for MFC application. I draw a "flat plan" (like one face of a box), the normal vector of this plan is known (since it is a flat plan), but this normal vector is not parallel to any of the x, y or z axis. I would like to know: if this plan is drawn, and if the user use the mouse to rotate this plan, since I know the normal vector of this plan, would it possible to calculate the transformation matrix so that this plan will "face" exactly the user (ie, the normal vector of this plan will point toward to the window screen)?

Thanks for any hints.