The Matrix class is used to represent a 4x4 transformation matrix. Matrix objects are used to transform points in 3D space.
(none)
Set the value of a matrix by copying an existing matrix.
mat (Matrix): another Matrix object whose value you wish to copy Return value: noneMultiplies two matrices. The calling object is multiplied by the matrix "mat".
mat (Matrix): a Matrix object to multiply into the calling object Return value: noneApply a matrix transformation to a 2D vector object.
vec2 (Vector2): a vector to transform Return value: noneApply a matrix transformation to a 3D vector object.
vec3 (Vector3): a vector to transform Return value: noneInvert the matrix.
Return value: noneSet the matrix to be an identity matrix. An identity matrix has no transformation - any vectors transformed by it will retain their original positions. Use this function to reset a matrix before creating a different transformation.
Return value: nonePrepend a translation onto the current matrix.
dx (float): the x value of the translation dy (float): the y value of the translation dz (float): the z value of the translation Return value: nonePrepend a scale onto the current matrix.
sx (float): the x value of the scale sy (float): the y value of the scale sz (float): the z value of the scale Return value: nonePrepend a rotation onto the current matrix.
axis (int): the angle (in radians) to rotate about (axis constants can be found here) angle (float): the angle (in radians) to rotate the vector Return value: nonePrepend a perspective transform onto the current matrix.
alpha (float): the field of view angle (in radians) near (float): distance from the virtual eye to the near clipping plane far (float): distance from the virtual eye to the far clipping plane aspect (float): aspect ratio of the final viewing plane Return value: none