guLookAt

guLookAt [Function]

Function

guLookAt

Creates a viewing matrix (fixed point)

Syntax

#include <ultra64.h>        /* gu.h */
void guLookAt(
        Mtx *m,
        float xEye,
        float yEye,
        float zEye,
        float xAt,
        float yAt,
        float zAt,
        float xUp,
        float yUp,
        float zUp);

Arguments

m
Pointer to 4x4 matrix resulting from calculation
xEye
x-coordinate of viewpoint
yEye
y-coordinate of viewpoint
zEye
z-coordinate of viewpoint
xAt
x-coordinate of lookat point
yAt
y-coordinate of lookat point
zAt
z-coordinate of lookat point
xUp
x component of upward vector
yUp
y component of upward vector
zUp
z component of upward vector

Returned value

None.

Description

The viewing matrix is returned to the structure indicated by m. For details about the fixed point format, see gSPMatrix. Floating point can be handled with the guLookAtF function.

Note

The Mtx structure is shown below:

typedef long  Mtx_t[4][4];
typedef union {
     Mtx_t          m;
     long long int  force_structure_alignment;
} Mtx;

See also

gSPMatrix, guLookAtF

Revision history

03/01/99 Completely rewritten.