new Matrix3d():
Matrix3d
new Matrix3d(
elements):Matrix3d
number[]
Matrix.constructor
new Matrix3d(
e11,e12,e13,e21,e22,e23,e31,e32,e33):Matrix3d
number
number
number
number
number
number
number
number
number
Matrix.constructor
readonlydimension:number
Matrix dimension.
get elements():
number[]
Returns matrix elements array in row-major order.
number[]
set elements(
elements):void
Sets matrix elements. Throw exception if elements length not equal to Matrix.dimension x Matrix.dimension.
number[]
Elements array in row-major order.
void
add(
other):this
Adds elements of other matrix to this matrix. Do nothing if other matrix Matrix.dimension not equal to this matrix Matrix.dimension.
Other matrix.
this
added(
other):Matrix
Returns new Matrix object received by performing a add() operation to this object.
Other matrix.
clone():
Matrix3d
Creates new Matrix3d object same as this.
column(
column):number[]
Returns array of elements from column. Throws exception if column greater or equal than Matrix.dimension.
number
Column index.
number[]
copy(
other):this
Copies values from another matrix.
Copied object.
this
determinant():
number
Returns this matrix determinant.
number
diagonal():
number[]
Returns array of diagonal elements.
number[]
divide(
scalar):this
Divides elements of this matrix by scalar.
number
Scalar.
this
divided(
scalar):Matrix
Returns new Matrix object received by performing a divide() operation to this object.
number
Scalar.
fill(
value):this
Fill matrix with defined value.
number
Value to fill matrix.
this
get(
index):number
Returns value of the matrix element placed in row-major order array at index position. Throws exception if index greater or equal than Matrix.dimension x Matrix.dimension.
number
Element index in row-major order array.
number
invert():
this
Inverts this matrix.
this
inverted():
Matrix
Returns new Matrix object received by performing a invert() operation to this object.
isEqual(
other,tolerance):boolean
Returns true if this matrix have same Matrix.dimension as other matrix and all the elements are equal within provided tolerance (1e-7 by default).
number = Matrix.coincidenceTolerance
boolean
isIdentity():
boolean
Returns true if matrix is identity.
boolean
isSingular():
boolean
Returns true if this matrix determinant tends to 0.
boolean
multiplied(
other):Matrix
Returns new Matrix object received by performing a multiply() operation to this object.
Other matrix.
multiplied(
scalar):Matrix
Returns new Matrix object received by performing a multiply() operation to this object.
number
Scalar.
multiply(
other):this
Multiplies this matrix by other matrix. Throws exception if dimensions of this and other matrixes are not equal.
Other matrix.
this
multiply(
scalar):this
Multiplies elements of this matrix by scalar.
number
Scalar.
this
power(
num):this
Powers this matrix.
number
Power value.
this
powered(
num):Matrix
Returns new Matrix object received by performing a power() operation to this object.
number
Power value.
preMultiplied(
other):Matrix3d
Returns new Matrix3d object received by performing a preMultiply()
Other matrix.
preMultiply(
other):this
Pre multiplies this matrix by other matrix.
Other matrix.
this
reset():
this
Makes this matrix as identity matrix.
this
row(
row):number[]
Returns array of elements from row. Throws exception if row greater or equal than Matrix.dimension.
number
Row index.
number[]
set(
index,value):this
Sets value of the matrix element placed in row-major order array at index position. Throws exception if index greater or equal than Matrix.dimension x Matrix.dimension.
number
Element index in row-major order array.
number
Element value.
this
setColumn(
column,elements):this
Sets elements in column. Throws exception if column greater or equal than Matrix.dimension (3) or elements length not equal to Matrix.dimension (3).
number
Column index.
number[]
Column elements.
this
setColumn(
column,e1,e2,e3):this
Sets elements in column. Throws exception if column greater or equal than Matrix.dimension (3).
number
Column index.
number
Column first element.
number
Column second element.
number
Column third element.
this
Matrix.setColumn
setCross(
reference):this
Throws exception if reference length not equal to this matrix dimension (3).
number[]
Reference array.
this
setDiagonal(
elements):this
Sets diagonal elements. Throws exception if elements length not equal to Matrix.dimension (3).
number[]
Diagonal elements.
this
setDiagonal(
e1,e2,e3):this
Sets diagonal elements.
number
Diagonal first element.
number
Diagonal second element.
number
Row third element.
this
Matrix.setDiagonal
setDot(
reference):this
Throws exception if reference length not equal to this matrix dimension (3).
number[]
Reference array.
this
setElements(
elements):this
Sets matrix elements. Throw exception if elements length not equal to 9 (3x3).
number[]
Elements array in row-major order.
this
setElements(
e11,e12,e13,e21,e22,e23,e31,e32,e33):this
Sets matrix elements in row-major order.
number
Element [0][0].
number
Element [0][1].
number
Element [0][2].
number
Element [1][0].
number
Element [1][1].
number
Element [1][2].
number
Element [2][0].
number
Element [2][1].
number
Element [2][2].
this
Matrix.setElements
setRotation(
axis,angle):this
Sets this matrix elements by rotating on angle around axis.
Rotation axis.
number
Rotation angle.
this
setRow(
row,elements):this
Sets elements in row. Throws exception if row greater or equal than Matrix.dimension (3) or elements length not equal to Matrix.dimension (3).
number
Row index.
number[]
Row elements.
this
setRow(
row,e1,e2,e3):this
Sets elements in row. Throws exception if row greater or equal than Matrix.dimension (3).
number
Row index.
number
Row first element.
number
Row second element.
number
Row third element.
this
Matrix.setRow
setScale(
scale):this
Makes this matrix as identity matrix and fill diagonal with scale values.
number
Scale.
this
setValue(
row,column,value):this
Sets value from [row][column] of the matrix. Throws exception if row and / or column greater or equal than Matrix.dimension.
number
Row index.
number
Column index.
number
New value.
this
subtract(
other):this
Subtracts elements of other matrix from this matrix. Do nothing if other matrix Matrix.dimension not equal to this matrix Matrix.dimension.
Other matrix.
this
subtracted(
other):Matrix
Returns new Matrix object received by performing a subtract() operation to this object.
Other matrix.
toString(
precision):string
Returns string representation of this matrix with provided precision (3 by default).
number = 3
Precision.
string
transpose():
this
Transposes this matrix.
this
transposed():
Matrix
Returns new Matrix object received by performing a transpose() operation to this object.
value(
row,column):number
Returns value from [row][column] of the matrix. Throws exception if row and / or column greater or equal than Matrix.dimension.
number
Row index.
number
Column index.
number
staticidentity():Matrix3d
Returns identity matrix.