goog.vec.Matrix3
Namespace.Type
.add(mat0, mat1, resultMat)
Performs a per-component addition of the matrices mat0 and mat1, storing the result into resultMat.
mat0
{goog.vec.ArrayType
}
mat1
{goog.vec.ArrayType
}
resultMat
{goog.vec.ArrayType
}
goog.vec.ArrayType
}
.clone
Creates a clone of a 3x3 matrix.
matrix
{goog.vec.Matrix3.Type
}
goog.vec.Matrix3.Type
}
.create()
Creates the array representation of a 3x3 matrix. The use of the array directly eliminates any overhead associated with the class representation defined above. The returned matrix is cleared to all zeros.
goog.vec.Matrix3.Type
}
.createFromArray(matrix)
Creates a 3x3 matrix initialized from the given array.
matrix
{goog.vec.ArrayType
}
goog.vec.Matrix3.Type
}
.createFromValues(v00, v10, v20, v01, v11, v21, v02, v12, v22)
Creates a 3x3 matrix 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.Matrix3.Type
}
.createIdentity()
Creates the array representation of a 3x3 matrix. The use of the array directly eliminates any overhead associated with the class representation defined above. The returned matrix is initialized with the identity.
goog.vec.Matrix3.Type
}
.equals(mat0, mat1)
Returns true if the components of mat0 are equal to the components of mat1.
mat0
{goog.vec.ArrayType
}
mat1
{goog.vec.ArrayType
}
boolean
}
.getColumn(mat, column, vec)
Retrieves the specified column from the matrix into the given vector array.
mat
{goog.vec.ArrayType
}
column
{number
}
vec
{goog.vec.ArrayType
}
.getColumns(mat, vec0, vec1, vec2)
Retrieves the column values from the given matrix into the given vector elements.
mat
{goog.vec.ArrayType
}
vec0
{goog.vec.ArrayType
}
vec1
{goog.vec.ArrayType
}
vec2
{goog.vec.ArrayType
}
.getElement(mat, row, column)
Retrieves the element at the requested row and column.
mat
{goog.vec.ArrayType
}
row
{number
}
column
{number
}
number
}
.getRow(mat, row, vec)
Retrieves the row values into the given vector.
mat
{goog.vec.ArrayType
}
row
{number
}
vec
{goog.vec.ArrayType
}
.getRows(mat, vec0, vec1, vec2)
Retrieves the rows of the matrix into the supplied vectors.
mat
{goog.vec.ArrayType
}
vec0
{goog.vec.ArrayType
}
vec1
{goog.vec.ArrayType
}
vec2
{goog.vec.ArrayType
}
.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.ArrayType
}
resultMat
{goog.vec.ArrayType
}
boolean
}
.makeAxisAngleRotate(mat, angle, ax, ay, az)
Initializes the given 3x3 matrix as a rotation matrix with the given rotation angle about the axis defined by the vector (ax, ay, az).
mat
{goog.vec.ArrayType
}
angle
{number
}
ax
{number
}
ay
{number
}
az
{number
}
.makeScale(mat, x, y, z)
Initializes the given 3x3 matrix as a scale matrix with x, y and z scale factors.
mat
{goog.vec.ArrayType
}
x
{number
}
y
{number
}
z
{number
}
.makeTranslate(mat, x, y)
Initializes the given 3x3 matrix as a translation matrix with x and y translation values.
mat
{goog.vec.ArrayType
}
x
{number
}
y
{number
}
.multMat(mat0, mat1, resultMat)
Multiplies the two matrices mat0 and mat1 using matrix multiplication, storing the result into resultMat.
mat0
{goog.vec.ArrayType
}
mat1
{goog.vec.ArrayType
}
resultMat
{goog.vec.ArrayType
}
goog.vec.ArrayType
}
.multVec3(mat, vec, resultVec)
Transforms the given vector with the given matrix storing the resulting, transformed matrix into resultVec.
mat
{goog.vec.ArrayType
}
vec
{goog.vec.ArrayType
}
resultVec
{goog.vec.ArrayType
}
goog.vec.ArrayType
}
.scale(mat0, scalar, resultMat)
Performs a component-wise multiplication of mat0 with the given scalar storing the result into resultMat.
mat0
{goog.vec.ArrayType
}
scalar
{number
}
resultMat
{goog.vec.ArrayType
}
goog.vec.ArrayType
}
.setColumn(mat, column, vec)
Sets the specified column with the value from the supplied array.
mat
{goog.vec.ArrayType
}
column
{number
}
vec
{goog.vec.ArrayType
}
.setColumnValues(mat, column, v0, v1, v2)
Sets the specified column with the supplied values.
mat
{goog.vec.ArrayType
}
column
{number
}
v0
{number
}
v1
{number
}
v2
{number
}
.setColumns(mat, vec0, vec1, vec2)
Sets the columns of the matrix from the set of vector elements.
mat
{goog.vec.ArrayType
}
vec0
{goog.vec.ArrayType
}
vec1
{goog.vec.ArrayType
}
vec2
{goog.vec.ArrayType
}
.setDiagonal(mat, vec)
Sets the diagonal values of the matrix from the given vector.
mat
{goog.vec.ArrayType
}
vec
{goog.vec.ArrayType
}
.setDiagonalValues(mat, v00, v11, v22)
Sets the diagonal values of the matrix from the given values.
mat
{goog.vec.ArrayType
}
v00
{number
}
v11
{number
}
v22
{number
}
.setElement(mat, row, column, value)
Sets the element at the requested row and column.
mat
{goog.vec.ArrayType
}
row
{number
}
column
{number
}
value
{number
}
.setFromArray(mat, values)
Sets the matrix from the array of values stored in column major order.
mat
{goog.vec.ArrayType
}
values
{goog.vec.ArrayType
}
.setFromRowMajorArray(mat, values)
Sets the matrix from the array of values stored in row major order.
mat
{goog.vec.ArrayType
}
values
{goog.vec.ArrayType
}
.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.ArrayType
}
v00
{number
}
v10
{number
}
v20
{number
}
v01
{number
}
v11
{number
}
v21
{number
}
v02
{number
}
v12
{number
}
v22
{number
}
.setIdentity(mat)
Sets the given matrix to the identity matrix.
mat
{goog.vec.ArrayType
}
.setRow(mat, row, vec)
Sets the row values from the supplied vector.
mat
{goog.vec.ArrayType
}
row
{number
}
vec
{goog.vec.ArrayType
}
.setRowValues(mat, row, v0, v1, v2)
Sets the row values from the supplied values.
mat
{goog.vec.ArrayType
}
row
{number
}
v0
{number
}
v1
{number
}
v2
{number
}
.setRows(mat, vec0, vec1, vec2)
Sets the rows of the matrix from the supplied vectors.
mat
{goog.vec.ArrayType
}
vec0
{goog.vec.ArrayType
}
vec1
{goog.vec.ArrayType
}
vec2
{goog.vec.ArrayType
}
.setZero(mat)
Clears the given matrix to zero.
mat
{goog.vec.ArrayType
}
.subtract(mat0, mat1, resultMat)
Performs a per-component subtraction of the matrices mat0 and mat1, storing the result into resultMat.
mat0
{goog.vec.ArrayType
}
mat1
{goog.vec.ArrayType
}
resultMat
{goog.vec.ArrayType
}
goog.vec.ArrayType
}
.transpose(mat, resultMat)
Transposes the given matrix mat storing the result into resultMat.
mat
{goog.vec.ArrayType
}
resultMat
{goog.vec.ArrayType
}
goog.vec.ArrayType
}