- class M44f
4x4 floating point transformation matrix. Matrices are multiplied from left to right, i-e, a world matrix would be computed like this :
world = local*parent_world.- M44f()
Default constructor: initialize to identity
1 0 0 00 1 0 00 0 1 00 0 0 1
- M44f(a: float)
Initialize to scalar constant
a a a aa a a aa a a aa a a a
- M44f(a: float, b: float, c: float, d: float, e: float, f: float, g: float, h: float, i: float, j: float, k: float, l: float, m: float, n: float, o: float, p: float)
Construct from given scalar values:
a b c de f g hi j k lm n o p
- M44f(r: M33f, t: V3f)
Construct from a 3x3 rotation matrix and a translation vector
r r r 0r r r 0r r r 0t t t 1
- determinant() float
Determinant
- equalWithAbsError(m: M44f, e: float) bool
Compare two matrices and test if they are “approximately equal”: @return True if the coefficients of this and m are the same with an absolute error of no more than e, i.e., for all i, j:
abs (this[i][j] - m[i][j]) <= e
- equalWithRelError(m: M44f, e: float) bool
Compare two matrices and test if they are “approximately equal”: @return True if the coefficients of this and m are the same with a relative error of no more than e, i.e., for all i, j:
abs (this[i] - v[i][j]) <= e * abs (this[i][j])
- fastMinor(r0: int, r1: int, c0: int, c1: int) float
Build a minor using the specified rows and columns
- gjInverse() M44f
Return the inverse using the Gauss-Jordan method. Significantly slower, leaving this unmodified. Slower but more accurate than inverse().
- gjInvert()
Invert in place using the Gauss-Jordan method. Significantly slower but more accurate than invert().
- invert()
Invert in place using the determinant
- negate()
Component-wise multiplication by -1
- makeIdentity()
Set to the identity matrix
- minorOf(r: int, c: int) float
Calculate the matrix minor of the (r,c) element
- shear(h: V3f)
Set matrix to shear by given vector h. The resulting matrix
will shear x for each y coord. by a factor of h[0] ;
will shear x for each z coord. by a factor of h[1] ;
will shear y for each z coord. by a factor of h[2] .
- setScale(s: float)
Set matrix to scale by given uniform factor
- setShear(h: V3f)
Set matrix to shear x for each y coord. by given factor h.x and to shear y for each x coord. by given factor h.y
- transpose()
Transpose