1GLUUNPROJECT(3G)                 OpenGL Manual                GLUUNPROJECT(3G)
2
3
4

NAME

6       gluUnProject - map window coordinates to object coordinates
7

C SPECIFICATION

9       GLint gluUnProject(GLdouble winX, GLdouble winY, GLdouble winZ,
10                          const GLdouble * model, const GLdouble * proj,
11                          const GLint * view, GLdouble* objX, GLdouble* objY,
12                          GLdouble* objZ);
13

PARAMETERS

15       winX, winY, winZ
16           Specify the window coordinates to be mapped.
17
18       model
19           Specifies the modelview matrix (as from a glGetDoublev() call).
20
21       proj
22           Specifies the projection matrix (as from a glGetDoublev() call).
23
24       view
25           Specifies the viewport (as from a glGetIntegerv() call).
26
27       objX, objY, objZ
28           Returns the computed object coordinates.
29

DESCRIPTION

31       gluUnProject maps the specified window coordinates into object
32       coordinates using model, proj, and view. The result is stored in objX,
33       objY, and objZ. A return value of GLU_TRUE indicates success; a return
34       value of GLU_FALSE indicates failure.
35
36       To compute the coordinates objX objY objZ, gluUnProject multiplies the
37       normalized device coordinates by the inverse of model * proj as
38       follows:
39
40       objX objY objZ W = INV ⁡ P ⁢ M ⁢ 2 ⁡ winX - view ⁡ 0 view ⁡ 2 - 1 2 ⁡
41       winY - view ⁡ 1 view ⁡ 3 - 1 2 ⁡ winZ - 1 1INV denotes matrix
42       inversion. W is an unused variable, included for consistent matrix
43       notation.
44

SEE ALSO

46       gluProject(), glGet()
47
49       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
50       under the SGI Free Software B License. For details, see
51       http://oss.sgi.com/projects/FreeB/.
52

AUTHORS

54       opengl.org
55
56
57
58opengl.org                        06/10/2014                  GLUUNPROJECT(3G)
Impressum