mat4 [object]
A 4x4 column-major matrix
- methods
- identity - set matrix to identity
- multiply - multiply this matrix with another one
- multiply_left - left-multiply this matrix with another one
- multiply2 - multiply two matrices into this one
- transpose - transpose matrix
- transpose_from - transpose another matrix into this one
- invert - invert matrix
- invert_from - invert another matrix into this one
- translate - set or multiply a translation matrix
- translate_v3 - set or multiply a translation matrix (vec3 argument)
- rotateX - set or multiply a X-axis rotation matrix
- rotateY - set or multiply a Y-axis rotation matrix
- rotateZ - set or multiply a Z-axis rotation matrix
- rotate_axis_angle - set or multiply a custom axis rotation matrix
- rotate_axis_angle_v3 - set or multiply a custom axis rotation matrix (vec3 argument)
- scale - set or multiply a scale matrix
- scale_v3 - set or multiply a scale matrix (vec3 argument)
- transform - transform a 4D vector
- transform_pos - transform a 3D position vector
- transform_normal - transform a 3D normal vector
- read-only properties
- [int] size - returns 16 - the number of components in this vector
- [quat] quat - returns the quaternion version of the 3x3 part of this matrix
- [mat3] mat3 - returns the 3x3 part of this matrix
- read/write properties
- [real] m[0-3][0-3]
- overloaded operators
- comparison between subvalues: column-major subvalue order
- other features:
- cloning support
- serialization support
- GC-safe
- indexing support for indices 0 - 15: returns/sets the specified subvalue
- tostring = "mat4"
- dump:
mat4 ( <m00> <m10> <m20> <m30> <m01> <m11> <m21> <m31> <m02> <m12> <m22> <m32> <m03> <m13> <m23> <m33> )