goog.vec.Mat3
Namespace.AnyType
.Float32
.Float64
.Mat3Like
.Number
.Type
.addMat(mat0, mat1, resultMat)
Performs a per-component addition of the matrices mat0 and mat1, storing the result into resultMat.
mat0
{goog.vec.Mat3.AnyType
}
mat1
{goog.vec.Mat3.AnyType
}
resultMat
{goog.vec.Mat3.AnyType
}
goog.vec.Mat3.AnyType
}
.clone
[deprecated]Deprecated. Use cloneFloat32.
Creates a clone of a 3x3 matrix of Float32.
matrix
{goog.vec.Mat3.Mat3Like
}
goog.vec.Mat3.Type
}
.cloneFloat32
Creates a clone of a 3x3 matrix of Float32.
matrix
{goog.vec.Mat3.Float32
}
goog.vec.Mat3.Float32
}
.cloneFloat64
Creates a clone of a 3x3 matrix of Float64.
matrix
{goog.vec.Mat3.Float64
}
goog.vec.Mat3.Float64
}
.create()
[deprecated]Deprecated. Use createFloat32.
Creates the array representation of a 3x3 matrix of Float32. The returned matrix is cleared to all zeros.
goog.vec.Mat3.Type
}
.createFloat32()
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.
goog.vec.Mat3.Float32
}
.createFloat32FromArray(matrix)
Creates a 3x3 matrix of Float32 initialized from the given array.
matrix
{goog.vec.Mat3.AnyType
}
goog.vec.Mat3.Float32
}
.createFloat32FromValues(v00, v10, v20, v01, v11, v21, v02, v12, v22)
Creates a 3x3 matrix of Float32 initialized from the given values.
v00
{number
}
v10
{number
}
v20
{number
}
v01
{number
}
v11
{number
}
v21
{number
}
v02
{number
}
v12
{number
}
v22
{number
}
goog.vec.Mat3.Float32
}
.createFloat32Identity()
Creates a 3x3 identity matrix of Float32.
goog.vec.Mat3.Float32
}
.createFloat64()
Creates the array representation of a 3x3 matrix of Float64. The returned matrix is cleared to all zeros.
goog.vec.Mat3.Float64
}
.createFloat64FromArray(matrix)
Creates a 3x3 matrix of Float64 initialized from the given array.
matrix
{goog.vec.Mat3.AnyType
}
goog.vec.Mat3.Float64
}
.createFloat64FromValues(v00, v10, v20, v01, v11, v21, v02, v12, v22)
Creates a 3x3 matrix of Float64 initialized from the given values.
v00
{number
}
v10
{number
}
v20
{number
}
v01
{number
}
v11
{number
}
v21
{number
}
v02
{number
}
v12
{number
}
v22
{number
}
goog.vec.Mat3.Float64
}
.createFloat64Identity()
Creates a 3x3 identity matrix of Float64.
goog.vec.Mat3.Float64
}
.createFromArray(matrix)
[deprecated]Deprecated. Use createFloat32FromArray.
Creates a 3x3 matrix of Float32 initialized from the given array.
matrix
{goog.vec.Mat3.Mat3Like
}
goog.vec.Mat3.Type
}
.createFromValues(v00, v10, v20, v01, v11, v21, v02, v12, v22)
[deprecated]Deprecated. Use createFloat32FromValues.
Creates a 3x3 matrix of Float32 initialized from the given values.
v00
{number
}
v10
{number
}
v20
{number
}
v01
{number
}
v11
{number
}
v21
{number
}
v02
{number
}
v12
{number
}
v22
{number
}
goog.vec.Mat3.Type
}
.createIdentity()
[deprecated]Deprecated. Use createFloat32Identity.
Creates the array representation of a 3x3 matrix of Float32. The returned matrix is cleared to all zeros.
goog.vec.Mat3.Type
}
.createNumber()
Creates the array representation of a 3x3 matrix of Number. The returned matrix is cleared to all zeros.
goog.vec.Mat3.Number
}
.createNumberIdentity()
Creates a 3x3 identity matrix of Number. The returned matrix is cleared to all zeros.
goog.vec.Mat3.Number
}
.equals(mat0, mat1)
Returns true if the components of mat0 are equal to the components of mat1.
mat0
{goog.vec.Mat3.AnyType
}
mat1
{goog.vec.Mat3.AnyType
}
boolean
}
.getColumn(mat, column, vec)
Retrieves the specified column from the matrix into the given vector array.
mat
{goog.vec.Mat3.AnyType
}
column
{number
}
vec
{goog.vec.Vec3.AnyType
}
goog.vec.Vec3.AnyType
}
.getColumns(mat, vec0, vec1, vec2)
Retrieves the column values from the given matrix into the given vector elements.
mat
{goog.vec.Mat3.AnyType
}
vec0
{goog.vec.Vec3.AnyType
}
vec1
{goog.vec.Vec3.AnyType
}
vec2
{goog.vec.Vec3.AnyType
}
.getElement(mat, row, column)
Retrieves the element at the requested row and column.
mat
{goog.vec.Mat3.AnyType
}
row
{number
}
column
{number
}
number
}
.getRow(mat, row, vec)
Retrieves the row values into the given vector.
mat
{goog.vec.Mat3.AnyType
}
row
{number
}
vec
{goog.vec.Vec3.AnyType
}
goog.vec.Vec3.AnyType
}
.getRows(mat, vec0, vec1, vec2)
Retrieves the rows of the matrix into the supplied vectors.
mat
{goog.vec.Mat3.AnyType
}
vec0
{goog.vec.Vec3.AnyType
}
vec1
{goog.vec.Vec3.AnyType
}
vec2
{goog.vec.Vec3.AnyType
}
.invert(mat0, resultMat)
Computes the inverse of mat0 storing the result into resultMat. If the inverse is defined, this function returns true, false otherwise.
mat0
{goog.vec.Mat3.AnyType
}
resultMat
{goog.vec.Mat3.AnyType
}
boolean
}
.makeEulerZXZ(mat, theta1, theta2, theta3)
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.
mat
{goog.vec.Mat3.AnyType
}
theta1
{number
}
theta2
{number
}
theta3
{number
}
goog.vec.Mat3.AnyType
}
.makeIdentity(mat)
Makes the given 3x3 matrix the identity matrix.
mat
{goog.vec.Mat3.AnyType
}
goog.vec.Mat3.AnyType
}
.makeRotate(mat, angle, ax, ay, az)
Makes the given 3x3 matrix a rotation matrix with the given rotation angle about the axis defined by the vector (ax, ay, az).
mat
{goog.vec.Mat3.AnyType
}
angle
{number
}
ax
{number
}
ay
{number
}
az
{number
}
goog.vec.Mat3.AnyType
}
.makeRotateX(mat, angle)
Makes the given 3x3 matrix a rotation matrix with the given rotation angle about the X axis.
mat
{goog.vec.Mat3.AnyType
}
angle
{number
}
goog.vec.Mat3.AnyType
}
.makeRotateY(mat, angle)
Makes the given 3x3 matrix a rotation matrix with the given rotation angle about the Y axis.
mat
{goog.vec.Mat3.AnyType
}
angle
{number
}
goog.vec.Mat3.AnyType
}
.makeRotateZ(mat, angle)
Makes the given 3x3 matrix a rotation matrix with the given rotation angle about the Z axis.
mat
{goog.vec.Mat3.AnyType
}
angle
{number
}
goog.vec.Mat3.AnyType
}
.makeScale(mat, x, y, z)
Makes the given 3x3 matrix a scale matrix with x, y, and z scale factors.
mat
{goog.vec.Mat3.AnyType
}
x
{number
}
y
{number
}
z
{number
}
goog.vec.Mat3.AnyType
}
.makeTranslate(mat, x, y)
Makes the given 3x3 matrix a translation matrix with x and y translation values.
mat
{goog.vec.Mat3.AnyType
}
x
{number
}
y
{number
}
goog.vec.Mat3.AnyType
}
.makeZero(mat)
Makes the given 3x3 matrix the zero matrix.
mat
{goog.vec.Mat3.AnyType
}
goog.vec.Mat3.AnyType
}
.multMat(mat0, mat1, resultMat)
Multiplies the two matrices mat0 and mat1 using matrix multiplication, storing the result into resultMat.
mat0
{goog.vec.Mat3.AnyType
}
mat1
{goog.vec.Mat3.AnyType
}
resultMat
{goog.vec.Mat3.AnyType
}
goog.vec.Mat3.AnyType
}
.multScalar(mat, scalar, resultMat)
Multiplies matrix mat0 with the given scalar, storing the result into resultMat.
mat
{goog.vec.Mat3.AnyType
}
scalar
{number
}
resultMat
{goog.vec.Mat3.AnyType
}
goog.vec.Mat3.AnyType
}
.multVec3(mat, vec, resultVec)
Transforms the given vector with the given matrix storing the resulting, transformed matrix into resultVec.
mat
{goog.vec.Mat3.AnyType
}
vec
{goog.vec.Vec3.AnyType
}
resultVec
{goog.vec.Vec3.AnyType
}
goog.vec.Vec3.AnyType
}
.rotate(mat, angle, x, y, z)
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);
mat
{goog.vec.Mat3.AnyType
}
angle
{number
}
x
{number
}
y
{number
}
z
{number
}
goog.vec.Mat3.AnyType
}
.rotateX(mat, angle)
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);
mat
{goog.vec.Mat3.AnyType
}
angle
{number
}
goog.vec.Mat3.AnyType
}
.rotateY(mat, angle)
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);
mat
{goog.vec.Mat3.AnyType
}
angle
{number
}
goog.vec.Mat3.AnyType
}
.rotateZ(mat, angle)
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);
mat
{goog.vec.Mat3.AnyType
}
angle
{number
}
goog.vec.Mat3.AnyType
}
.setColumn(mat, column, vec)
Sets the specified column with the value from the supplied array.
mat
{goog.vec.Mat3.AnyType
}
column
{number
}
vec
{goog.vec.Vec3.AnyType
}
goog.vec.Mat3.AnyType
}
.setColumnValues(mat, column, v0, v1, v2)
Sets the specified column with the supplied values.
mat
{goog.vec.Mat3.AnyType
}
column
{number
}
v0
{number
}
v1
{number
}
v2
{number
}
goog.vec.Mat3.AnyType
}
.setColumns(mat, vec0, vec1, vec2)
Sets the columns of the matrix from the set of vector elements.
mat
{goog.vec.Mat3.AnyType
}
vec0
{goog.vec.Vec3.AnyType
}
vec1
{goog.vec.Vec3.AnyType
}
vec2
{goog.vec.Vec3.AnyType
}
goog.vec.Mat3.AnyType
}
.setDiagonal(mat, vec)
Sets the diagonal values of the matrix from the given vector.
mat
{goog.vec.Mat3.AnyType
}
vec
{goog.vec.Vec3.AnyType
}
goog.vec.Mat3.AnyType
}
.setDiagonalValues(mat, v00, v11, v22)
Sets the diagonal values of the matrix from the given values.
mat
{goog.vec.Mat3.AnyType
}
v00
{number
}
v11
{number
}
v22
{number
}
goog.vec.Mat3.AnyType
}
.setElement(mat, row, column, value)
Sets the element at the requested row and column.
mat
{goog.vec.Mat3.AnyType
}
row
{number
}
column
{number
}
value
{number
}
goog.vec.Mat3.AnyType
}
.setFromArray(mat, values)
Sets the matrix from the array of values stored in column major order.
mat
{goog.vec.Mat3.AnyType
}
values
{goog.vec.Mat3.AnyType
}
goog.vec.Mat3.AnyType
}
.setFromRowMajorArray(mat, values)
Sets the matrix from the array of values stored in row major order.
mat
{goog.vec.Mat3.AnyType
}
values
{goog.vec.Mat3.AnyType
}
goog.vec.Mat3.AnyType
}
.setFromValues(mat, v00, v10, v20, v01, v11, v21, v02, v12, v22)
Initializes the matrix from the set of values. Note the values supplied are in column major order.
mat
{goog.vec.Mat3.AnyType
}
v00
{number
}
v10
{number
}
v20
{number
}
v01
{number
}
v11
{number
}
v21
{number
}
v02
{number
}
v12
{number
}
v22
{number
}
goog.vec.Mat3.AnyType
}
.setRow(mat, row, vec)
Sets the row values from the supplied vector.
mat
{goog.vec.Mat3.AnyType
}
row
{number
}
vec
{goog.vec.Vec3.AnyType
}
goog.vec.Mat3.AnyType
}
.setRowValues(mat, row, v0, v1, v2)
Sets the row values from the supplied values.
mat
{goog.vec.Mat3.AnyType
}
row
{number
}
v0
{number
}
v1
{number
}
v2
{number
}
goog.vec.Mat3.AnyType
}
.setRows(mat, vec0, vec1, vec2)
Sets the rows of the matrix from the supplied vectors.
mat
{goog.vec.Mat3.AnyType
}
vec0
{goog.vec.Vec3.AnyType
}
vec1
{goog.vec.Vec3.AnyType
}
vec2
{goog.vec.Vec3.AnyType
}
goog.vec.Mat3.AnyType
}
.subMat(mat0, mat1, resultMat)
Performs a per-component subtraction of the matrices mat0 and mat1, storing the result into resultMat.
mat0
{goog.vec.Mat3.AnyType
}
mat1
{goog.vec.Mat3.AnyType
}
resultMat
{goog.vec.Mat3.AnyType
}
goog.vec.Mat3.AnyType
}
.toEulerZXZ(mat, euler, opt_theta2IsNegative)
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.
mat
{goog.vec.Mat3.AnyType
}
euler
{goog.vec.Vec3.AnyType
}
opt_theta2IsNegative
{boolean
=}
goog.vec.Vec3.AnyType
}
.transpose(mat, resultMat)
Transposes the given matrix mat storing the result into resultMat.
mat
{goog.vec.Mat3.AnyType
}
resultMat
{goog.vec.Mat3.AnyType
}
goog.vec.Mat3.AnyType
}