COMPOSE MATRIX(3P) — SUNPHIGS LIBRARY
NAME
COMPOSE MATRIX − generate the composition of two homogeneous 2D matrices
SYNOPSIS
C Syntax
void
pcomposematrix ( a, b, error_ind, result )
Pmatrixa;matrix a
Pmatrixb;matrix b
Pint∗error_ind;OUT error indicator
Pmatrixresult;OUT result matrix
FORTRAN Syntax
SUBROUTINE pcom ( XFRMTA, XFRMTB, ERRIND, XFRMTO )
REALXFRMTA(3, 3)transformation matrix A
REALXFRMTB(3, 3)transformation matrix B
INTEGERERRINDOUT error indicator
REALXFRMTO(3, 3)OUT composed transformation matrix
Required PHIGS Operating States
(PHOP, ∗, ∗, ∗)
DESCRIPTION
Purpose
Use COMPOSE MATRIX to produce a 2D (3 x 3) homogeneous matrix that is the composition (matrix multiplication product) of two specified 3 x 3 matrices.
The returned matrix may be passed to the SET LOCAL TRANSFORMATION and SET GLOBAL TRANSFORMATION functions, or to any PHIGS function accepting a parameter of type Pmatrix.
C Input Parameters
a, bThe 2D (3 x 3) matrices used to calculate the composition matrix. Matrices are specified as a Pmatrix array defined in phigs.h as follows:
typedef Pfloat Pmatrix[3][3]
C Output Parameters
error_ind
A pointer to the location to store the error number of any error detected by this function.
resultThe resulting composition matrix.
FORTRAN Input Parameters
XFRMTA, XFRMTB
The 2D (3 x 3) matrices used to calculate the composition matrix.
FORTRAN Output Parameters
ERRIND
The error number of any error detected by this function.
XFRMTO
The resulting composition matrix.
Execution
COMPOSE MATRIX returns a 3 x 3 matrix that is the result of multiplying the two specified matrices a and b:
result = a x b
ERRORS
002Ignoring function, function requires state (PHOP, ∗, ∗, ∗)
SEE ALSO
COMPOSE MATRIX 3 (3P)
COMPOSE TRANSFORMATION MATRIX (3P)
BUILD TRANSFORMATION MATRIX (3P)
SET LOCAL TRANSFORMATION (3P)
SET GLOBAL TRANSFORMATION (3P)
Sun Release 4.0 — Last change: 31 July 1989