Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ set_local_transformation_3(3P) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

SET LOCAL TRANSFORMATION 3(3P)  —  SUNPHIGS LIBRARY

NAME

SET LOCAL TRANSFORMATION 3  − create a structure element containing a 3D local modelling transformation matrix

SYNOPSIS

C Syntax

void
psetlocaltran3 ( xform, compose_type )
Pmatrix3xform;transformation matrix
Pcomptypecompose_type;composition type

FORTRAN Syntax

SUBROUTINE pslmt3 ( XFRMT, CTYPE )
REALXFRMT(4, 4)transformation matrix
INTEGERCTYPEcomposition type (PCPRE, PCPOST, PCREPL)

Required PHIGS Operating States

(PHOP, ∗, STOP, ∗)

DESCRIPTION

Purpose

SET LOCAL TRANSFORMATION 3 creates a structure element containing a 3D local modelling transformation matrix and a composition type, allowing various objects in the image to be defined in various convenient Modelling Coordinate systems. 

During traversal the element will modify the ‘current local modelling transformation’ according to the composition type.  Then the modified Local Modelling Transformation is composed with the current Global Modelling Transformation to create a new Composite Modelling Transformation. The Composite Modelling Transformation then maps the Modelling Coordinates (MC) used to define individual output primitives to a unified World Coordinate (WC) Space. 

If the current edit mode is INSERT, the SET LOCAL TRANSFORMATION 3 element is inserted into the open structure after the element pointed to by the current element pointer. If the edit mode is REPLACE, the SET LOCAL TRANSFORMATION 3 element replaces the element pointed to by the element pointer. In either case, the element pointer is updated to point to the new element. 

C Input Parameters

xformThe 4 × 4 homogeneous transformation matrix, of type: typedef Pfloat Pmatrix3[4][4];

compose_type
The composition type is an enumerated value, one of:

•  PPRECONCATENATE“Preconcatenate”
•  PPOSTCONCATENATE“Postconcatenate”
•  PREPLACE“Replace”

FORTRAN Input Parameters

XFRMT
An array containing the 4 × 4 homogeneous transformation matrix. 

CTYPE
The composition type is an enumerated value, one of:

•  PCPRE“Preconcatenate”
•  PCPOST“Postconcatenate”
•  PCREPL“Replace”

Execution

When traversal of a structure begins, the initial ‘current local modelling transformation’ (L) and the ‘current global modelling transformation’ (G) are both the 3D, 4 × 4 identity matrix.  The ‘Composite modelling transformation’ (C) within a structure traversal is formed by the matrix multiplication of the ‘current local modelling transformation’ (L) and the ‘current global modelling transformation’ (G) as follows:

C ← G × L

When an EXECUTE STRUCTURE element is encountered, one step in the invocation of the referenced structure is to save the current modelling transformations (L, G, and C).  The child structure inherits the parent’s ‘composite modelling transformation’ (C) as its ‘current global modelling transformation’ (G), and an identity matrix as its initial ‘current local modelling transformation’ (L).  The parent and child have equal ‘composite modelling transformations’ (C), because L is the identity.  After traversal of the child structure network, the saved transformations are restored so that the parent is unaffected by the execution of a child. 

When the SET LOCAL TRANSFORMATION 3 element is traversed, the compose type specifies the role of the ‘current local modelling transformation’ (L) in composing the new value for the ‘current local modelling transformation’ (L´), which is then combined with the ‘current global modelling transformation’ (G) to calculate the new ‘composite modelling transformation’ (C). 

“Preconcatenate”
The transformation matrix (T) is multiplied by the ‘current local modelling transformation’ (L):

L´ ← L × T

C ← G × L´

“Postconcatenate”
The ‘current local modelling transformation’ (L) is multiplied by the transformation matrix (T):

L´ ← T × L

C ← G × L´

“Replace”
The transformation matrix (T) replaces the value of ‘current local modelling transformation’ (L). 

L´ ← T

C ← G × L´

The current Composite Modelling Transformation maps the Modelling Coordinates, used to define individual output primitives, to World Coordinates.  Mapping the primitives to the World Coordinate Space establishes the relation between different objects of the image by redefining the parts in terms of a unified coordinate space. This allows the application to define different parts of the image in different local Modelling Coordinates convenient to the objects being defined, and then to apply transformations that will map the local coordinate systems of each part to a single World Coordinate (WC) Space.  Finally, the viewing mechanism maps WC to Device Coordinates on the workstation’s physical display surface. 

ERRORS

005Ignoring function, function requires state (PHOP, ∗, STOP, ∗)

SEE ALSO

SET GLOBAL TRANSFORMATION 3 (3P)
SET VIEW REPRESENTATION 3 (3P)
BUILD TRANSFORMATION MATRIX 3 (3P)
TRANSFORM POINT 3 (3P)
SET LOCAL TRANSFORMATION (3P)

Sun Release 4.0  —  Last change: 28 July 1989

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