Function Summary | |
addMat(?goog.vec.Mat4.Mat4Like mat0, ?goog.vec.Mat4.Mat4Like mat1, ?goog.vec.Mat4.Mat4Like resultMat) ⇒ !goog.vec.Mat4.Mat4Like Performs a per-component addition of the matrix mat0 and mat1, storing the result into resultMat. | |
create() ⇒ !goog.vec.Mat4.Type Creates the array representation of a 4x4 matrix. The use of the array directly instead of a class reduces overhead. The returned matrix is cleared to all zeros. | |
createFromArray(?goog.vec.Mat4.Mat4Like matrix) ⇒ !goog.vec.Mat4.Type Creates a 4x4 matrix initialized from the given array. | |
createFromValues(number v00, number v10, number v20, number v30, number v01, number v11, number v21, number v31, number v02, number v12, number v22, number v32, number v03, number v13, number v23, number v33) ⇒ !goog.vec.Mat4.Type Creates a 4x4 matrix initialized from the given values. | |
createIdentity() ⇒ !goog.vec.Mat4.Type Creates the array representation of a 4x4 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 | |
determinant(?goog.vec.Mat4.Mat4Like mat) ⇒ number Computes the determinant of the matrix. | |
equals(?goog.vec.Mat4.Mat4Like mat0, ?goog.vec.Mat4.Mat4Like mat1) ⇒ boolean Returns true if the components of mat0 are equal to the components of mat1. | |
getColumn(?goog.vec.Mat4.Mat4Like mat, number column, ?goog.vec.Vec4.Vec4Like vec) Retrieves the specified column from the matrix into the given vector. | |
getColumns(?goog.vec.Mat4.Mat4Like mat, ?goog.vec.Vec4.Vec4Like vec0, ?goog.vec.Vec4.Vec4Like vec1, ?goog.vec.Vec4.Vec4Like vec2, ?goog.vec.Vec4.Vec4Like vec3) Retrieves the column values from the given matrix into the given vectors. | |
getDiagonal(?goog.vec.Mat4.Mat4Like mat, ?goog.vec.Vec4.Vec4Like vec, number= opt_diagonal) Gets the diagonal values of the matrix into the given vector. | |
getElement(?goog.vec.Mat4.Mat4Like mat, number row, number column) ⇒ number Retrieves the element at the requested row and column. | |
getRow(?goog.vec.Mat4.Mat4Like mat, number row, ?goog.vec.Vec4.Vec4Like vec) Retrieves the row values into the given vector. | |
getRows(?goog.vec.Mat4.Mat4Like mat, ?goog.vec.Vec4.Vec4Like vec0, ?goog.vec.Vec4.Vec4Like vec1, ?goog.vec.Vec4.Vec4Like vec2, ?goog.vec.Vec4.Vec4Like vec3) Retrieves the rows of the matrix into the supplied vectors. | |
invert(?goog.vec.Mat4.Mat4Like mat, ?goog.vec.Mat4.Mat4Like resultMat) ⇒ boolean Computes the inverse of mat storing the result into resultMat. If the inverse is defined, this function returns true, false otherwise. | |
makeEulerZXZ(?goog.vec.Mat4.Mat4Like mat, number theta1, number theta2, number theta3) ⇒ !goog.vec.Mat4.Mat4Like Makes the given 4x4 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, | |
makeFrustum(?goog.vec.Mat4.Mat4Like mat, number left, number right, number bottom, number top, number near, number far) ⇒ !goog.vec.Mat4.Mat4Like Makes the given 4x4 matrix a perspective projection matrix. | |
makeIdentity(?goog.vec.Mat4.Mat4Like mat) ⇒ !goog.vec.Mat4.Mat4Like Makes the given 4x4 matrix the identity matrix. | |
makeLookAt(?goog.vec.Mat4.Mat4Like mat, ?goog.vec.Vec3.Vec3Like eyePt, ?goog.vec.Vec3.Vec3Like centerPt, ?goog.vec.Vec3.Vec3Like worldUpVec) ⇒ !goog.vec.Mat4.Mat4Like Makes the given 4x4 matrix a modelview matrix of a camera so that the camera is 'looking at' the given center point. | |
makeOrtho(?goog.vec.Mat4.Mat4Like mat, number left, number right, number bottom, number top, number near, number far) ⇒ !goog.vec.Mat4.Mat4Like Makes the given 4x4 matrix an orthographic projection matrix. | |
makePerspective(?goog.vec.Mat4.Mat4Like mat, number fovy, number aspect, number near, number far) ⇒ !goog.vec.Mat4.Mat4Like Makse the given 4x4 matrix perspective projection matrix given a field of view and aspect ratio. | |
makeRotate(?goog.vec.Mat4.Mat4Like mat, number angle, number ax, number ay, number az) ⇒ !goog.vec.Mat4.Mat4Like Makes the given 4x4 matrix a rotation matrix with the given rotation angle about the axis defined by the vector (ax, ay, az). | |
makeScale(?goog.vec.Mat4.Mat4Like mat, number x, number y, number z) ⇒ !goog.vec.Mat4.Mat4Like Makes the given 4x4 matrix as a scale matrix with x, y and z scale factors. | |
makeTranslate(?goog.vec.Mat4.Mat4Like mat, number x, number y, number z) ⇒ !goog.vec.Mat4.Mat4Like Makes the given 4x4 matrix a translation matrix with x, y and z translation factors. | |
makeZero(?goog.vec.Mat4.Mat4Like mat) ⇒ !goog.vec.Mat4.Mat4Like Makes the given 4x4 matrix the zero matrix. | |
multMat(?goog.vec.Mat4.Mat4Like mat0, ?goog.vec.Mat4.Mat4Like mat1, ?goog.vec.Mat4.Mat4Like resultMat) ⇒ !goog.vec.Mat4.Mat4Like Multiplies the two matrices mat0 and mat1 using matrix multiplication, storing the result into resultMat. | |
multScalar(?goog.vec.Mat4.Mat4Like mat, number scalar, ?goog.vec.Mat4.Mat4Like resultMat) ⇒ !goog.vec.Mat4.Mat4Like Multiplies matrix mat with the given scalar, storing the result into resultMat. | |
multVec3(?goog.vec.Mat4.Mat4Like mat, ?goog.vec.Vec3.Vec3Like vec, ?goog.vec.Vec3.Vec3Like resultVec) ⇒ !goog.vec.Vec3.Vec3Like Transforms the given vector with the given matrix storing the resulting, transformed vector into resultVec. The input vector is multiplied against the upper 3x4 matrix omitting the projective component. | |
multVec3NoTranslate(?goog.vec.Mat4.Mat4Like mat, ?goog.vec.Vec3.Vec3Like vec, ?goog.vec.Vec3.Vec3Like resultVec) ⇒ !goog.vec.Vec3.Vec3Like Transforms the given vector with the given matrix storing the resulting, transformed vector into resultVec. The input vector is multiplied against the upper 3x3 matrix omitting the projective component and translation components. | |
multVec3Projective(?goog.vec.Mat4.Mat4Like mat, ?goog.vec.Vec3.Vec3Like vec, ?goog.vec.Vec3.Vec3Like resultVec) ⇒ !goog.vec.Vec3.Vec3Like Transforms the given vector with the given matrix storing the resulting, transformed vector into resultVec. The input vector is multiplied against the full 4x4 matrix with the homogeneous divide applied to reduce the 4 element vector to a 3 element vector. | |
multVec4(?goog.vec.Mat4.Mat4Like mat, ?goog.vec.Vec4.Vec4Like vec, ?goog.vec.Vec4.Vec4Like resultVec) ⇒ !goog.vec.Vec4.Vec4Like Transforms the given vector with the given matrix storing the resulting, transformed vector into resultVec. | |
rotate(?goog.vec.Mat4.Mat4Like mat, number angle, number x, number y, number z) ⇒ !goog.vec.Mat4.Mat4Like Rotation the given matrix by angle about the x,y,z axis. Equivalent to: goog.vec.Mat4.multMat( mat, goog.vec.Mat4.makeRotate(goog.vec.Mat4.create(), angle, x, y, z), mat); | |
scale(?goog.vec.Mat4.Mat4Like mat, number x, number y, number z) ⇒ !goog.vec.Mat4.Mat4Like Scales the given matrix by x,y,z. Equivalent to: goog.vec.Mat4.multMat( mat, goog.vec.Mat4.makeScale(goog.vec.Mat4.create(), x, y, z), mat); | |
setColumn(?goog.vec.Mat4.Mat4Like mat, number column, ?goog.vec.Vec4.Vec4Like vec) Sets the specified column with the value from the supplied vector. | |
setColumnValues(?goog.vec.Mat4.Mat4Like mat, number column, number v0, number v1, number v2, number v3) Sets the specified column with the supplied values. | |
setColumns(?goog.vec.Mat4.Mat4Like mat, ?goog.vec.Vec4.Vec4Like vec0, ?goog.vec.Vec4.Vec4Like vec1, ?goog.vec.Vec4.Vec4Like vec2, ?goog.vec.Vec4.Vec4Like vec3) Sets the columns of the matrix from the given vectors. | |
setDiagonal(?goog.vec.Mat4.Mat4Like mat, ?goog.vec.Vec4.Vec4Like vec) Sets the diagonal values of the matrix from the given vector. | |
setDiagonalValues(?goog.vec.Mat4.Mat4Like mat, number v00, number v11, number v22, number v33) Sets the diagonal values of the matrix from the given values. | |
setElement(?goog.vec.Mat4.Mat4Like mat, number row, number column, number value) Sets the element at the requested row and column. | |
setFromArray(?goog.vec.Mat4.Mat4Like mat, ?goog.vec.Mat4.Mat4Like values) Sets the matrix from the array of values stored in column major order. | |
setFromRowMajorArray(?goog.vec.Mat4.Mat4Like mat, ?goog.vec.Mat4.Mat4Like values) Sets the matrix from the array of values stored in row major order. | |
setFromValues(?goog.vec.Mat4.Mat4Like mat, number v00, number v10, number v20, number v30, number v01, number v11, number v21, number v31, number v02, number v12, number v22, number v32, number v03, number v13, number v23, number v33) Initializes the matrix from the set of values. Note the values supplied are in column major order. | |
setRow(?goog.vec.Mat4.Mat4Like mat, number row, ?goog.vec.Vec4.Vec4Like vec) Sets the row values from the supplied vector. | |
setRowValues(?goog.vec.Mat4.Mat4Like mat, number row, number v0, number v1, number v2, number v3) Sets the row values from the supplied values. | |
setRows(?goog.vec.Mat4.Mat4Like mat, ?goog.vec.Vec4.Vec4Like vec0, ?goog.vec.Vec4.Vec4Like vec1, ?goog.vec.Vec4.Vec4Like vec2, ?goog.vec.Vec4.Vec4Like vec3) Sets the rows of the matrix from the supplied vectors. | |
subMat(?goog.vec.Mat4.Mat4Like mat0, ?goog.vec.Mat4.Mat4Like mat1, ?goog.vec.Mat4.Mat4Like resultMat) ⇒ !goog.vec.Mat4.Mat4Like Performs a per-component subtraction of the matrix mat0 and mat1, storing the result into resultMat. | |
toEulerZXZ(?goog.vec.Mat4.Mat4Like mat, ?goog.vec.Mat4.Mat4Like euler, boolean= 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. | |
toLookAt(?goog.vec.Mat4.Mat4Like mat, ?goog.vec.Vec3.Vec3Like eyePt, ?goog.vec.Vec3.Vec3Like fwdVec, ?goog.vec.Vec3.Vec3Like worldUpVec) ⇒ boolean Decomposes a matrix into the lookAt vectors eyePt, fwdVec and worldUpVec. The matrix represents the modelview matrix of a camera. It is the inverse of lookAt except for the output of the fwdVec instead of centerPt. The centerPt itself cannot be recovered from a modelview matrix. | |
translate(?goog.vec.Mat4.Mat4Like mat, number x, number y, number z) ⇒ !goog.vec.Mat4.Mat4Like Translates the given matrix by x,y,z. Equvialent to: goog.vec.Mat4.multMat( mat, goog.vec.Mat4.makeTranslate(goog.vec.Mat4.create(), x, y, z), mat); | |
transpose(?goog.vec.Mat4.Mat4Like mat, ?goog.vec.Mat4.Mat4Like resultMat) ⇒ !goog.vec.Mat4.Mat4Like Transposes the given matrix mat storing the result into resultMat. |