GLBasic User Manual

Main sections



The command X_GETMATRIX copies the current transformation matrix, that would be used if you called X_DRAWOBJ, into the 1D array mat#[]. The matrix is a 16 number long array that could also be represented as a 4x4 matrix. 1D arrays are internally slightly faster in GLBasic, though.

The values mat[0], mat[1], mat[2] form the direction and scaling of the local X axis of the object to be drawn.
In the same matter mat[4], 5, 6 form the Y axis and 8,9,10 the Z axis.
The values mat[12], 13 and 14 specify the current translation, thus displacement, and are a value for the global X,Y,Z position of the object.

See also...