Matrix4x4f
Constructors
Matrix4x4f.new()
Creates a zero matrix.
Matrix4x4f.new(col1, col2, col3, col4)
Creates a matrix from 4 Vector4f columns.
Matrix4x4f.new(x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3, x4, y4, z4, w4)
Creates a matrix from 16 individual float components.
Static methods
Matrix4x4f.identity()
Returns the identity matrix.
Methods
self:to_quat()
Returns a Quaternion built from self.
self:inverse()
Returns a Matrix4x4f that is the inverse of self.
self:invert()
Inverts self. Returns nothing.
self:interpolate(other, t)
Returns the linear interpolation between self and other with the given t.
self:matrix_rotation()
Extracts the rotation matrix from self.
self:clone()
Returns a copy of self.
Meta-methods
Matrix4x4f * Matrix4x4f
Matrix4x4f multiplication.
Matrix4x4f * Vector4f
Matrix4x4f Vector4f multiplication.
Matrix4x4f[i]
Matrix4x4f element indexing (read). Valid range is [0, 4). Returns a Vector4f.
Matrix4x4f[i] = Vector4f
Matrix4x4f element assignment (write). Sets row i to the given Vector4f.