Matrix3 class
Class representing a 3x3 matrix. The elements of the matrix are stored in column-major order.
@author {@link https://github.com/Mugen87|Mugen87}
Constructors
- Matrix3()
Properties
-
colVal
→ List<
int> -
final
- elements → Float32List
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- localRight → Vector3
-
final
- perpWorldUp → Vector3
-
final
-
rowVal
→ List<
int> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- temp → Vector3
-
final
- worldRight → Vector3
-
final
- worldUp → Vector3
-
final
Methods
-
clone(
) → Matrix3 -
copy(
Matrix3 m) → Matrix3 - Copies all values from the given matrix to this matrix.
-
eigenDecomposition(
Map< String, dynamic> result) → Map<String, dynamic> - Computes the eigenvectors and eigenvalues.
-
equals(
Matrix3 m) → bool - Returns true if the given matrix is deep equal with this matrix.
-
extractBasis(
Vector3 xAxis, Vector3 yAxis, Vector3 zAxis) → Matrix3 - Extracts the basis vectors and stores them to the given vectors.
-
frobeniusNorm(
) → double - Computes the frobenius norm. It's the squareroot of the sum of all squared matrix elements.
-
fromArray(
List< double> array, [int offset = 0]) → Matrix3 - Sets the elements of this matrix from an array.
-
fromMatrix4(
Matrix4 m) → Matrix3 - Sets the elements of this matrix by extracting the upper-left 3x3 portion from a 4x4 matrix.
-
fromQuaternion(
Quaternion q) → Matrix3 - Creates a rotation matrix from the given quaternion.
-
getElementIndex(
int column, int row) → int - Computes the element index according to the given column and row.
-
identity(
) → Matrix3 - Transforms this matrix to an identity matrix.
-
lookAt(
Vector3 localForward, Vector3 targetDirection, Vector3 localUp) → Matrix3 - Creates a rotation matrix that orients an object to face towards a specified target direction.
-
makeBasis(
Vector3 xAxis, Vector3 yAxis, Vector3 zAxis) → Matrix3 - Makes a basis from the given vectors.
-
multiply(
Matrix3 m) → Matrix3 - Multiplies this matrix with the given matrix.
-
multiplyMatrices(
Matrix3 a, Matrix3 b) → Matrix3 - Multiplies two given matrices and stores the result in this matrix.
-
multiplyScalar(
double s) → Matrix3 - Multiplies the given scalar with this matrix.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
offDiagonalFrobeniusNorm(
) → double - Computes the "off-diagonal" frobenius norm. Assumes the matrix is symmetric.
-
premultiply(
Matrix3 m) → Matrix3 - Multiplies this matrix with the given matrix. So the order of the multiplication is switched compared to {@link Matrix3#multiply}.
-
set(
double n11, double n12, double n13, double n21, double n22, double n23, double n31, double n32, double n33) → Matrix3 - Sets the given values to this matrix. The arguments are in row-major order.
-
shurDecomposition(
Matrix3 result) → Matrix3 - Finds the largest off-diagonal term and then creates a matrix which can be used to help reduce it.
-
toArray(
List< double> array, [int offset = 0]) → List<double> - Copies all elements of this matrix to the given array.
-
toString(
) → String -
A string representation of this object.
inherited
-
transpose(
) → Matrix3 - Transposes this matrix.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited