map object coordinates to window coordinates
GLint gluProject( | GLdouble | objX, |
GLdouble | objY, | |
GLdouble | objZ, | |
const GLdouble * | model, | |
const GLdouble * | proj, | |
const GLint * | view, | |
GLdouble* | winX, | |
GLdouble* | winY, | |
GLdouble* | winZ) ; |
objX
, objY
, objZ
Specify the object coordinates.
model
Specifies the current modelview matrix (as from a glGetDoublev call).
proj
Specifies the current projection matrix (as from a glGetDoublev call).
view
Specifies the current viewport (as from a glGetIntegerv call).
winX
, winY
, winZ
Return the computed window coordinates.
gluProject
transforms the specified object coordinates into window coordinates
using model
, proj
, and view
. The result is stored
in winX
, winY
, and winZ
. A return value of
GLU_TRUE
indicates success, a return value of GLU_FALSE
indicates failure.
To compute the coordinates,
let
gluProject
computes
where
proj
and
model
(both represented as
The window coordinates are then computed as follows:
Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/.