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 part of a <World Transformation> instance. The translation, or offset, component of a <World Transformation> instance is provided by the mandatory <Location> component of the <World Transformation> instance. 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> 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 <World 3x3> matrix, v is the original location vector, and w is the resulting location vector.
Scale and rotation applied to a <Model> when placing an instance.
The house near Dixie Road is facing east. The large house across the street is facing west.
See <Local 4x4> for more examples and explanations of matrix structure.
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.
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.
There are at least two possibilities.
Consider a transmittal containing an <Environment Root> defined in a geodetic SRF. 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.
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.
SRM_Matrix_3x3 | world_3x3; | (notes) |
---|
The world_3x3 field specifies an orientation matrix.
|