Matrix3
3 x 3 matrix in row-major order.
Constructors
Functions
Inverts the specified matrix and stores the result in this matrix.
This throws an exception if the matrix is singular.
The result of this method is undefined if this matrix is passed in as the matrix to invert.
Multiplies this matrix by a rotation matrix about a specified axis and angle. Positive angles are interpreted as counter-clockwise rotation.
Multiplies this matrix by a scale matrix with specified values.
Multiplies this matrix by a matrix that transforms normalized coordinates from a source sector to a destination sector. Normalized coordinates within a sector range from 0 to 1, with (0, 0) indicating the lower left corner and (1, 1) indicating the upper right. The resultant matrix maps a normalized source coordinate (X, Y) to its corresponding normalized destination coordinate (X', Y').
This matrix typically necessary to transform texture coordinates from one geographic region to another. For example, the texture coordinates for a terrain tile spanning one region must be transformed to coordinates appropriate for an image tile spanning a potentially different region.
Multiplies this matrix by a translation matrix with specified translation values.
Multiplies this matrix by a matrix that flips and shifts the y-axis. The vertical flip matrix maps Y=0 to Y=1 and Y=1 to Y=0. This matrix is usually used to change the coordinate origin from an upper left coordinate origin to a lower left coordinate origin.
This is typically necessary to align the coordinate system of images (top-left origin) with that of OpenGL (bottom-left origin).
Sets the rotation components of this matrix to a specified angle. Positive angles are interpreted as counter-clockwise rotation.
Sets this matrix to the 3 x 3 identity matrix.
Sets this matrix to the matrix product of two specified matrices.
Set this matrix to the ground-to-image homography that maps four arbitrary corners ((0,0), (p1x,p1y), (p2x,p2y), (p3x,p3y), in counter-clockwise order: bottom-left, bottom-right, top-right, top-left) to the unit square (0,0), (1,0), (1,1), (0,1).
Sets this matrix to a rotation matrix with a specified angle. Positive angles are interpreted as counter-clockwise rotation.
Sets this matrix to a scale matrix with specified scale components.
Sets this matrix to one that transforms normalized coordinates from a source sector to a destination sector. Normalized coordinates within a sector range from 0 to 1, with (0, 0) indicating the lower left corner and (1, 1) indicating the upper right. The resultant matrix maps a normalized source coordinate (X, Y) to its corresponding normalized destination coordinate (X', Y').
This matrix typically necessary to transform texture coordinates from one geographic region to another. For example, the texture coordinates for a terrain tile spanning one region must be transformed to coordinates appropriate for an image tile spanning a potentially different region.
Sets this matrix to a translation matrix with specified translation components.
Sets this matrix to one that flips and shifts the y-axis. The resultant matrix maps Y=0 to Y=1 and Y=1 to Y=0. All existing values are overwritten. This matrix is usually used to change the coordinate origin from an upper left coordinate origin to a lower left coordinate origin.
This matrix is typically necessary to align the coordinate system of images (top-left origin) with that of OpenGL (bottom-left origin).
Sets the translation components of this matrix to specified values.
Transposes the specified matrix and stores the result in this matrix.
Transposes this matrix, storing the result in the specified single precision array. The result is compatible with GLSL uniform matrices, and can be passed to the function glUniformMatrix3fv.