TRANSFORM POINT 3(3P) — SUNPHIGS LIBRARY
NAME
TRANSFORM POINT 3 − apply a 3D transformation matrix to a specified 3D point
SYNOPSIS
C Syntax
void
ptranpt3 ( pt, matrix, error_ind, result )
Ppoint3∗pt;point
Pmatrix3matrix;transformation matrix
Pint∗error_ind;OUT error indicator
Ppoint3∗result;OUT transformed point
FORTRAN Syntax
SUBROUTINE ptp3 ( XI, YI, ZI, XFRMT, ERRIND, XO, YO, ZO )
REALXI, YI, ZIpoint
REALXFRMT(4, 4)transformation matrix
INTEGERERRINDOUT error indicator
REALXO, YO, ZOOUT transformed point
Required PHIGS Operating States
(PHOP, ∗, ∗, ∗)
DESCRIPTION
Purpose
Use TRANSFORM POINT 3 to calculate the transformed coordinates of a 3D point.
C Input Parameters
ptA pointer to a Ppoint3 data structure containing the coordinates of the point to be transformed. Ppoint3 is defined in phigs.h as follows:
typedef struct {
Pfloatx;/∗ x coordinate ∗/
Pfloaty;/∗ y coordinate ∗/
Pfloatz;/∗ z coordinate ∗/
} Ppoint3;
matrixThe 4 x 4 homogeneous transformation matrix to apply to pt. Pmatrix3 is defined in phigs.h as follows:
typedef PfloatPmatrix3[4][4];
C Output Parameters
error_ind
A pointer to the location to store the error number of any error detected by this function.
resultA pointer to a Ppoint3 structure in which to store the coordinates of the transformed point.
FORTRAN Input Parameters
XI, YI, ZI
The coordinates of the point to be transformed.
XFRMT
The 4 x 4 homogeneous transformation matrix to apply to the point defined by (XI, YI, ZI).
FORTRAN Output Parameters
ERRIND
The error number of any error detected by this function.
XO, YO, ZO
The coordinates of the transformed point.
Execution
TRANSFORM POINT applies the 4 x 4 homogeneous transformation matrix to the 3D point, and returns the coordinates of the resulting point: transformed point = matrix X point
ERRORS
002Ignoring function, function requires state (PHOP, ∗, ∗, ∗)
SEE ALSO
SET LOCAL TRANSFORMATION 3 (3P)
ROTATE X (3P)
ROTATE Y (3P)
ROTATE Z (3P)
SCALE 3 (3P)
TRANSLATE 3 (3P)
BUILD TRANSFORMATION MATRIX 3 (3P)
COMPOSE TRANSFORMATION MATRIX 3 (3P)
COMPOSE MATRIX 3 (3P)
TRANSFORM POINT (3P)
Sun Release 4.0 — Last change: 7 July 1989