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

NAME

6       gluProject - map object coordinates to window coordinates
7

C SPECIFICATION

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

PARAMETERS

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

DESCRIPTION

33       gluProject transforms the specified object coordinates into window
34       coordinates using model, proj, and view. The result is stored in winX,
35       winY, and winZ. A return value of GLU_TRUE indicates success, a return
36       value of GLU_FALSE indicates failure.
37
38       To compute the coordinates, let v = objX objY objZ 1.0 represented as a
39       matrix with 4 rows and 1 column. Then gluProject computes v ″ as
40       follows:
41
42       v ″ = P × M × v
43
44       where P is the current projection matrix proj and M is the current
45       modelview matrix model (both represented as 4 × 4 matrices in
46       column-major order).
47
48       The window coordinates are then computed as follows:
49
50       winX = view ⁡ 0 + view ⁡ 2 × v ″ ⁡ 0 + 1 2
51

SEE ALSO

53       gluUnProject(), glGet()
54
56       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
57       under the SGI Free Software B License. For details, see
58       http://oss.sgi.com/projects/FreeB/.
59

AUTHORS

61       opengl.org
62
63
64
65opengl.org                        07/13/2018                    GLUPROJECT(3G)
Impressum