SCALE 3(3P) — Kubota Pacfic Computer Inc. (29 February 1991)
NAME
SCALE 3 − calculate a 3D transformation matrix to perform a specified scaling
SYNOPSIS
C Syntax
void
pscale3 ( scale_vector, error_ind, m)
Pvec3∗scale_vector;scale factor vector
Pint∗error_ind;OUT error indicator
Pmatrix3m;OUT transformation matrix
Required PHIGS Operating States
(PHOP, ∗, ∗, ∗)
DESCRIPTION
Purpose
Use SCALE 3 to generate a 3D homogeneous (4 × 4) transformation matrix that performs a 3D scaling.
The returned matrix can 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
scale_vector
A pointer to a Pvec3 data structure containing the scale factors to be applied to the x, y, and z dimensions. Pvec3 is defined in phigs.h as follows:
typedef struct {
Pfloatdelta_x;/∗ x coordinate ∗/
Pfloatdelta_y;/∗ y coordinate ∗/
Pfloatdelta_z;/∗ z coordinate ∗/
} 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 scaling. Pmatrix3 is defined in phigs.h as follows:
typedef Pfloat Pmatrix3[4][4];
Execution
SCALE 3 returns a 3D homogeneous (4 × 4) transformation matrix that performs the scaling specified by scale factor vector. The scaling is relative to the origin of the current modelling coordinate system.
The scale factor vector specifies sx, sy, and sz scaling factors that control scaling in the x, y, and z directions.
ERRORS
002Ignoring function, function requires state (PHOP, ∗, ∗, ∗)
SEE ALSO
SET LOCAL TRANSFORMATION 3 (3P)
BUILD TRANSFORMATION MATRIX 3 (3P)
COMPOSE MATRIX 3 (3P)
SCALE (3P)
TRANSFORM POINT 3 (3P)
September 02, 1992