DoPushMatrix(3D)

NAME
DoPushMatrix - Create an organizational object that pushes the current transformation matrix

SYNOPSIS
C:
DtObject DoPushMatrix()

FORTRAN:
INTEGER*4 DOPUMX()

DESCRIPTION
DoPushMatrix creates an organizational object that pushes the current transformation matrix. This object saves a local environment of geometric transformations; the environment is restored by DoPopMatrix <DOPPMX>.

DoPushMatrix and DoPopMatrix <DOPPMX> act as a team to create a local environment of geometric transformations that can be saved and restored. DoPushMatrix pushes onto a local stack the transformation matrix that could be modified by objects between its location in the regular group and a subsequent DoPopMatrix <DOPPMX> object.

Executing the DoPopMatrix object pops the transformation matrix from the stack, thus restoring its earlier value. Therefore, any geometric transformations encountered between the DoPushMatrix and DoPopMatrix objects are lost. DoPushMatrix and DoPopMatrix group objects may be nested; however, DoPushMatrix and DoPopMatrix will not work across group boundaries.

During execution, regular groups act as if they performed a DoPushMatrix before their execution starts and a DoPopMatrix <DOPPMX> when they are exited. Inline groups behave differently; see DoInLineGroup. When a group is closed, all DoPushMatrix objects still in effect will be popped.

To perform a series of geometric transformations relative to an absolute position, use DoPushMatrix before each set of geometric transformations and DoPopMatrix afterward. This makes each set of geometric transformations relative to the original starting position.

The transformation matrix attribute is also saved and restored with DoPushAtts <DOPUA> and DoPopAtts <DOPPA>.

SEE ALSO
DoGroup(3D), DoInLineGroup(3D), DoPopAtts(3D), DoPushAtts(3D), DoPopMatrix(3D)