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