MMatrix4 class

Implemented types

Constructors

MMatrix4(double arg0, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6, double arg7, double arg8, double arg9, double arg10, double arg11, double arg12, double arg13, double arg14, double arg15)
Create a new matrix with the given values, in column-major order.
MMatrix4.copy(Matrix4 other)
Create a new matrix as a copy of other.
factory
MMatrix4.diagonal3(Vector3 scale)
Scale by scale.
factory
MMatrix4.diagonal3Values(double x, double y, double z)
Scale by x, y, and z.
factory
MMatrix4.fromList(List<double> values)
Create a new matrix with the given values, in column-major order.
factory
MMatrix4.identity()
Identity matrix.
factory
MMatrix4.rotationX(double radians)
Rotation of radians around the x axis.
factory
MMatrix4.rotationY(double radians)
Rotation of radians around the y axis.
factory
MMatrix4.rotationZ(double radians)
Rotation of radians around the z axis.
factory
MMatrix4.translation(Vector3 translation)
Translation by translation.
factory
MMatrix4.translationValues(double x, double y, double z)
Translation by x, y, and z.
factory
MMatrix4.zero()
Create a new matrix with all entries set to zero.

Properties

dimension → int
Dimension of the matrix.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
isIdentity → bool
True if this is the identity matrix.
no setterinherited
isZero → bool
True if this is the zero matrix.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

absolute() → void
Sets this to the component-wise absolute value of itself.
absoluteError(Matrix4 correct) → double
Returns the absolute error between this and correct.
inherited
add(Matrix4 other) → void
Adds other to this.
clone() → MMatrix4
Clone of this.
override
copyFromArray(List<double> array, [int offset = 0]) → void
Copies elements from array into this starting at offset.
copyIntoArray(List<num> array, [int offset = 0]) → void
Copies this into array starting at offset.
inherited
copyInverse(Matrix4 arg) → double
Sets this matrix to be the inverse of arg. Returns the determinant.
determinant() → double
Returns the determinant of this matrix.
inherited
diagonal(double value) → Matrix4
Returns a copy with the diagonal set to value.
inherited
entry(int row, int col) → double
Value at row, col.
inherited
getRotation() → Matrix3
Returns the upper-left 3x3 of this. Allocates a new Matrix3.
inherited
getTranslation() → Vector3
Returns the translation part of this. Allocates a new Vector3.
inherited
infinityNorm() → double
Returns the infinity norm of the matrix. Used for numerical analysis.
inherited
invert() → double
Inverts the matrix. Returns the determinant.
inverted() → Matrix4
Returns the inverse of this matrix.
inherited
leftTranslate(Vector3 translation) → void
Multiplies a translation matrix of translation by this. Note the order.
leftTranslated(Vector3 translation) → Matrix4
Returns a translation matrix of translation multiplied by this. Note the order.
inherited
multiplied(Matrix4 arg) → Matrix4
Returns this matrix multiplied by arg. Note the order.
inherited
multiply(Matrix4 arg) → void
Multiplies this by arg. Note the order.
multiplyTranspose(Matrix4 arg) → void
Multiplies this by arg transposed. Note the order.
multiplyTransposed(Matrix4 arg) → Matrix4
Returns this matrix multiplied by arg transposed. Note the order.
inherited
negate() → void
Negates this.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
premultiplied(Matrix4 arg) → Matrix4
Returns arg multiplied by this. Note the order.
inherited
premultiply(Matrix4 arg) → void
Premultiplies this by arg. Note the order.
relativeError(Matrix4 correct) → double
Returns the relative error between this and correct.
inherited
rotatedX(double radians) → Matrix4
Returns this multiplied by a rotation of radians around the x axis. Note the order.
inherited
rotatedY(double radians) → Matrix4
Returns this multiplied by a rotation of radians around the y axis. Note the order.
inherited
rotatedZ(double radians) → Matrix4
Returns this multiplied by a rotation of radians around the z axis. Note the order.
inherited
rotateX(double radians) → void
Multiplies this by a rotation of radians around the x axis. Note the order.
rotateY(double radians) → void
Multiplies this by a rotation of radians around the y axis. Note the order.
rotateZ(double radians) → void
Multiplies this by a rotation of radians around the z axis. Note the order.
scale(double scale) → void
Scales every entry of this by scale.
scaleAdjoint(double scale) → void
Converts into the adjugate matrix and scales by scale.
scaleByVector3(Vector3 scale) → void
Multiplies this by a scale matrix of scale. Note the order.
scaled(double scale) → Matrix4
Returns a copy of this with every entry scaled by scale.
inherited
scaledAdjoint(double scale) → Matrix4
Returns the adjugate matrix, scaled by scale.
inherited
scaledByVector3(Vector3 scale) → Matrix4
Returns this multiplied by a scale matrix of scale. Note the order.
inherited
setDiagonal(double value) → void
Sets the diagonal of the matrix to value.
setDiagonal3(Vector3 scale) → void
Sets the upper-left 3x3 diagonal of the matrix to scale.
setDiagonal3Values(double x, double y, double z) → void
Sets the upper-left 3x3 diagonal of the matrix to x, y, and z.
setEntry(int row, int col, double value) → void
Sets the value at row, col to value.
setFrom(Matrix4 other) → void
Sets the values of this by copying them from other.
setIdentity() → void
Makes this into the identity matrix.
setRotation(Matrix3 rotation) → void
Sets the upper-left 3x3 of this to rotation, keeping the translation.
setRotationX(double radians) → void
Sets the upper-left 3x3 of this to a rotation of radians around the x axis, keeping the translation.
setRotationY(double radians) → void
Sets the upper-left 3x3 of this to a rotation of radians around the y axis, keeping the translation.
setRotationZ(double radians) → void
Sets the upper-left 3x3 of this to a rotation of radians around the z axis, keeping the translation.
setTranslation(Vector3 translation) → void
Sets the translation part of this to translation.
setTranslationRaw(double x, double y, double z) → void
Sets the translation part of this to x, y, and z.
setValues(double arg0, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6, double arg7, double arg8, double arg9, double arg10, double arg11, double arg12, double arg13, double arg14, double arg15) → void
Sets the values of this, in column-major order.
setZero() → void
Zeros this.
subtract(Matrix4 other) → void
Subtracts other from this.
toString() → String
Returns a printable string.
inherited
trace() → double
Returns the trace of the matrix: the sum of the diagonal entries.
inherited
translate(Vector3 translation) → void
Multiplies this by a translation matrix of translation. Note the order.
translated(Vector3 translation) → Matrix4
Returns this multiplied by a translation matrix of translation. Note the order.
inherited
transpose() → void
Transposes this.
transposed() → Matrix4
Returns the transpose of this.
inherited
transposeMultiplied(Matrix4 arg) → Matrix4
Returns this matrix transposed, then multiplied by arg. Note the order.
inherited
transposeMultiply(Matrix4 arg) → void
Transposes this, then multiplies by arg. Note the order.

Operators

operator +(Matrix4 arg) → Matrix4
Add two matrices.
inherited
operator -(Matrix4 arg) → Matrix4
Subtract two matrices.
inherited
operator ==(Object other) → bool
Check if two matrices are the same.
inherited
operator [](int index) → double
Access the element of the matrix at the index index.
override
operator []=(int index, double value) → void
Sets the element of the matrix at the index index.
operator unary-() → Matrix4
Negated copy of this.
inherited