void pxdef_coord_sys (
Ppoint3 *ref_pt, /*X, Y, and Z coordinates of origin in MC */ Pvec3 *z_norm, /*X, Y, and Z components of Z plane normal vector in MC */ Pvec3 *up_vect, /*X, Y, and Z components of up vector in MC */ Pint *error_ind, /*error indicator */ Pmatrix3 result /*output matrix */
)
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:
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).
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
Translate, see ptranslate, ptranslate3