Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pop_matrix(3G) — HP-UX 5.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

vdc_extent(3G)

set_p1_p2(3G)

vdc_justification(3G)

mapping_mode(3G)

concat_matrix(3G)

push_matrix(3G)

gopen(3G)

view_matrix(3G)

POP_MATRIX(3G)

NAME

pop_matrix − remove matrix from top of matrix stack

SYNOPSIS

C Syntax:

void pop_matrix(fildes);
int fildes;

void pop_matrix2d(fildes,xform2);
int fildes;
float xform2[3][2];

void pop_matrix3d(fildes,xform3);
int fildes;
float xform3[4][4];

FORTRAN77 Syntax:

See Language Dependencies Below

subroutine pop_matrix(fildes)
integer*4 fildes

subroutine pop_matrix2d(fildes,xform2)
integer*4 fildes
real xform2(2,3)

subroutine pop_matrix3d(fildes,xform3)
integer*4 fildes
real xform3(4,4)

Pascal Syntax:

type
two_d_xform = array [1..3][1..2] of real;
three_d_xform = array [1..4][1..4] of real;

procedure pop_matrix(fildes:integer);

procedure pop_matrix2d(fildes:integer;
var xform:two_d_xform);

procedure pop_matrix3d(fildes:integer;
var xform:three_d_xform);

DESCRIPTION

Input Parameters

fildes Integer file descriptor returned by gopen when an I/O path to a graphic device is opened. 

Output Parameters

xform2 3x2 (2-Dimensional) matrix. 

xform3 4x4 (3-Dimensional) matrix. 

Discussion

The top matrix on the matrix stack is called the current transformation matrix.

The pop_matrix procedure removes the top matrix from the matrix stack and throws it away. 

The pop_matrix2d and pop_matrix3d procedures are used to remove the top matrix from the matrix stack and return it in either xform2 or xform3. If in MODEL_XFORM mode (see gopen) the matrix is returned as is. Otherwise, the popped matrix is concatenated with the inverse of the current viewing transformation. This inverse calculation is numerically intensive and will be done the first time a starbase function needs the inverse of the viewing matrix after changing the viewing matrix. After calling this function, the new current transformation matrix is the next matrix on the matrix stack.

The vdc-to-device unit transformation matrix and the viewing transformation matrix cannot be popped or replaced using matrix functions.  The vdc matrix can be changed using vdc_extent, vdc_justification, set_p1_p2, or mapping_mode. The viewing matrix can be changed using view_camera, view_matrix, view_volume, or view_window. If the matrix stack is empty, pop_matrix generates a warning. 

Starbase maintains all internal matrices in three-dimensional (4x4) form, so pop_matrix2d must shrink the current transformation matrix down before returning it. 

LANGUAGE DEPENDENCIES

FORTRAN77: A transposition of array rows and columns is required due to the manner in which FORTRAN77 stores arrays. 

DEFAULTS

After gopen, the current transformation matrix is the vdc-to-device unit transformation matrix.

SEE ALSO

vdc_extent(3G), set_p1_p2(3G), vdc_justification(3G),
mapping_mode(3G), concat_matrix(3G), push_matrix(3G), gopen(3G), view_matrix(3G).

Hewlett-Packard Company  —  May 11, 2021

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