guAlign.3p
950 Bytes
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
.TH guAlign 3P local "Silicon Graphics, Inc."
.SH NAME
.upperok
guAlign, guAlignF \- computes a vector alignment modeling matrix.
.SH C SPECIFICATION
.nf
\f3#include "gu.h"
void guAlign(Mtx m, float a, float x, float y, float z)
void guAlignF(float m[4][4], float a, float x, float y, float z)
\fP
.fi
.SH PARAMETERS
.TP 10
.I m
resulting 4x4 matrix.
.TP
.I a
angle of rotation around the alignment vector, in radians.
.TP
.I x, y, z
vector to align the negative Z axis to.
.TP
.SH DESCRIPTION
.I guAlign
returns a fixed-point modeling matrix
.B m
that can be used to align the model with a vector, plus a rotation
around that vector. The vector need not be normalized, and the angle
should be in radians.
.PP
For a detailed description of the
fixed-point matrix format, see
.I gSPMatrix (3P).
.PP
.I guAlignF
returns a fixed-point modeling matrix
.B m.
.SH SEE ALSO
.IR guRotate (3P)
.IR guTranslate (3P)
.IR guScale (3P)
.IR gSPMatrix (3P)