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(List<
double> values) -
New matrix from
values
.factory - Matrix3.identity()
-
Identity matrix.
factory
- Matrix3.outer(Vector3 u, Vector3 v)
-
Outer product of
u
andv
.factory - Matrix3.rotationX(double radians)
-
Rotation of
radians
around X axis.factory - Matrix3.rotationY(double radians)
-
Rotation of
radians
around Y axis.factory - Matrix3.rotationZ(double radians)
-
Rotation of
radians
around Z axis.factory - Matrix3.zero()
- Constructs a new Matrix3 filled with zeros.
Properties
- dimension → int
-
Dimension of the matrix.
no setter
- forward → Vector3
-
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- right → Vector3
-
no setter
- row0 ↔ Vector3
-
Returns row 0
getter/setter pair
- row1 ↔ Vector3
-
Returns row 1
getter/setter pair
- row2 ↔ Vector3
-
Returns row 2
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- storage → Float64List
-
The components of the matrix.
no setter
- up → Vector3
-
no setter
Methods
-
absolute(
) → Matrix3 - Returns the component wise absolute value of this.
-
absoluteError(
Matrix3 correct) → double -
Returns absolute error between this and
correct
-
absoluteRotate(
Vector3 arg) → Vector3 -
Rotates
arg
by the absolute rotation of this Returnsarg
. Primarily used by AABB transformation code. -
absoluteRotate2(
Vector2 arg) → Vector2 -
Rotates
arg
by the absolute rotation of this Returnsarg
. Primarily used by AABB transformation code. -
add(
Matrix3 o) → void -
Add
o
to this. -
applyToVector3Array(
List< double> array, [int offset = 0]) → List<double> -
Multiply this to each set of xyz values in
array
starting atoffset
. -
clone(
) → Matrix3 - Clone of this.
-
copyFromArray(
List< double> array, [int offset = 0]) → void -
Copies elements from
array
into this starting atoffset
. -
copyInto(
Matrix3 arg) → Matrix3 -
Copy this into
arg
. -
copyIntoArray(
List< num> array, [int offset = 0]) → void -
Copies this into
array
starting atoffset
. -
copyInverse(
Matrix3 arg) → double -
Set this matrix to be the inverse of
arg
-
copyNormalMatrix(
Matrix4 arg) → void -
Set this matrix to be the normal matrix of
arg
. -
determinant(
) → double - Returns the determinant of this matrix.
-
dotColumn(
int j, Vector3 v) → double -
Returns the dot product of column
j
andv
. -
dotRow(
int i, Vector3 v) → double -
Returns the dot product of row
i
andv
. -
entry(
int row, int col) → double -
Value at
row
,col
. -
getColumn(
int column) → Vector3 -
Gets the
column
of the matrix -
getRow(
int row) → Vector3 -
Gets the
row
of the matrix -
index(
int row, int col) → int -
Return index in storage for
row
,col
value. -
infinityNorm(
) → double - Returns infinity norm of the matrix. Used for numerical analysis.
-
invert(
) → double - Invert the matrix. Returns the determinant.
-
isIdentity(
) → bool - Is this the identity matrix?
-
isZero(
) → bool - Is this the zero matrix?
-
multiplied(
Matrix3 arg) → Matrix3 -
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.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
relativeError(
Matrix3 correct) → double -
Returns relative error between this and
correct
-
scale(
double scale) → void -
Scales this by
scale
. -
scaleAdjoint(
double scale) → void -
Converts into Adjugate matrix and scales by
scale
-
scaled(
double scale) → Matrix3 -
Create a copy of this and scale it by
scale
. -
setColumn(
int column, Vector3 arg) → void -
Assigns the
column
of the matrixarg
-
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, double v) → void -
Set value at
row
,col
to bev
. -
setFrom(
Matrix3 arg) → void -
Sets the entire matrix to the matrix in
arg
. -
setIdentity(
) → void - Makes this into the identity matrix.
-
setOuter(
Vector3 u, Vector3 v) → void -
Set this to the outer product of
u
andv
. -
setRotationX(
double radians) → void -
Turns the matrix into a rotation of
radians
around X -
setRotationY(
double radians) → void -
Turns the matrix into a rotation of
radians
around Y -
setRotationZ(
double radians) → void -
Turns the matrix into a rotation of
radians
around Z -
setRow(
int row, Vector3 arg) → void -
Assigns the
row
of toarg
. -
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(
Matrix3 o) → void -
Subtract
o
from this. -
toString(
) → String -
Returns a printable string
override
-
trace(
) → double - Returns the trace of the matrix. The trace of a matrix is the sum of the diagonal entries.
-
transform(
Vector3 arg) → Vector3 -
Transform
arg
of type Vector3 using the transformation defined by this. -
transform2(
Vector2 arg) → Vector2 -
Transforms
arg
with this. -
transformed(
Vector3 arg, [Vector3? out]) → Vector3 -
Transform a copy of
arg
of type Vector3 using the transformation defined by this. If aout
parameter is supplied, the copy is stored inout
. -
transpose(
) → void - Transpose this.
-
transposed(
) → Matrix3 - Returns the tranpose of this.
-
transposeMultiply(
Matrix3 arg) → void
Operators
-
operator *(
dynamic arg) → dynamic -
Returns a new vector or matrix by multiplying this with
arg
. -
operator +(
Matrix3 arg) → Matrix3 -
Returns new matrix after component wise this +
arg
-
operator -(
Matrix3 arg) → Matrix3 -
Returns new matrix after component wise this -
arg
-
operator ==(
Object other) → bool -
Check if two matrices are the same.
override
-
operator [](
int i) → double -
Access the element of the matrix at the index
i
. -
operator []=(
int i, double v) → void -
Set the element of the matrix at the index
i
. -
operator unary-(
) → Matrix3 - Returns new matrix -this