GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


Manpage of GLUUNPROJECT

GLUUNPROJECT

Index
 

NAME

gluUnProject - map window coordinates to object coordinates

 

C SPECIFICATION

GLint f3gluUnProjectfP( GLdouble fIwinXfP,
f2winXfP, f2winYfP, f2winZfP
Specify the window coordinates to be mapped.
f2modelfP
Specifies the modelview matrix (as from a f3glGetDoublevfP call).
f2projfP
Specifies the projection matrix (as from a f3glGetDoublevfP call).
f2viewfP
Specifies the viewport (as from a f3glGetIntegervfP call).
f2objXfP, f2objYfP, f2objZfP
Returns the computed object coordinates.
 

DESCRIPTION

%f3gluUnProjectfP maps the specified window coordinates into object coordinates using f2modelfP, f2projfP, and f2viewfP. The result is stored in f2objXfP, f2objYfP, and f2objZfP. A return value of %f3GL_TRUEfP indicates success; a return value of %f3GL_FALSEfP indicates failure. To compute the coordinates (f2objXfP, f2objYfP, and f2objZfP), %f3gluUnProjectfP multiplies the normalized device coordinates by the inverse of f2modelfP*f2projfP as follows:


left ( down 70 {cpile { ~"objX" above ~"objY" above ~"objZ" above ~W}} ~~ right ) ~=~ INV(P M) left ( down 140 {cpile { { {2("winX" ~-~ "view"[0])} over {"view" [2]} ~-~ 1 } above { {2("winY" ~-~ "view"[1])} over {"view"[3]} ~-~ 1 } above { 2("winZ") ~-~ 1 } above 1}} ~~ right ) $INV()$ denotes matrix inversion. W is an unused variable, included for consistent matrix notation.  

SEE ALSO

f3glGet(3G)fP, %f3gluProject(3G)fP


 

Index

NAME
C SPECIFICATION
DESCRIPTION
SEE ALSO