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

NAME

6       gluUnProject4 - map window and clip coordinates to object coordinates
7

C SPECIFICATION

9       GLint gluUnProject4(GLdouble winX, GLdouble winY, GLdouble winZ,
10                           GLdouble clipW, const GLdouble * model,
11                           const GLdouble * proj, const GLint * view,
12                           GLdouble nearVal, GLdouble farVal, GLdouble* objX,
13                           GLdouble* objY, GLdouble* objZ, GLdouble* objW);
14

PARAMETERS

16       winX, winY, winZ
17           Specify the window coordinates to be mapped.
18
19       clipW
20           Specify the clip w coordinate to be mapped.
21
22       model
23           Specifies the modelview matrix (as from a glGetDoublev() call).
24
25       proj
26           Specifies the projection matrix (as from a glGetDoublev() call).
27
28       view
29           Specifies the viewport (as from a glGetIntegerv() call).
30
31       nearVal, farVal
32           Specifies the near and far planes (as from a glGetDoublev() call).
33
34       objX, objY, objZ, objW
35           Returns the computed object coordinates.
36

DESCRIPTION

38       gluUnProject4 maps the specified window coordinatesi: winX, winY, and
39       winZ and its clip w coordinate clipW into object coordinates objX objY
40       objZ objW using model, proj, and view.  clipW can be other than 1 as
41       for vertices in glFeedbackBuffer() when data type GLU_4D_COLOR_TEXTURE
42       is returned. This also handles the case where the nearVal and farVal
43       planes are different from the default, 0 and 1, respectively. A return
44       value of GLU_TRUE indicates success; a return value of GLU_FALSE
45       indicates failure.
46
47       To compute the coordinates objX objY objZ objW, gluUnProject4
48       multiplies the normalized device coordinates by the inverse of model *
49       proj as follows:
50
51       objX objY objZ objW = INV ⁡ P ⁢ M ⁢ 2 ⁡ winX - view ⁡ 0 view ⁡ 2 - 1 2
52       ⁡ winY - view ⁡ 1 view ⁡ 3 - 1 2 ⁡ winZ - nearVal farVal - nearVal - 1
53       clipW
54
55       INV denotes matrix inversion.
56
57       gluUnProject4 is equivalent to gluUnProject() when clipW is 1, nearVal
58       is 0, and farVal is 1.
59

NOTES

61       gluUnProject4 is available only if the GLU version is 1.3 or greater.
62

SEE ALSO

64       gluProject(), gluUnProject(), glFeedbackBuffer(), glGet()
65
67       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
68       under the SGI Free Software B License. For details, see
69       http://oss.sgi.com/projects/FreeB/.
70

AUTHORS

72       opengl.org
73
74
75
76opengl.org                        06/10/2014                 GLUUNPROJECT4(3G)
Impressum