This manual page is for Mac OS X version 10.6.3

If you are running a different version of Mac OS X, view the documentation locally:

  • In Terminal, using the man(1) command

Reading manual pages

Manual pages are intended as a quick reference for people who already understand a technology.

  • For more information about the manual page format, see the manual page for manpages(5).

  • For more information about this technology, look for other documentation in the Apple Reference Library.

  • For general information about writing shell scripts, read Shell Scripting Primer.



GLUPROJECT(3G)                                                                                GLUPROJECT(3G)



NAME
       gluProject - map object coordinates to window coordinates


C SPECIFICATION
       GLint gluProject( GLdouble objX,
                         GLdouble objY,
                         GLdouble objZ,
                         const GLdouble *model,
                         const GLdouble *proj,
                         const GLint *view,
                         GLdouble* winX,
                         GLdouble* winY,
                         GLdouble* winZ )


PARAMETERS
       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.

DESCRIPTION
       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 GL_TRUE  indicates  success,  a
       return value of GL_FALSE indicates failure.

       To compute the coordinates, let v = (objX, objY, objZ, 1.0) represented as a matrix with 4 rows and 1
       column.  Then gluProject computes v' as follows:

                                                  v' = P X M X v

       where P is the current projection matrix proj, M is the current modelview matrix model  (both  repre-sented represented
       sented as 4x4 matrices in column-major order) 'X' represents matrix multiplication.

       The window coordinates are then computed as follows:

       winX = view(0) + view(2) * (v'(0)+1)/2

       winY = view(1) + view(3) * (v'(1)+1)/2

       winZ = (v'(2) + 1) / 2



SEE ALSO
       glGet(3G), gluUnProject(3G)





                                                                                              GLUPROJECT(3G)

Reporting Problems

The way to report a problem with this manual page depends on the type of problem:

Content errors
Report errors in the content of this documentation to the OpenGL project.
Bug reports
Report bugs in the functionality of the described tool or API through Bug Reporter.
Formatting problems
Report formatting mistakes in the online version of these pages with the feedback links below.

Did this document help you? Yes It's good, but... Not helpful...