#include <revolution/mtx.h>
void MTXLookAt (
Mtx m,
const Point3d* camPos,
const Vec* camUp,
const Point3d* target );
m |
New viewing matrix. m may be either an Mtx or an MtxPtr. |
camPos |
Pointer to a Point3d giving 3D camera position in world space. |
camUp |
Pointer to a Vec containing camera "up" vector. camUp does not have to be a unit vector. |
target |
Pointer to a Point3d giving 3D target position in world space. |
None.
Sets a matrix for converting from world space to camera space. Generates the matrix m by specifying the camera position (camPos), camera "up" direction (camUp), and camera focus point (target).
The reference direction for the line-of-sight of the camera is the -Z axis. The reference for the "up" direction of the camera is the +Y axis.
This function is particularly useful for creating a fixed-position camera which can be aimed at objects, panned, and for which any view can be specified.
Mtx, MtxPtr, Point3d, Point3dPtr, Vec, VecPtr
2006/03/01 Initial version.
CONFIDENTIAL