Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ psc3(3P) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

SCALE 3(3P)  —  SUNPHIGS LIBRARY

NAME

SCALE 3 − calculate a 3D transformation matrix to perform a specified scaling

SYNOPSIS

C Syntax

void
pscale3 ( scale_vector, error_ind, matrix )
Pvector3∗scale_vector;scale factor vector
Pint∗error_ind;OUT error indicator
Pmatrix3matrix;OUT transformation matrix

FORTRAN Syntax

SUBROUTINE psc3 ( FX, FY, FZ, ERRIND, XFRMT )
REALFX, FY, FZscale factor vector
INTEGERERRINDOUT error indicator
REALXFRMT(4, 4)OUT transformation matrix

Required PHIGS Operating States

(PHOP, ∗, ∗, ∗)

DESCRIPTION

Purpose

Use SCALE 3 to generate a 3D homogeneous (4 x 4) transformation matrix that performs a 3D scaling. 

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

scale_vector
A pointer to a Pvector3 data structure containing the scale factors to be applied to the x, y, and z dimensions.  Pvector3 is defined in phigs.h as follows:

typedef struct  {
Pfloatx;/∗ Sx, the x dimension scaling factor ∗/
Pfloaty;/∗ Sy, the y dimension scaling factor ∗/
Pfloatz;/∗ Sz, the z dimension scaling factor ∗/
} Pvector;

C Output Parameters

error_ind
A pointer to the location to store the error number of any error detected by this function.

matrixThe 4 x 4 homogeneous transformation matrix that performs the specified scaling.  Pmatrix3 is defined in phigs.h as follows:

typedef PfloatPmatrix3[4][4];

FORTRAN Input Parameter

FX, FY, FZ
The scale factors to be applied to the x, y, and z dimensions. 

FORTRAN Output Parameters

ERRIND
The error number of any error detected by this function.

XFRMT
The 4 x 4 homogeneous transformation matrix that performs the specified scaling.

Execution

SCALE 3 returns a 3D homogeneous (4 x 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)
ROTATE X (3P)
ROTATE Y (3P)
ROTATE Z (3P)
TRANSLATE 3 (3P)
BUILD TRANSFORMATION MATRIX 3 (3P)
COMPOSE MATRIX 3 (3P)
SCALE (3P)
TRANSFORM POINT 3 (3P)

Sun Release 4.0  —  Last change: 2 August 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026