guLookAtHilite.3p 2.4 KB
.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)