ptranslate(3g) — Subroutines
Name
ptranslate − Creates a 2D homogeneous transformation matrix that performs a translation.
Operating States: PHOP, ∗, ∗, ∗
PHIGS standard function
Syntax
void ptranslate (
const Pvec ∗trans_vector, /∗ (I) Translation vector ∗/
Pint ∗error_ind, /∗ (O) Error indicator ∗/
Pmatrix matrix /∗ (O) Transformation matrix ∗/
)
Data Structures
typedef struct {
Pfloat delta_x; /∗ delta x value ∗/
Pfloat delta_y; /∗ delta y value ∗/
} Pvec;
typedef Pfloat Pmatrix[3][3];
Description
ptranslate creates a two-dimensional (3 x 3) homogeneous transformation matrix that performs the translation as defined by the specified translation vector. The returned matrix can be passed to functions that require transformation matrices as input, such as the pset_local_tran, pset_global_tran, and pcompose_matrix functions. To store a matrix in a structure element, you must pass it to the pset_local_tran or pset_global_tran function.
See Also
pbuild_tran_matrix
pcompose_matrix
pcompose_tran_matrix
protate
pscale
pset_global_tran
pset_local_tran
pset_view_rep
ptran_point
ptranslate3