#include <revolution/mtx.h>
void MTXLookAt (
Mtx m,
const Point3d* camPos,
const Vec* camUp,
const Point3d* target );
m |
New viewing matrix. The type of m may be either Mtx or MtxPtr. |
|---|---|
| camPos | Pointer to a Point3d giving the camera position in world coordinates |
| camUp | Pointer to a Vec that specifies the camera "up" vector. camUp does not have to be a unit vector. |
| target | Pointer to a Point3d giving the target position in world coordinates |
None.
Sets a matrix for converting from world space to camera space. Generates matrix m by specifying the camera position (camPos), camera "up" direction (camUp), and camera fixation point (target).
The access direction for the line-of-sight of the camera is the -Z axis. The access "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