The SEDRIS Data Representation Model
APPENDIX A - Classes World 3x3 |
---|
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.
A <World 3x3> instance specifies the scale and rotation applied to a <Model> instance when placing an instance.
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.
See the <Local 4x4> class for more examples and explanations of matrix structure.
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.
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.
There are at least two possibilities.
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.
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.
SRM_Matrix_3x3 | world_3x3; | 1 |
---|
The world_3x3 field specifies a non-singular rotation and scale matrix.
|