Methods
addMat33(that) → {Mat33}
Adds the matrix with the provided matrix argument, returning a new Ma33
object.
Parameters:
Name | Type | Description |
---|---|---|
that |
Mat33 | Array | The matrix to add. |
Returns:
The sum of the two matrices.
- Type
- Mat33
addMat44(that) → {Mat33}
Adds the matrix with the provided matrix argument, returning a new Ma33
object.
Parameters:
Name | Type | Description |
---|---|---|
that |
Mat44 | Array | The matrix to add. |
Returns:
The sum of the two matrices.
- Type
- Mat33
col(index, vec) → {Vec3}
Returns a column of the matrix as a Vec3 object.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The 0-based col index. |
vec |
Vec3 | Array | The vector to replace the col. Optional. |
Returns:
The column vector.
- Type
- Vec3
decompose() → {Object}
Decomposes the matrix into the corresponding rotation, and scale components.
a scale.
- Source:
Returns:
The decomposed components of the matrix.
- Type
- Object
divScalar(that) → {Mat33}
Divides all components of the matrix by the provded scalar argument,
returning a new Mat33 object.
Parameters:
Name | Type | Description |
---|---|---|
that |
number | The scalar to divide the matrix by. |
Returns:
The resulting matrix.
- Type
- Mat33
equals(that, epsilon) → {boolean}
Returns true if the all components match those of a provided matrix.
An optional epsilon value may be provided.
Parameters:
Name | Type | Description |
---|---|---|
that |
Mat33 | Array | The matrix to test equality with. |
epsilon |
number | The epsilon value. Optional. |
Returns:
Whether or not the matrix components match.
- Type
- boolean
inverse() → {Mat33}
Returns the inverse of the matrix.
Returns:
The inverted matrix.
- Type
- Mat33
inverseRotation() → {Mat33}
Returns the inverse of the transform's rotation matrix.
Returns:
The inverse rotation matrix.
- Type
- Mat33
inverseScale() → {Mat33}
Returns the inverse of the transform's scale matrix.
Returns:
The inverse scale matrix.
- Type
- Mat33
multMat33(that) → {Mat33}
Multiplies the provded matrix argument by the matrix, returning a new
Mat33 object.
Parameters:
Name | Type | Description |
---|---|---|
that |
Mat33 | Array | The matrix to be multiplied by the matrix. |
Returns:
The resulting matrix.
- Type
- Mat33
multMat44(that) → {Mat33}
Multiplies the provded matrix argument by the matrix, returning a new
Mat33 object.
Parameters:
Name | Type | Description |
---|---|---|
that |
Mat44 | Array | The matrix to be multiplied by the matrix. |
Returns:
The resulting matrix.
- Type
- Mat33
multScalar(that) → {Mat33}
Multiplies all components of the matrix by the provded scalar argument,
returning a new Mat33 object.
Parameters:
Name | Type | Description |
---|---|---|
that |
number | The scalar to multiply the matrix by. |
Returns:
The resulting matrix.
- Type
- Mat33
multVec3(that) → {Vec3}
Multiplies the provded vector argument by the matrix, returning a new
Vec3 object.
Parameters:
Name | Type | Description |
---|---|---|
that |
Vec3 | Vec4 | Array | The vector to be multiplied by the matrix. |
Returns:
The resulting vector.
- Type
- Vec3
rotation() → {Mat33}
Returns the rotation matrix from the affine-transformation.
Returns:
The rotation matrix.
- Type
- Mat33
row(index, vec) → {Vec3}
Returns a row of the matrix as a Vec3 object.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The 0-based row index. |
vec |
Vec3 | Array | The vector to replace the row. Optional. |
Returns:
The row vector.
- Type
- Vec3
scale() → {Mat33}
Returns the scale matrix from the affine-transformation.
Returns:
The scale matrix.
- Type
- Mat33
subMat33(that) → {Mat33}
Subtracts the provided matrix argument from the matrix, returning a new
Mat33 object.
Parameters:
Name | Type | Description |
---|---|---|
that |
Mat33 | Array | The matrix to add. |
Returns:
The difference of the two matrices.
- Type
- Mat33
subMat44(that) → {Mat33}
Subtracts the provided matrix argument from the matrix, returning a new
Mat33 object.
Parameters:
Name | Type | Description |
---|---|---|
that |
Mat44 | Array | The matrix to add. |
Returns:
The difference of the two matrices.
- Type
- Mat33
toArray() → {Array}
Returns an array representation of the matrix.
Returns:
The matrix as an array.
- Type
- Array
toMat44() → {Array}
Returns an array representation of the matrix.
Returns:
The matrix as an array.
- Type
- Array
toString() → {String}
Returns a string representation of the matrix.
Returns:
The string representation of the matrix.
- Type
- String
transpose() → {Mat33}
Returns the transpose of the matrix.
Returns:
The transposed matrix.
- Type
- Mat33
(static) identity() → {Mat33}
Returns the identity matrix.
Returns:
The identiy matrix.
- Type
- Mat33
(static) random() → {Mat33}
Returns a random transform matrix composed of a rotation and scale.
Returns:
A random transform matrix.
- Type
- Mat33
(static) rotation(angle, axis) → {Mat33}
Returns a rotation matrix defined by an axis and an angle.
Parameters:
Name | Type | Description |
---|---|---|
angle |
number | The angle of the rotation, in radians. |
axis |
Vec3 | The axis of the rotation. |
Returns:
The rotation matrix.
- Type
- Mat33
(static) rotationFromTo(from, to) → {Mat33}
Returns a rotation matrix to rotate a vector from one direction to
another.
Parameters:
Name | Type | Description |
---|---|---|
from |
Vec3 | The starting direction. |
to |
Vec3 | The ending direction. |
Returns:
The matrix representing the rotation.
- Type
- Mat33
(static) scale(scale) → {Mat33}
Returns a scale matrix.
Parameters:
Name | Type | Description |
---|---|---|
scale |
Vec3 | Array | number | The scalar or vector scaling factor. |
Returns:
The scale matrix.
- Type
- Mat33