guLookAtStereo.3p
1.75 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
64
65
66
67
68
69
70
71
72
73
.TH guLookAtStereo 3P local "Silicon Graphics, Inc."
.SH NAME
.upperok
guLookAtStereo, guLookAtStereoF \- computes a 'lookat' viewing matrix suitable for stereographic projections.
.SH C SPECIFICATION
.nf
\f3#include "gu.h"
void guLookAtStereo(Mtx m,
float xEye, float yEye, float zEye,
float xAt, float yAt, float zAt,
float xUp, float yUp, float zUp,
float eyedist )
void guLookAtStereoF(float m[4][4],
float xEye, float yEye, float zEye,
float xAt, float yAt, float zAt,
float xUp, float yUp, float zUp,
float eyedist )
\fP
.fi
.SH PARAMETERS
.TP 10
.I m
resulting 4x4 viewing matrix.
.TP
.I xEye, yEye, zEye
eye position.
.TP
.I xAt, yAt, zAt
center of interest in the direction we are looking.
.TP
.I xUp, yUp, zUp
up direction vector.
.TP
.I eyedist
the distance from the viewing axis of "this eye". If
.I eyedist
is positive, the resulting matrix is for the "right"
eye, if
.I eyedist
is negative, the resulting matrix is for the "left" eye.
.SH DESCRIPTION
.I guLookAtStereo
Returns a fixed-point 4x4 matrix
.B m,
which can be used for one view of a stereographic projection.
Normally this function must be called twice, calculating different
images for the left and right eyes.
Use a positive eyedist to calculate a matrix for rendering the right eye's
view and the negative of that eyedist to calculate the matrix for the left
eye's view. Unlike the
.I guLookAt
function, the distance from the eye (xEye,yEye,zEye) to the At position
(xAt,yAt,zAt) is important in the
.I guLookAtStereo
function. The At
point is where the eyes focus.
.PP
For a detailed description of the
fixed-point matrix format, see
.I gSPMatrix (3P).
.PP
.I guLookAtStereoF
Returns a floating-point 4x4 matrix
.B m.
.PP
.SH SEE ALSO
.IR gSPMatrix (3P)
.IR gluLookAt (3G)