GLUUNPROJECT(3G) UNIX Programmer's Manual GLUUNPROJECT(3G)
gluUnProject - map window coordinates to object coordinates
GLint gluUnProject( GLdouble winX,
GLdouble winY,
GLdouble winZ,
const GLdouble *model,
const GLdouble *proj,
const GLint *view,
GLdouble* objX,
GLdouble* objY,
GLdouble* objZ )
winX, winY, winZ
Specify the window coordinates to be mapped.
model Specifies the modelview matrix (as from a
glGetDoublev call).
proj Specifies the projection matrix (as from a
glGetDoublev call).
view Specifies the viewport (as from a glGetIn-
tegerv call).
objX, objY, objZ
Returns the computed object coordinates.
gluUnProject maps the specified window coordinates into
object coordinates using model, proj, and view. The result
is stored in objX, objY, and objZ. A return value of GL_TRUE
indicates success; a return value of GL_FALSE indicates
failure.
To compute the coordinates (objX, objY, and objZ),
gluUnProject multiplies the normalized device coordinates by
the inverse of model*proj as follows:
MirOS BSD #10-current Printed 20.2.2012 1
GLUUNPROJECT(3G) UNIX Programmer's Manual GLUUNPROJECT(3G)
| |
| | |
| objX | | |
| objY | |_(__i__X_____i__w__0__)_ - 1 |
| objZ | | view[2] |
| W | = INV(PM)| |
| |_(__i__Y_____i__w__1__)_ - 1 |
| | view[3] |
| 2(winZ) - 1 |
| 1 |
|
MirOS BSD #10-current Printed 20.2.2012 2
GLUUNPROJECT(3G) UNIX Programmer's Manual GLUUNPROJECT(3G)
INV() denotes matrix inversion. W is an unused variable,
included for consistent matrix notation.
glGet(3G), gluProject(3G)
MirOS BSD #10-current Printed 20.2.2012 3
Generated on 2012-02-20 02:47:02 by $MirOS: src/scripts/roff2htm,v 1.70 2011/12/03 18:21:12 tg Exp $
These manual pages and other documentation are copyrighted by their respective writers;
their source is available at our CVSweb,
AnonCVS, and other mirrors. The rest is Copyright © 2002‒2011 The MirOS Project, Germany.
This product includes material
provided by Thorsten Glaser.
This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report – diffs preferred.