goog.vec.Mat3
Functions
Performs a per-component addition of the matrices mat0 and mat1, storing the result into resultMat.
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
clone( matrix ) → Float32Array
Float32Array
cloneFloat32( matrix ) → Float32Array
Float32Array
Creates a clone of a 3x3 matrix of Float32.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
cloneFloat64( matrix ) → Float64Array
Float64Array
Creates a clone of a 3x3 matrix of Float64.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
create() → Float32Array
Float32Array
Creates the array representation of a 3x3 matrix of Float32. The returned matrix is cleared to all zeros.
warning Deprecated | Use createFloat32. |
---|
Parameters | None. | ||
---|---|---|---|
Returns |
|
createFloat32() → Float32Array
Float32Array
Creates the array representation of a 3x3 matrix of Float32. The use of the array directly instead of a class reduces overhead. The returned matrix is cleared to all zeros.
Parameters | None. | ||
---|---|---|---|
Returns |
|
createFloat32FromArray( matrix ) → Float32Array
Float32Array
createFloat32FromValues( v00, v10, v20, v01, v11, v21, v02, v12, v22 ) → Float32Array
Float32Array
Creates a 3x3 matrix of Float32 initialized from the given values.
Parameters |
| ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
createFloat32Identity() → Float32Array
Float32Array
Creates a 3x3 identity matrix of Float32.
Parameters | None. | ||
---|---|---|---|
Returns |
|
createFloat64() → Float64Array
Float64Array
Creates the array representation of a 3x3 matrix of Float64. The returned matrix is cleared to all zeros.
Parameters | None. | ||
---|---|---|---|
Returns |
|
createFloat64FromArray( matrix ) → Float64Array
Float64Array
createFloat64FromValues( v00, v10, v20, v01, v11, v21, v02, v12, v22 ) → Float64Array
Float64Array
Creates a 3x3 matrix of Float64 initialized from the given values.
Parameters |
| ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
createFloat64Identity() → Float64Array
Float64Array
Creates a 3x3 identity matrix of Float64.
Parameters | None. | ||
---|---|---|---|
Returns |
|
createFromArray( matrix ) → Float32Array
Float32Array
createFromValues( v00, v10, v20, v01, v11, v21, v02, v12, v22 ) → Float32Array
Float32Array
Creates a 3x3 matrix of Float32 initialized from the given values.
warning Deprecated | Use createFloat32FromValues. |
---|
Parameters |
| ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
createIdentity() → Float32Array
Float32Array
Creates the array representation of a 3x3 matrix of Float32. The returned matrix is cleared to all zeros.
warning Deprecated | Use createFloat32Identity. |
---|
Parameters | None. | ||
---|---|---|---|
Returns |
|
equals( mat0, mat1 ) → boolean
boolean
Retrieves the specified column from the matrix into the given vector array.
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
getColumns( mat, vec0, vec1, vec2 ) → void
void
Retrieves the column values from the given matrix into the given vector elements.
Parameters |
|
---|
getElement( mat, row, column ) → number
number
Retrieves the row values into the given vector.
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
getRows( mat, vec0, vec1, vec2 ) → void
void
Retrieves the rows of the matrix into the supplied vectors.
Parameters |
|
---|
invert( mat0, resultMat ) → boolean
boolean
Computes the inverse of mat0 storing the result into resultMat. If the inverse is defined, this function returns true, false otherwise.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
Makes the given 3x3 matrix a rotation matrix given Euler angles using the ZXZ convention. Given the euler angles [theta1, theta2, theta3], the rotation is defined as rotation = rotation_z(theta1) * rotation_x(theta2) * rotation_z(theta3), with theta1 in [0, 2 * pi], theta2 in [0, pi] and theta3 in [0, 2 * pi]. rotation_x(theta) means rotation around the X axis of theta radians.
Parameters |
| ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
Makes the given 3x3 matrix a rotation matrix with the given rotation angle about the axis defined by the vector (ax, ay, az).
Parameters |
| ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
Makes the given 3x3 matrix a scale matrix with x, y, and z scale factors.
Parameters |
| ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
Makes the given 3x3 matrix a translation matrix with x and y translation values.
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
Multiplies the two matrices mat0 and mat1 using matrix multiplication, storing the result into resultMat.
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
Multiplies matrix mat0 with the given scalar, storing the result into resultMat.
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
Transforms the given vector with the given matrix storing the resulting, transformed matrix into resultVec.
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
Rotate the given matrix by angle about the x,y,z axis. Equivalent to: goog.vec.Mat3.multMat( mat, goog.vec.Mat3.makeRotate(goog.vec.Mat3.create(), angle, x, y, z), mat);
Parameters |
| ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
Rotate the given matrix by angle about the x axis. Equivalent to: goog.vec.Mat3.multMat( mat, goog.vec.Mat3.makeRotateX(goog.vec.Mat3.create(), angle), mat);
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
Rotate the given matrix by angle about the y axis. Equivalent to: goog.vec.Mat3.multMat( mat, goog.vec.Mat3.makeRotateY(goog.vec.Mat3.create(), angle), mat);
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
Rotate the given matrix by angle about the z axis. Equivalent to: goog.vec.Mat3.multMat( mat, goog.vec.Mat3.makeRotateZ(goog.vec.Mat3.create(), angle), mat);
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
Sets the specified column with the value from the supplied array.
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
Sets the specified column with the supplied values.
Parameters |
| ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
Sets the columns of the matrix from the set of vector elements.
Parameters |
| ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
Sets the diagonal values of the matrix from the given vector.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
Sets the diagonal values of the matrix from the given values.
Parameters |
| ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
Sets the element at the requested row and column.
Parameters |
| ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
Sets the matrix from the array of values stored in column major order.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
Sets the matrix from the array of values stored in row major order.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
Initializes the matrix from the set of values. Note the values supplied are in column major order.
Parameters |
| ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
Sets the row values from the supplied vector.
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
Sets the row values from the supplied values.
Parameters |
| ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
Sets the rows of the matrix from the supplied vectors.
Parameters |
| ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
Performs a per-component subtraction of the matrices mat0 and mat1, storing the result into resultMat.
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
Decomposes a rotation matrix into Euler angles using the ZXZ convention so that rotation = rotation_z(theta1) * rotation_x(theta2) * rotation_z(theta3), with theta1 in [0, 2 * pi], theta2 in [0, pi] and theta3 in [0, 2 * pi]. rotation_x(theta) means rotation around the X axis of theta radians.
Parameters |
| ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
Transposes the given matrix mat storing the result into resultMat.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
Properties
No information.
Float32 → Float32Array
Float32Array
No information.
Float64 → Float64Array
Float64Array
No information.
No information.
No information.
Type → Float32Array
Float32Array
No information.