[Plib-users] Window (x,y) to world coordinates
Brought to you by:
sjbaker
From: Ask F. J. <ask...@ya...> - 2001-12-20 00:08:49
|
Hello all, I have a PLIB application in which my camera is facing down along the Z axis to look at a grid on the XY plane. I can move the camera up and down along the Z axis to effectively 'zoom' my view of the plane. I can also move the camera along the XY axis, but in all cases I am looking down square upon the XY axis . What I am looking for is a way to translate window coordinates obtained from the mouse to world coordinates, taking into account the window dimensions and current camera position. Is there an easy formula or matrix operation in PLIB that will allow me to do this? I tried playing around with the ortho matrix, but my experimentation didn't get me very far. BTW, PLIB is wonderful. Its very gradual learning curve and intutitive interface is the main reason why I switched back from Direct3D to OpenGL for my application. Thanks for your help, Aaron [ask...@ya...] _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |