Matrix3 class

3D Matrix. Values are stored in column major order.

Constructors

Matrix3(double arg0, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6, double arg7, double arg8)
New matrix with specified values.
factory
Matrix3.columns(Vector3 arg0, Vector3 arg1, Vector3 arg2)
Constructs a new mat3 from columns.
factory
Matrix3.copy(Matrix3 other)
Copes values from `other`.
factory
Matrix3.fromList( values)
New matrix from `values`.
factory
Matrix3.identity()
Identity matrix.
factory
Matrix3.outer(Vector3 u, )
Outer product of `u` and `v`.
factory
Rotation of `radians_` around X axis.
factory
Rotation of `radians_` around Y axis.
factory
Rotation of `radians_` around Z axis.
factory
Matrix3.zero()
Constructs a new Matrix3 filled with zeros.

Properties

dimension int
Dimension of the matrix.
forward
hashCode int
The hash code for this object. [...]
row0
Returns row 0
row1
Returns row 1
row2
Returns row 2
storage
The components of the matrix.
up
runtimeType Type
A representation of the runtime type of the object.

Methods

absolute()
Returns the component wise absolute value of this.
absoluteError(Matrix3 correct)
Returns absolute error between this and `correct`
absoluteRotate(Vector3 arg)
Rotates `arg` by the absolute rotation of this Returns `arg`. Primarily used by AABB transformation code.
absoluteRotate2(Vector2 arg)
Rotates `arg` by the absolute rotation of this Returns `arg`. Primarily used by AABB transformation code.
Add `o` to this.
applyToVector3Array( array, [ int offset = 0 ]) List<double>
Multiply this to each set of xyz values in `array` starting at `offset`.
clone()
Clone of this.
copyFromArray( array, [ int offset = 0 ]) → void
Copies elements from `array` into this starting at `offset`.
copyInto(Matrix3 arg)
Copy this into `arg`.
copyIntoArray(List<num> array, [ int offset = 0 ]) → void
Copies this into `array` starting at `offset`.
copyInverse(Matrix3 arg)
Set this matrix to be the inverse of `arg`
copyNormalMatrix(Matrix4 arg) → void
Set this matrix to be the normal matrix of `arg`.
determinant()
Returns the determinant of this matrix.
dotColumn(int j, )
Returns the dot product of column `j` and `v`.
dotRow(int i, )
Returns the dot product of row `i` and `v`.
entry(int row, int col)
Value at `row`, `col`.
getColumn(int column)
Gets the `column` of the matrix
getRow(int row)
Gets the `row` of the matrix
index(int row, int col) int
Return index in storage for `row`, `col` value.
infinityNorm()
Returns infinity norm of the matrix. Used for numerical analysis.
invert()
Invert the matrix. Returns the determinant.
isIdentity() bool
Is this the identity matrix?
isZero() bool
Is this the zero matrix?
multiplied(Matrix3 arg)
Create a copy of this and multiply it by `arg`.
multiply(Matrix3 arg) → void
Multiply this by `arg`.
multiplyTranspose(Matrix3 arg) → void
negate() → void
Negate this.
relativeError(Matrix3 correct)
Returns relative error between this and `correct`
scale(double scale) → void
Scales this by `scale`.
Converts into Adjugate matrix and scales by `scale`
scaled(double scale)
Create a copy of this and scale it by `scale`.
setColumn(int column, Vector3 arg) → void
Assigns the `column` of the matrix `arg`
setColumns(Vector3 arg0, Vector3 arg1, Vector3 arg2) → void
Sets the entire matrix to the column values.
setDiagonal(Vector3 arg) → void
Set the diagonal of the matrix.
setEntry(int row, int col, ) → void
Set value at `row`, `col` to be `v`.
setFrom(Matrix3 arg) → void
Sets the entire matrix to the matrix in `arg`.
setIdentity() → void
Makes this into the identity matrix.
setOuter(Vector3 u, ) → void
Set this to the outer product of `u` and `v`.
Turns the matrix into a rotation of `radians` around X
Turns the matrix into a rotation of `radians` around Y
Turns the matrix into a rotation of `radians` around Z
setRow(int row, Vector3 arg) → void
Assigns the `row` of to `arg`.
setUpper2x2(Matrix2 arg) → void
Sets the upper 2x2 of the matrix to be `arg`.
setValues(double arg0, double arg1, double arg2, double arg3, double arg4, double arg5, double arg6, double arg7, double arg8) → void
Sets the matrix with specified values.
setZero() → void
Zeros this.
splatDiagonal(double arg) → void
Set the diagonal of the matrix.
sub() → void
Subtract `o` from this.
toString()
Returns a printable string
override
trace()
Returns the trace of the matrix. The trace of a matrix is the sum of the diagonal entries.
transform(Vector3 arg)
Transform `arg` of type Vector3 using the transformation defined by this.
transform2(Vector2 arg)
Transforms `arg` with this.
transformed(Vector3 arg, [ Vector3 out ])
Transform a copy of `arg` of type Vector3 using the transformation defined by this. If a `out` parameter is supplied, the copy is stored in `out`.
transpose() → void
Transpose this.
transposed()
Returns the tranpose of this.
transposeMultiply(Matrix3 arg) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

operator *(dynamic arg) → dynamic
Returns a new vector or matrix by multiplying this with `arg`.
operator +(Matrix3 arg)
Returns new matrix after component wise this + `arg`
operator -(Matrix3 arg)
Returns new matrix after component wise this - `arg`
operator ==(Object other) bool
Check if two matrices are the same.
override
operator [](int i)
Access the element of the matrix at the index `i`.
operator []=(int i, ) → void
Set the element of the matrix at the index `i`.
operator unary-()
Returns new matrix -this

Static Methods

solve(Matrix3 A, Vector3 x, ) → void
Solve `A` * `x` = `b`.
solve2(Matrix3 A, Vector2 x, ) → void
Solve `A` * `x` = `b`.