The SEDRIS Data Representation Model
APPENDIX A - Classes
World 3x3

Class Name: World 3x3

Superclass - <SEDRIS Abstract Base>

Subclasses

This DRM class is concrete and has no subclasses.

Definition

An instance of this DRM class specifies a nine-element matrix containing scaling and rotation data as part of a <World Transformation> instance. The direction of rotation is determined by the right-hand rule.

Translation data is not provided by a <World 3x3> instance, because a <World 3x3> instance only exists as a component of a <World Transformation> instance. The translation component of a <World Transformation> instance is provided by the mandatory <Location> component of the <World Transformation> instance. The <World Transformation> instance is applied as specified in Representing models within an environment.

<World Transformation> instances usually exist in the scope of an <Environment Root> instance defining a non-LSR SRF. Consequently, <World 3x3> instances usually exist within a 'world' SRF, hence the name.

The matrix multiplication order is defined by w = M × v, where M is the matrix of the <World 3x3> instance, v is the original location column vector, and w is the resulting location column vector.

Primary Page in DRM Diagram:

Secondary Pages in DRM Diagram:

This class appears on only one page of the DRM class diagram.

Example

  1. A <World 3x3> instance specifies the scale and rotation applied to a <Model> instance when placing an instance.

  2. Consider a model of a house. A <World 3x3> instance is used as part of a <World Transformation> instance that rotates the instantiation of the house on Bourbon Street to face east. Another <World 3x3> instance is used as part of a <World Transformation> instance that scales another instance of the house model larger and rotates it to face west on the other side of the street.

  3. See the <Local 4x4> class for more examples and explanations of matrix structure.

FAQs

How is the transformation matrix stored?

The DRM specifies matrices in row major order; that is, the first three elements correspond to the first row of the matrix, the following three elements correspond to the second row of the matrix, and so on (just as a float[3][3] in C is organized). Hence, if mat[][] is the matrix being used, mat[i][j] is the element in row i and column j of the matrix.

What is the multiplication order for <World 3x3> instances?

If M is the matrix specified by a <World 3x3> instance and v is a column location vector, the Level 0 API transforms v to a column location vector w by setting w = M × v.

post multiply example 2

Figure 77 — <DRM World 3x3> example

After applying a <World Transformation> instance to a <Geometry Model Instance> instance, a data consumer found the <Geometry Model Instance> instance oriented in a different direction than expected. Why?

There are at least two possibilities.

  1. Check that the rotation angles had the correct sign, given that the right hand rule is in effect.
  2. The <World 3x3> component of the <World Transformation> instance may have been constructed using invalid assumptions about the order of multiplication defined in the DRM. In this case, transposing the matrix of the <World 3x3> instance solves the problem, provided that the rotation angles were correct (see 1).
Why is a <World 3x3> instance allowed to have a <Location> component, considering that <World Transformation> itself is required to have a <Location> component?

Consider a transmittal containing an <Environment Root> instance E specified in a CD SRF. This transmittal also contains a <Model Library> instance with a a <Model> component specified M in an LSR SRF. M is instanced in the component tree of E such that the v-axis of the SRF of M is oriented to geodetic north.

Now consider a consumer who wishes to consume this transmittal in Augmented UTM rather than geodetic. If the <World 3x3> instance is left as-is during the transformation performed by the API, it will now orient the v-axis of M to Augmented UTM north rather than the geodetic north. This will change the orientation of the object from the originally intended direction.

Since geodetic space does not have a vector structure, a canonical LTP space shall be embedded within geodetic space to convert the values of the matrix of the <World 3x3> instance during the coordinate conversion/transformation operation. Since a <Location> instance is required to define a canonical LTP space, conversion of the <World 3x3> instance shall be performed with respect to a <Location> instance. Allowing the <World 3x3> instance to have a <Location> component allows the <World 3x3> instance to inherit the <Location> component of its parent <World Transformation> instance, and thus define the necessary location for a coordinate conversion/ transformation operation.

Is a matrix in the DRM the same as a matrix in OpenGL?

No. A matrix in the DRM is specified in row major order, while in OpenGL, matrices are specified in column major order (as in the glMultMatrix function). Consequently, to correctly apply DRM transformations in OpenGL programs, each matrix shall be reordered, and in the case of <World 3x3>, the implicit (0, 0, 0, 1) rightmost column and bottommost row shall be supplied explicitly.

Constraints

Composed of (two-way)

Component of (two-way)

Inherited Field Elements

This class has no inherited field elements.

Field Elements

SRM_Matrix_3x3 world_3x3; 1

Notes

Fields Notes

world_3x3

The world_3x3 field specifies a non-singular rotation and scale matrix.


Prev: Volumetric Feature. Next: World Transformation. Up:Index.

Last updated: July 26, 2006 Copyright © 2006 SEDRIS