Previous Next Up Title Contents Index Functions Index Top Library

DEFINE COORDINATE SYSTEM

PDECSY


CALL SEQUENCE

CALL PDECSY ( VWRX,VWRY,VWRZ, VPNX,VPNY,VPNZ, VUPX,VUPY,VUPZ, ERRIND, VWORMT)

INPUT PARAMETERS

REAL VWRX,VWRY,VWRZ
X, Y, and Z coordinates of origin in MC
REAL VPNX,VPNY,VPNZ
X, Y, and Z components of Z plane normal vector in MC
REAL VUPX,VUPY,VUPZ
X, Y, and Z components of up vector in MC

OUTPUT PARAMETERS

INTEGER ERRIND
Error indicator
REAL VWORMT(4,4)
Output matrix

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 PSLMT3), or the Set Global Transformation 3 function (routine PSGMT3).

ERRORS

None

SEE ALSO

Extension transformation routines, see PXRO, PXROX, PXROY, PXROZ, PXSC, PXSC3, PXTR, PXTR3

General transformations, see PBLTM, PBLTM3, PCOM, PCOM3

Global transformations, see PSGMT, PSGMT3

Local transformations, see PSLMT, PSLMT3

Matrix composition (multiplication), see PCOM, PCOM3

Rotate, see PRO, PROX, PROY, PROZ

Scale, see PSC, PSC3

Translate, see PTR, PTR3


Previous Next Up Title Contents Index Functions Index Top Library