ROTATE Y(3P) — SUNPHIGS LIBRARY
NAME
ROTATE Y − calculate a 3D transformation matrix to perform a specified rotation about the y axis.
SYNOPSIS
C Syntax
void
protatey ( angle, error_ind, matrix )
Pfloatangle;rotation angle
Pint∗error_ind;OUT error indicator
Pmatrix3matrix;OUT transformation matrix
FORTRAN Syntax
SUBROUTINE proy ( ROTANG, ERRIND, XFRMT )
REALROTANGrotation angle in radians (positive
if anticlockwise)
INTEGERERRINDOUT error indicator
REALXFRMT(4, 4)OUT transformation matrix
Required PHIGS Operating States
(PHOP, ∗, ∗, ∗)
DESCRIPTION
Purpose
Use ROTATE Y to generate a 3D homogeneous (4 x 4) transformation matrix that performs a 3D rotation about the y axis.
The returned matrix may be passed as an argument to SET LOCAL TRANSFORMATION 3 or SET GLOBAL TRANSFORMATION 3 to modify the modelling transformation that is applied to output primitives during traversal.
C Input Parameter
angleThe angle of the rotation in radians. Positive angles indicate counter-clockwise rotation, negative angles indicate clockwise rotation.
C Output Parameters
error_ind
A pointer to the location to store the error number of any error detected by this function.
matrix
The 4 x 4 homogeneous transformation matrix that performs the specified rotation. Pmatrix3 is defined in phigs.h as follows:
typedef Pfloat Pmatrix3[4][4];
FORTRAN Input Parameter
ROTANG
The angle of the rotation in radians. Positive angles indicate counter-clockwise rotation, negative angles indicate clockwise rotation.
FORTRAN Output Parameters
ERRIND
The error number of any error detected by this function.
XFRMT
The 4 x 4 homogeneous transformation matrix that performs the specified rotation.
Execution
ROTATE Y returns the 3D homogeneous (4 x 4) transformation matrix that performs the rotation specified by angle about the y axis. The rotation is specified in radians and is relative to the origin of the current modelling coordinate system.
ERRORS
002Ignoring function, function requires state (PHOP, ∗, ∗, ∗)
SEE ALSO
ROTATE (3P)
SET LOCAL TRANSFORMATION 3 (3P)
BUILD TRANSFORMATION MATRIX 3 (3P)
COMPOSE MATRIX 3 (3P)
TRANSFORM POINT 3 (3P)
Sun Release 4.0 — Last change: 1 August 1989