SET LOCAL TRANSFORMATION 3(3P) — Kubota Pacfic Computer Inc. (29 February 1991)
NAME
SET LOCAL TRANSFORMATION 3 − create a structure element containing a 3D local modelling transformation matrix
SYNOPSIS
C Syntax
void
pset_local_tran3 ( xform, compose_type )
Pmatrix3xform;transformation matrix
Pcompose_typecompose_type; composition type
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:
• PTYPE_PRECONCAT“Preconcatenate”
• PTYPE_POSTCONCAT“Postconcatenate”
• PTYPE_REPLACE“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
PHIGS assumes representation of points as column vectors. Hence, the order of composition in C ← G × L (and throughout) is “post-concatenation” or “post-multiply.”
When a new structure is traversed, 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)
September 02, 1992