guPerspective.3p
1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
.TH guPerspective 3P local "Silicon Graphics, Inc."
.SH NAME
.upperok
guPerspective, guPerspectiveF \- computes a perspective projection matrix.
.SH C SPECIFICATION
.nf
\f3#include "gu.h"
void guPerspective(Mtx m, u16 *perspNorm,
float fovy, float aspect,
float near, float far, float scale)
void guPerspectiveF(float m[4][4], u16 *perspNorm,
float fovy, float aspect,
float near, float far, float scale)
\fP
.fi
.SH PARAMETERS
.TP 10
.I m
resulting 4x4 projection matrix.
.TP
.I perspNorm
value to use with the
.I gSPPerspNormalize
command.
.TP
.I fovy
field of view angle, in degrees, in the y direction.
.TP
.I aspect
aspect ratio that determines the field of view in the x direction.
The aspect ratio is the ratio of x (width) to y (height) of the
viewport region.
.TP
.I near, far
distance from the viewer to the near and far clipping plane (always positive).
.TP
.I scale
scale each element of the matrix.
Can be used to improve precision in the RSP fixed-point arithmetic.
.SH DESCRIPTION
.I guPerspective
returns a fixed-point 4x4 matrix
.B m
and a number to use with
.I gSPPerspNormalize.
.PP
For a detailed description of the
fixed-point matrix format, see
.I gSPMatrix (3P).
.PP
.I guPerspectiveF
returns a floating-point 4x4 matrix
.B m.
.SH SEE ALSO
.IR guFrustum (3P)
.IR guOrtho (3P)
.IR gSPMatrix (3P)
.IR gSPPerspNormalize (3P)
.IR gluPerspective (3G)