guLookAtHilite.3p
2.4 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
.TH guLookAtHilite 3P local "Silicon Graphics, Inc."
.SH NAME
.upperok
guLookAtHilite, guLookAtHiliteF \- computes a 'lookat' viewing matrix, sets
up the LookAt structure
with values
for performing reflection mapping or specular hilite rendering,
and computes texture offsets of
two specular highlights (in the Hilite structure).
.SH C SPECIFICATION
.nf
\f3#include "gu.h"
void guLookAtHilite(Mtx *m, LookAt *l, Hilite *h,
float xEye, float yEye, float zEye,
float xAt, float yAt, float zAt,
float xUp, float yUp, float zUp,
float xl1, float yl1, float zl1,
float xl2, float yl2, float zl2,
int twidth, int theight)
void guLookAtHiliteF(float m[4][4], LookAt *l, Hilite *h,
float xEye, float yEye, float zEye,
float xAt, float yAt, float zAt,
float xUp, float yUp, float zUp,
float xl1, float yl1, float zl1,
float xl2, float yl2, float zl2,
int twidth, int theight)
\fP
.fi
.SH PARAMETERS
.TP 10
.I m
resulting 4x4 viewing matrix.
.TP
.I l
pointer to resulting LookAt structure to store colors and lookat directions.
.TP
.I h
pointer to resulting structure to store texture offsets of two specular
highlights.
.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 xl1, yl1, zl1
direction of first specular highlight.
.TP
.I xl2, yl2, zl2
direction of second specular highlight.
.TP
.I twidth, theight
width and height of textures which will be used to render specular highlights.
.SH DESCRIPTION
The
.B guLookAtHilite
command returns a fixed-point 4x4 viewing matrix
.B m.
It sets up the LookAt structure
with x and y screen space coordinate
directions. It sets up the Hilite structure with computed offsets into the
texture(s) that are used to render up to two specular highlights. Use the
.IR gDPSetHiliteTile (3P)
macro to tell the RCP how to render specular hilites (with the info in
the Hilite struct h) and the
.IR gSPLookAt (3P)
macro to tell the RCP how to compute texture coordinates for reflection
mapping or specular hilite rendering (with the info in the LookAt struct l).
.PP
For a detailed description of the fixed-point matrix format, see
.I gSPMatrix (3P).
.PP
The
.B guLookAtHiliteF
command returns a floating-point 4x4 viewing matrix
.B m.
.SH SEE ALSO
.IR gSPMatrix (3P),
.IR guLookAt (3P),
.IR guLookAtReflect (3P),
.IR gluLookAt (3G)
.IR gSPLookAt (3P)
.IR gDPSetHiliteTile (3P)