Mat3 class

A 3x3 matrix. Authored by {@link http://github.com/schteppe/ schteppe}

Constructors

Mat3([List<double>? elements])

Properties

elements List<double>
A vector of length 9, containing all matrix elements.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copy(Mat3 matrix) Mat3
Copy another matrix into this matrix object.
e(int row, int column, [double? value]) double?
Get an element in the matrix by index. Index starts at 0, not 1!!! @param value If provided, the matrix element will be set to this value.
getTrace([Vec3? target]) Vec3
Gets the matrix diagonal elements
identity() → void
Sets the matrix to identity @todo Should perhaps be renamed to setIdentity() to be more clear. @todo Create another function that immediately creates an identity matrix eg. eye()
mmult(Mat3 matrix, [Mat3? target]) Mat3
Matrix multiplication @param matrix Matrix to multiply with from left side.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reverse([Mat3? target]) Mat3
reverse the matrix @param target Target matrix to save in. @return The solution x
scale(Vec3 vector, [Mat3? target]) Mat3
Scale each column of the matrix
setRotationFromQuaternion(Quaternion q) Mat3
Set the matrix from a quaterion
setTrace(Vec3 vector) → void
Sets the matrix diagonal elements from a Vec3
setZero() → void
et all elements to zero
smult(double s) → void
Matrix-scalar multiplication
solve(Vec3 b, [Vec3? target]) Vec3
Solve Ax=b @param b The right hand side @param target Optional. Target vector to save in. @return The solution x @todo should reuse arrays
toString() String
Returns a string representation of the matrix.
override
transpose([Mat3? target]) Mat3
Transpose the matrix @param target Optional. Where to store the result. @return The target Mat3, or a new Mat3 if target was omitted.
vmult(Vec3 v, Vec3? target) Vec3
Matrix-Vector multiplication @param v The vector to multiply with @param target Optional, target to save the result in.

Operators

operator ==(Object other) bool
The equality operator.
inherited