TRANSLATE(3P) — Kubota Pacfic Computer Inc. (29 February 1991)
NAME
TRANSLATE − calculate a 2D transformation matrix to perform a specified translation
SYNOPSIS
C Syntax
void
ptranslate ( trans_vector, error_ind, m)
Pvec∗trans_vector;translation vector
Pint∗error_ind;OUT error indicator
Pmatrixm;OUT transformation matrix
Required PHIGS Operating States
(PHOP, ∗, ∗, ∗)
DESCRIPTION
Purpose
Use TRANSLATE to generate a 2D homogeneous (3 × 3) transformation matrix that performs a 2D translation.
The returned matrix can be passed as an argument to SET LOCAL TRANSFORMATION or SET GLOBAL TRANSFORMATION to modify the modelling transformation that is applied to output primitives during traversal.
C Input Parameter
trans_vector
A pointer to a Pvec structure containing the Modelling Coordinate translation values to be applied in the x and y dimensions. Pvec is defined in phigs.h as follows:
typedef struct {
Pfloatdelta_x;/∗ the x axis translation value ∗/
Pfloatdelta_y;/∗ the y axis translation value ∗/
} Pvec;
C Output Parameters
error_ind
A pointer to the location to store the error number of any error detected by this function.
mThe 3 × 3 homogeneous transformation matrix that performs the specified translation. Pmatrix is defined in phigs.h as follows: typedef Pfloat Pmatrix[3][3];
Execution
TRANSLATE returns a 2D homogeneous (3 × 3) transformation matrix that performs the translation specified by translation vector.
The translation vector specifies the translation distance in the x and y directions.
ERRORS
002Ignoring function, function requires state (PHOP, ∗, ∗, ∗)
SEE ALSO
SET LOCAL TRANSFORMATION (3P)
SET GLOBAL TRANSFORMATION (3P)
SET VIEW REPRESENTATION (3P)
BUILD TRANSFORMATION MATRIX (3P)
COMPOSE TRANSFORMATION MATRIX (3P)
COMPOSE MATRIX (3P)
TRANSFORM POINT (3P)
TRANSLATE 3 (3P)
September 02, 1992