TRANSLATE 3(3P) — Kubota Pacfic Computer Inc. (29 February 1991)
NAME
TRANSLATE 3 − calculate a 3D transformation matrix to perform a specified translation
SYNOPSIS
C Syntax
void
ptranslate3 ( trans_vector, error_ind, m)
Pvec3∗trans_vector;translation vector
Pint∗error_ind;OUT error indicator
Pmatrix3m;OUT transformation matrix
Required PHIGS Operating States
(PHOP, ∗, ∗, ∗)
DESCRIPTION
Purpose
Use TRANSLATE 3 to generate a 3D homogeneous (4 × 4) transformation matrix that performs a 3D translation.
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
trans_vector
A pointer to a Pvec3 structure containing the Modelling Coordinate translation values to be applied in the x, y, and z dimensions. Pvec3 is defined in phigs.h as follows:
typedef struct {
Pfloatdelta_x;/∗ the x axis translation value ∗/
Pfloatdelta_y;/∗ the y axis translation value ∗/
Pfloatdelta_z;/∗ the z axis translation value ∗/
} Pvec3;
C Output Parameters
error_ind
A pointer to the location to store the error number of any error detected by this function.
mThe 4 × 4 homogeneous transformation matrix that performs the specified translation. Pmatrix is defined in phigs.h as follows: typedef Pfloat Pmatrix3[4][4];
Execution
TRANSLATE 3 returns a 3D homogeneous (4 × 4) transformation matrix that performs the translation specified by translation vector.
The translation vector specifies the translation distance in the x, y, and z directions.
ERRORS
002Ignoring function, function requires state (PHOP, ∗, ∗, ∗)
SEE ALSO
SET LOCAL TRANSFORMATION 3 (3P)
SET GLOBAL TRANSFORMATION 3 (3P)
SET VIEW REPRESENTATION 3 (3P)
BUILD TRANSFORMATION MATRIX 3 (3P)
COMPOSE TRANSFORMATION MATRIX 3 (3P)
COMPOSE MATRIX 3 (3P)
TRANSFORM POINT 3 (3P)
TRANSLATE (3P)
September 02, 1992