~ubuntu-branches/ubuntu/gutsy/vnc4/gutsy

« back to all changes in this revision

Viewing changes to unix/xc/doc/man/GLU/project.3gl

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2006-05-15 20:35:17 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060515203517-l4lre1ku942mn26k
Tags: 4.1.1+X4.3.0-10
* Correction of critical security issue. Thanks to Martin Kogler
  <e9925248@student.tuwien.ac.at> that informed me about the issue,
  and provided the patch.
  This flaw was originally found by Steve Wiseman of intelliadmin.com.
* Applied patch from Javier Kohen <jkohen@users.sourceforge.net> that
  inform the user that only 8 first characters of the password will
  actually be used when typing more than 8 characters, closes:
  #355619.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'\" e
 
2
'\"! eqn | mmdoc
 
3
'\"macro stdmacro
 
4
.ds Vn Version 1.2
 
5
.ds Dt 6 March 1997
 
6
.ds Re Release 1.2.0
 
7
.ds Dp May 02 11:53
 
8
.ds Dm 37 project.g
 
9
.ds Xs 21974 4 project.gl
 
10
.TH GLUPROJECT 3G
 
11
.SH NAME
 
12
.B "gluProject
 
13
\- map object coordinates to window coordinates
 
14
 
 
15
.SH C SPECIFICATION
 
16
GLint \f3gluProject\fP(
 
17
GLdouble \fIobjX\fP,
 
18
.nf
 
19
.ta \w'\f3GLint \fPgluProject( 'u
 
20
        GLdouble \fIobjY\fP,
 
21
        GLdouble \fIobjZ\fP,
 
22
        const GLdouble \fI*model\fP,
 
23
        const GLdouble \fI*proj\fP,
 
24
        const GLint \fI*view\fP,
 
25
        GLdouble* \fIwinX\fP,
 
26
        GLdouble* \fIwinY\fP,
 
27
        GLdouble* \fIwinZ\fP )
 
28
.fi
 
29
 
 
30
.EQ
 
31
delim $$
 
32
.EN
 
33
.SH PARAMETERS
 
34
.TP \w'\f2objX\fP\ \f2objY\fP\ \f2objZ\fP\ \ 'u 
 
35
\f2objX\fP, \f2objY\fP, \f2objZ\fP
 
36
Specify the object coordinates.
 
37
.TP
 
38
\f2model\fP
 
39
Specifies the current modelview matrix (as from a \f3glGetDoublev\fP call).
 
40
.TP
 
41
\f2proj\fP
 
42
Specifies the current projection matrix (as from a \f3glGetDoublev\fP call).
 
43
.TP
 
44
\f2view\fP
 
45
Specifies the current viewport (as from a \f3glGetIntegerv\fP call).
 
46
.TP
 
47
\f2winX\fP, \f2winY\fP, \f2winZ\fP
 
48
Return the computed window coordinates.
 
49
.SH DESCRIPTION
 
50
\%\f3gluProject\fP transforms the specified object coordinates into window coordinates
 
51
using \f2model\fP, \f2proj\fP, and \f2view\fP. The result is stored 
 
52
in \f2winX\fP, \f2winY\fP, and \f2winZ\fP. A return value of 
 
53
\%\f3GL_TRUE\fP indicates success, a return value of \%\f3GL_FALSE\fP
 
54
indicates failure.
 
55
.P
 
56
To compute the coordinates,
 
57
let $v ~=~ ("objX", "objY", "objZ", 1.0)$
 
58
represented as a matrix with 4 rows and 1 column.
 
59
Then \%\f3gluProject\fP computes $v sup prime$
 
60
as follows: 
 
61
.sp
 
62
.EQ
 
63
v sup prime ~=~ P ~times~ M ~times~ v
 
64
.EN
 
65
.sp
 
66
where $P$ is the current projection matrix \f2proj\fP, $M$ is the current
 
67
modelview matrix \f2model\fP (both represented as
 
68
$4 times 4$ matrices in column-major order) and '$times$' represents
 
69
matrix multiplication. 
 
70
.P 
 
71
The window coordinates are then computed as follows: 
 
72
.sp
 
73
.EQ
 
74
"winX" ~=~ "view" (0) ~+~ "view" (2) ~*~ (v sup prime (0) ~+~ 1)~/~2 
 
75
.EN
 
76
.sp
 
77
.EQ
 
78
"winY" ~=~ "view" (1) ~+~ "view" (3)~*~(v sup prime (1) ~+~ 1)~/~2 .EN
 
79
.sp
 
80
.EQ
 
81
"winZ" ~=~ (v sup prime (2)  ~+~ 1)~/~ 2
 
82
.EN
 
83
.sp
 
84
.SH SEE ALSO
 
85
\f3glGet(3G)\fP, \%\f3gluUnProject(3G)\fP
 
86