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>. The direction of rotation is determined by the right-hand rule.

Translation data is not provided by a <World 3x3>, because a <World 3x3> instance only exists as part of a <World Transformation>. The translation, or offset, component of a <World Transformation> is provided by the mandatory <Location> component of the <World Transformation>. In essence, a <World 3x3> matrix can be considered to be a full transformation matrix in which the rightmost column and bottom row have been omitted, because each is implicitly (0, 0, 0, 1).

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

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

Primary Page in DRM Diagram:

Secondary Pages in DRM Diagram:

Example

  1. <Scale> and <Rotation> applied to a <Model> when placing an instance.
  2. The house near Dixie Rd. is facing east. The large house across the street is facing west.
  3. See <Local 4x4> for more examples and explanations of matrix structure.

FAQs

How is the transformation matrix stored?

SEDRIS stores 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, then mat[i][j] is the element in row i and column j of the matrix.

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

If M is a <World 3x3> transformation matrix and v is a column location vector, then the SEDRIS Level 0 API transforms v to a column location vector w by setting w = Mv.

post multiply example 2

Why was my <Geometry Model Instance> oriented in a different direction than I expected, after I applied its < World Transformation>?

There are at least two possibilities.

  1. Check that your rotation angles had the correct sign, given that the right hand rule is in effect.
  2. The <World 3x3> of the <World Transformation> may have been constructed using invalid assumptions about the order of multiplication defined in SEDRIS. In this case, transposing the <World 3x3> matrix would solve 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> defined in a geodetic spatial reference frame. This transmittal also contains an LSR < Model> within its <Model Library>, which is instanced in the geodetic <Environment Root> such that the <Model> SRF's y-axis 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> is left as-is during the transformation performed by the API, it will now orient the <Model> SRF's y-axis to Augmented UTM north rather than the geodetic north. This will change the object's orientation 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 <World 3x3> matrix during the coordinate conversion/transformation operation. Since a <Location> is required to define a canonical LTP space, conversion of the <World 3x3> instance shall be performed with respect to a < Location>. Allowing the <World 3x3> to have a <Location> as a direct component allows the <World 3x3> to inherit the <Location> component of its parent <World Transformation>, and thus define the necessary location for a coordinate conversion/ transformation operation.

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

No. A matrix in SEDRIS is stored in row major order, while in OpenGL, matrices are specified in column major order (as in the glMultMatrix function). Consequently, to correctly apply SEDRIS 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

None.

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; (notes)

Notes

Fields Notes


world_3x3

 Orientation matrix

Prev: Volume Light Behaviour. Next: World Transformation. Up:Index.

Last updated: October 1, 2002 Copyright © 2002 SEDRIS™