Previous Next Up Title Contents Index Functions Index Top Library

DEFINE COORDINATE SYSTEM

PXDEF_COORD_SYS


CALL SEQUENCE

void pxdef_coord_sys (
)

EFFECT

Return a 4x4 matrix which represents a 3D coordinate system with specified origin, up vector, and normal vector.

If the input parameters are valid, the error indicator will be 0 and a 3D transformation matrix which mathematically represents the new coordinate system is computed and returned in the output matrix.

Otherwise, the error indicator will specify which error occurred and the output matrix will be undefined. The error indicator can take on the following values:

0
No error
161
Ignoring function, the view up and view plane normal vectors are parallel; thus, the viewing coordinate system cannot be established.

The Z plane normal vector and the up vector are specified relative to the specified origin. The up vector specifies the direction which, when projected onto the Z plane, indicates the positive Y axis.

To insert this matrix into the open structure, use the Set Local Transformation 3 function (routine pset_local_tran3), or the Set Global Transformation 3 function (routine pset_global_tran3).

ERRORS

None

SEE ALSO

Extension transformation routines, see pxrotate, pxrotate_x, pxrotate_y, pxrotate_z, pxscale, pxscale3, pxtranslate, pxtranslate3

General transformations, see pbuild_tran_matrix, pbuild_tran_matrix3, pcompose_tran_matrix, pcompose_tran_matrix3

Global transformations, see pset_global_tran, pset_global_tran3

Local transformations, see pset_local_tran, pset_local_tran3

Matrix composition (multiplication), see pcompose_matrix, pcompose_matrix3

Rotate, see protate, protate_x, protate_y, protate_z

Scale, see pscale, pscale3

Translate, see ptranslate, ptranslate3


Previous Next Up Title Contents Index Functions Index Top Library