The SEDRIS Data Representation Model
APPENDIX A - Classes Local 4x4 |
---|
An instance of this DRM class specifies a 4×4 matrix that is used to scale, orient, and position DRM objects in the scope of its aggregate <LSR Transformation> instance. 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> instance only appears as a component of an <LSR Transformation> instance and an <LSR Transformation> instance only appears in the scope of an LSR SRF, the DRM objects to which a <Local 4x4> instance is applied are always specified in an LSR SRF.
The matrix multiplication order is defined by w = M × v, where M is the matrix of the <Local 4x4> instance, v is the original location vector, and w is the resulting location vector.
Let A be a <Model> instance representing an airport, and let C be a separate <Model> instance representing a control tower, where A and C are specified in matching LSR SRFs, and A contains a <Geometry Model Instance> instance G that is a reference to C.
G in A shall have an <LSR Transformation> component, where the position and orientation of the control tower G in A is specified by the <Local 4x4> component of that <LSR Transformation> instance.
The DRM specifies 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, mat[i][j] is the element in row i and column j of the matrix.
If M is the transformation matrix of a <Local 4x4> 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.
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.
SRM_Matrix_4x4 | matrix; | 1 |
---|
The matrix field specifies a standard 4 × 4 transformation matrix.
|