The SEDRIS Data Representation Model
APPENDIX A - Classes Local 4x4 |
---|
An instance of this DRM class specifies a sixteen element matrix that is used to scale, orient, and position objects in the scope of its aggregate <LSR Transformation>. The direction of rotation is determined by the right-hand rule. The translation parameters are always in the rightmost column of the matrix.
Since a <Local 4x4> only appears as part of an <LSR Transformation>, and an <LSR Transformation> only appears in the scope of an LSR SRF, the objects to which a <Local 4x4> is applied are always defined in an LSR SRF. Since LSR SRFs are usually used to specify <Model> rather than <Environment Root> instances, <Local 4x4> is usually considered to be 'local'. However, an <Environment Root> may be specified in an LSR SRF, in which case <LSR Transformation> instances would be legal within its scope.
The matrix multiplication order is defined by w = M × v, where M is the <Local 4x4> matrix, v is the original location vector, and w is the resulting location vector.
The position and orientation of the control tower in a <Model> of an airport is specified by the <Local 4x4>. See <Transformation> for more examples.
SEDRIS stores matrices in row major order; that is, the first four elements correspond to the first row of the matrix, the following four elements correspond to the second row of the matrix, and so on (just as a float[4][4] 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 <Local 4x4> 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.
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.
SRM_Matrix_4x4 | matrix; | (notes) |
---|
The matrix field specifies a standard 4 x 4 transformation matrix.
|