mat4f.js
No description.

File Location

/goog/vec/mat4f.js


Public Protected Private

Global Functions

goog.vec.mat4f.addMat(mat0mat1resultMat) !goog.vec.mat4f.Type
Performs a per-component addition of the matrix mat0 and mat1, storing the result into resultMat.
Arguments:
mat0 : goog.vec.mat4f.Type
The first addend.
mat1 : goog.vec.mat4f.Type
The second addend.
resultMat : goog.vec.mat4f.Type
The matrix to receive the results (may be either mat0 or mat1).
Returns: !goog.vec.mat4f.Type  return resultMat so that operations can be chained together.
code »
goog.vec.mat4f.create() !goog.vec.mat4f.Type
Creates a mat4f with all elements initialized to zero.
Returns: !goog.vec.mat4f.Type  The new mat4f.
code »
goog.vec.mat4f.determinant(mat) number
Computes the determinant of the matrix.
Arguments:
mat : goog.vec.mat4f.Type
The matrix to compute the matrix for.
Returns: number  The determinant of the matrix.
code »
goog.vec.mat4f.equals(mat0mat1) boolean
Returns true if the components of mat0 are equal to the components of mat1.
Arguments:
mat0 : goog.vec.mat4f.Type
The first matrix.
mat1 : goog.vec.mat4f.Type
The second matrix.
Returns: boolean  True if the the two matrices are equivalent.
code »
goog.vec.mat4f.getColumn(matcolumnvec) !goog.vec.vec4f.Type
Retrieves the specified column from the matrix into the given vector.
Arguments:
mat : goog.vec.mat4f.Type
The matrix supplying the values.
column : number
The column to get the values from.
vec : goog.vec.vec4f.Type
The vector of elements to receive the column.
Returns: !goog.vec.vec4f.Type  return vec so that operations can be chained together.
code »
goog.vec.mat4f.getColumns(matvec0vec1vec2vec3)
Retrieves the column values from the given matrix into the given vectors.
Arguments:
mat : goog.vec.mat4f.Type
The matrix supplying the columns.
vec0 : goog.vec.vec4f.Type
The vector to receive column 0.
vec1 : goog.vec.vec4f.Type
The vector to receive column 1.
vec2 : goog.vec.vec4f.Type
The vector to receive column 2.
vec3 : goog.vec.vec4f.Type
The vector to receive column 3.
code »
goog.vec.mat4f.getDiagonal(matvecopt_diagonal) goog.vec.vec4f.Type
Gets the diagonal values of the matrix into the given vector.
Arguments:
mat : goog.vec.mat4f.Type
The matrix containing the values.
vec : goog.vec.vec4f.Type
The vector to receive the values.
opt_diagonal : number=
Which diagonal to get. A value of 0 selects the main diagonal, a positive number selects a super diagonal and a negative number selects a sub diagonal.
Returns: goog.vec.vec4f.Type  return vec so that operations can be chained together.
code »
goog.vec.mat4f.getElement(matrowcolumn) number
Retrieves the element at the requested row and column.
Arguments:
mat : goog.vec.mat4f.Type
The matrix containing the value to retrieve.
row : number
The row index.
column : number
The column index.
Returns: number  The element value at the requested row, column indices.
code »
goog.vec.mat4f.getRow(matrowvec) !goog.vec.vec4f.Type
Retrieves the row values into the given vector.
Arguments:
mat : goog.vec.mat4f.Type
The matrix supplying the values.
row : number
The index of the row supplying the values.
vec : goog.vec.vec4f.Type
The vector to receive the row.
Returns: !goog.vec.vec4f.Type  return vec so that operations can be chained together.
code »
goog.vec.mat4f.getRows(matvec0vec1vec2vec3)
Retrieves the rows of the matrix into the supplied vectors.
Arguments:
mat : goog.vec.mat4f.Type
The matrix to supply the values.
vec0 : goog.vec.vec4f.Type
The vector to receive row 0.
vec1 : goog.vec.vec4f.Type
The vector to receive row 1.
vec2 : goog.vec.vec4f.Type
The vector to receive row 2.
vec3 : goog.vec.vec4f.Type
The vector to receive row 3.
code »
goog.vec.mat4f.getTranslation(mattranslation) !goog.vec.vec3f.Type
Retrieves the translation component of the transformation matrix.
Arguments:
mat : goog.vec.mat4f.Type
The transformation matrix.
translation : goog.vec.vec3f.Type
The vector for storing the result.
Returns: !goog.vec.vec3f.Type  return translation so that operations can be chained.
code »
goog.vec.mat4f.invert(matresultMat) boolean
Computes the inverse of mat storing the result into resultMat. If the inverse is defined, this function returns true, false otherwise.
Arguments:
mat : goog.vec.mat4f.Type
The matrix to invert.
resultMat : goog.vec.mat4f.Type
The matrix to receive the result (may be mat).
Returns: boolean  True if the inverse is defined. If false is returned, resultMat is not modified.
code »
goog.vec.mat4f.makeEulerZXZ(mattheta1theta2theta3) !goog.vec.mat4f.Type
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,
Arguments:
mat : goog.vec.mat4f.Type
The matrix.
theta1 : number
The angle of rotation around the Z axis in radians.
theta2 : number
The angle of rotation around the X axis in radians.
theta3 : number
The angle of rotation around the Z axis in radians.
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained.
code »
goog.vec.mat4f.makeFrustum(matleftrightbottomtopnearfar) !goog.vec.mat4f.Type
Makes the given 4x4 matrix a perspective projection matrix.
Arguments:
mat : goog.vec.mat4f.Type
The matrix.
left : number
The coordinate of the left clipping plane.
right : number
The coordinate of the right clipping plane.
bottom : number
The coordinate of the bottom clipping plane.
top : number
The coordinate of the top clipping plane.
near : number
The distance to the near clipping plane.
far : number
The distance to the far clipping plane.
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained.
code »
goog.vec.mat4f.makeIdentity(mat) !goog.vec.mat4f.Type
Makes the given 4x4 matrix the identity matrix.
Arguments:
mat : goog.vec.mat4f.Type
The matrix.
Returns: !goog.vec.mat4f.Type  return mat so operations can be chained.
code »
goog.vec.mat4f.makeLookAt(mateyePtcenterPtworldUpVec) goog.vec.mat4f.Type
Makes the given 4x4 matrix a modelview matrix of a camera so that the camera is 'looking at' the given center point. Note that unlike most other goog.vec functions where we inline everything, this function does not inline various goog.vec functions. This makes the code more readable, but somewhat less efficient.
Arguments:
mat : goog.vec.mat4f.Type
The matrix.
eyePt : goog.vec.vec3f.Type
The position of the eye point (camera origin).
centerPt : goog.vec.vec3f.Type
The point to aim the camera at.
worldUpVec : goog.vec.vec3f.Type
The vector that identifies the up direction for the camera.
Returns: goog.vec.mat4f.Type  return mat so that operations can be chained.
code »
goog.vec.mat4f.makeOrtho(matleftrightbottomtopnearfar) !goog.vec.mat4f.Type
Makes the given 4x4 matrix an orthographic projection matrix.
Arguments:
mat : goog.vec.mat4f.Type
The matrix.
left : number
The coordinate of the left clipping plane.
right : number
The coordinate of the right clipping plane.
bottom : number
The coordinate of the bottom clipping plane.
top : number
The coordinate of the top clipping plane.
near : number
The distance to the near clipping plane.
far : number
The distance to the far clipping plane.
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained.
code »
goog.vec.mat4f.makePerspective(matfovyaspectnearfar) goog.vec.mat4f.Type
Makse the given 4x4 matrix perspective projection matrix given a field of view and aspect ratio.
Arguments:
mat : goog.vec.mat4f.Type
The matrix.
fovy : number
The field of view along the y (vertical) axis in radians.
aspect : number
The x (width) to y (height) aspect ratio.
near : number
The distance to the near clipping plane.
far : number
The distance to the far clipping plane.
Returns: goog.vec.mat4f.Type  return mat so that operations can be chained.
code »
goog.vec.mat4f.makeRotate(matangleaxayaz) !goog.vec.mat4f.Type
Makes the given 4x4 matrix a rotation matrix with the given rotation angle about the axis defined by the vector (ax, ay, az).
Arguments:
mat : goog.vec.mat4f.Type
The matrix.
angle : number
The rotation angle in radians.
ax : number
The x component of the rotation axis.
ay : number
The y component of the rotation axis.
az : number
The z component of the rotation axis.
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained.
code »
goog.vec.mat4f.makeRotateX(matangle) !goog.vec.mat4f.Type
Makes the given 4x4 matrix a rotation matrix with the given rotation angle about the X axis.
Arguments:
mat : goog.vec.mat4f.Type
The matrix.
angle : number
The rotation angle in radians.
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained.
code »
goog.vec.mat4f.makeRotateY(matangle) !goog.vec.mat4f.Type
Makes the given 4x4 matrix a rotation matrix with the given rotation angle about the Y axis.
Arguments:
mat : goog.vec.mat4f.Type
The matrix.
angle : number
The rotation angle in radians.
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained.
code »
goog.vec.mat4f.makeRotateZ(matangle) !goog.vec.mat4f.Type
Makes the given 4x4 matrix a rotation matrix with the given rotation angle about the Z axis.
Arguments:
mat : goog.vec.mat4f.Type
The matrix.
angle : number
The rotation angle in radians.
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained.
code »
goog.vec.mat4f.makeScale(matxyz) !goog.vec.mat4f.Type
Makes the given 4x4 matrix as a scale matrix with x, y and z scale factors.
Arguments:
mat : goog.vec.mat4f.Type
The matrix.
x : number
The scale along the x axis.
y : number
The scale along the y axis.
z : number
The scale along the z axis.
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained.
code »
goog.vec.mat4f.makeTranslate(matxyz) !goog.vec.mat4f.Type
Makes the given 4x4 matrix a translation matrix with x, y and z translation factors.
Arguments:
mat : goog.vec.mat4f.Type
The matrix.
x : number
The translation along the x axis.
y : number
The translation along the y axis.
z : number
The translation along the z axis.
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained.
code »
goog.vec.mat4f.makeZero(mat) !goog.vec.mat4f.Type
Makes the given 4x4 matrix the zero matrix.
Arguments:
mat : goog.vec.mat4f.Type
The matrix.
Returns: !goog.vec.mat4f.Type  return mat so operations can be chained.
code »
goog.vec.mat4f.multMat(mat0mat1resultMat) !goog.vec.mat4f.Type
Multiplies the two matrices mat0 and mat1 using matrix multiplication, storing the result into resultMat.
Arguments:
mat0 : goog.vec.mat4f.Type
The first (left hand) matrix.
mat1 : goog.vec.mat4f.Type
The second (right hand) matrix.
resultMat : goog.vec.mat4f.Type
The matrix to receive the results (may be either mat0 or mat1).
Returns: !goog.vec.mat4f.Type  return resultMat so that operations can be chained together.
code »
goog.vec.mat4f.multScalar(matscalarresultMat) !goog.vec.mat4f.Type
Multiplies matrix mat with the given scalar, storing the result into resultMat.
Arguments:
mat : goog.vec.mat4f.Type
The matrix.
scalar : number
The scalar value to multiply to each element of mat.
resultMat : goog.vec.mat4f.Type
The matrix to receive the results (may be mat).
Returns: !goog.vec.mat4f.Type  return resultMat so that operations can be chained together.
code »
goog.vec.mat4f.multVec3(matvecresultVec) !goog.vec.vec3f.Type
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.
Arguments:
mat : goog.vec.mat4f.Type
The matrix supplying the transformation.
vec : goog.vec.vec3f.Type
The 3 element vector to transform.
resultVec : goog.vec.vec3f.Type
The 3 element vector to receive the results (may be vec).
Returns: !goog.vec.vec3f.Type  return resultVec so that operations can be chained together.
code »
goog.vec.mat4f.multVec3NoTranslate(matvecresultVec) !goog.vec.vec3f.Type
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.
Arguments:
mat : goog.vec.mat4f.Type
The matrix supplying the transformation.
vec : goog.vec.vec3f.Type
The 3 element vector to transform.
resultVec : goog.vec.vec3f.Type
The 3 element vector to receive the results (may be vec).
Returns: !goog.vec.vec3f.Type  return resultVec so that operations can be chained together.
code »
goog.vec.mat4f.multVec3Projective(matvecresultVec) !goog.vec.vec3f.Type
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.
Arguments:
mat : goog.vec.mat4f.Type
The matrix supplying the transformation.
vec : goog.vec.vec3f.Type
The 3 element vector to transform.
resultVec : goog.vec.vec3f.Type
The 3 element vector to receive the results (may be vec).
Returns: !goog.vec.vec3f.Type  return resultVec so that operations can be chained together.
code »
goog.vec.mat4f.multVec4(matvecresultVec) !goog.vec.vec4f.Type
Transforms the given vector with the given matrix storing the resulting, transformed vector into resultVec.
Arguments:
mat : goog.vec.mat4f.Type
The matrix supplying the transformation.
vec : goog.vec.vec4f.Type
The vector to transform.
resultVec : goog.vec.vec4f.Type
The vector to receive the results (may be vec).
Returns: !goog.vec.vec4f.Type  return resultVec so that operations can be chained together.
code »
goog.vec.mat4f.rotate(matanglexyz) !goog.vec.mat4f.Type
Rotate the given matrix by angle about the x,y,z axis. Equivalent to: goog.vec.mat4f.multMat( mat, goog.vec.mat4f.makeRotate(goog.vec.mat4f.create(), angle, x, y, z), mat);
Arguments:
mat : goog.vec.mat4f.Type
The matrix.
angle : number
The angle in radians.
x : number
The x component of the rotation axis.
y : number
The y component of the rotation axis.
z : number
The z component of the rotation axis.
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained.
code »
goog.vec.mat4f.rotateX(matangle) !goog.vec.mat4f.Type
Rotate the given matrix by angle about the x axis. Equivalent to: goog.vec.mat4f.multMat( mat, goog.vec.mat4f.makeRotateX(goog.vec.mat4f.create(), angle), mat);
Arguments:
mat : goog.vec.mat4f.Type
The matrix.
angle : number
The angle in radians.
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained.
code »
goog.vec.mat4f.rotateY(matangle) !goog.vec.mat4f.Type
Rotate the given matrix by angle about the y axis. Equivalent to: goog.vec.mat4f.multMat( mat, goog.vec.mat4f.makeRotateY(goog.vec.mat4f.create(), angle), mat);
Arguments:
mat : goog.vec.mat4f.Type
The matrix.
angle : number
The angle in radians.
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained.
code »
goog.vec.mat4f.rotateZ(matangle) !goog.vec.mat4f.Type
Rotate the given matrix by angle about the z axis. Equivalent to: goog.vec.mat4f.multMat( mat, goog.vec.mat4f.makeRotateZ(goog.vec.mat4f.create(), angle), mat);
Arguments:
mat : goog.vec.mat4f.Type
The matrix.
angle : number
The angle in radians.
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained.
code »
goog.vec.mat4f.scale(matxyz) !goog.vec.mat4f.Type
Scales the given matrix by x,y,z. Equivalent to: goog.vec.mat4f.multMat( mat, goog.vec.mat4f.makeScale(goog.vec.mat4f.create(), x, y, z), mat);
Arguments:
mat : goog.vec.mat4f.Type
The matrix.
x : number
The x scale factor.
y : number
The y scale factor.
z : number
The z scale factor.
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained.
code »
goog.vec.mat4f.setColumn(matcolumnvec) !goog.vec.mat4f.Type
Sets the specified column with the value from the supplied vector.
Arguments:
mat : goog.vec.mat4f.Type
The matrix to receive the values.
column : number
The column index to set the values on.
vec : goog.vec.vec4f.Type
The vector of elements for the column.
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained together.
code »
goog.vec.mat4f.setColumnValues(matcolumnv0v1v2v3) !goog.vec.mat4f.Type
Sets the specified column with the supplied values.
Arguments:
mat : goog.vec.mat4f.Type
The matrix to recieve the values.
column : number
The column index to set the values on.
v0 : number
The value for row 0.
v1 : number
The value for row 1.
v2 : number
The value for row 2.
v3 : number
The value for row 3.
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained together.
code »
goog.vec.mat4f.setColumns(matvec0vec1vec2vec3) !goog.vec.mat4f.Type
Sets the columns of the matrix from the given vectors.
Arguments:
mat : goog.vec.mat4f.Type
The matrix to receive the values.
vec0 : goog.vec.vec4f.Type
The values for column 0.
vec1 : goog.vec.vec4f.Type
The values for column 1.
vec2 : goog.vec.vec4f.Type
The values for column 2.
vec3 : goog.vec.vec4f.Type
The values for column 3.
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained together.
code »
goog.vec.mat4f.setDiagonal(matvec) !goog.vec.mat4f.Type
Sets the diagonal values of the matrix from the given vector.
Arguments:
mat : goog.vec.mat4f.Type
The matrix to receive the values.
vec : goog.vec.vec4f.Type
The vector containing the values.
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained together.
code »
goog.vec.mat4f.setDiagonalValues(matv00v11v22v33) !goog.vec.mat4f.Type
Sets the diagonal values of the matrix from the given values.
Arguments:
mat : goog.vec.mat4f.Type
The matrix to receive the values.
v00 : number
The values for (0, 0).
v11 : number
The values for (1, 1).
v22 : number
The values for (2, 2).
v33 : number
The values for (3, 3).
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained together.
code »
goog.vec.mat4f.setElement(matrowcolumnvalue) !goog.vec.mat4f.Type
Sets the element at the requested row and column.
Arguments:
mat : goog.vec.mat4f.Type
The matrix containing the value to retrieve.
row : number
The row index.
column : number
The column index.
value : number
The value to set at the requested row, column.
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained together.
code »
goog.vec.mat4f.setFromArray(matsrc) !goog.vec.mat4f.Type
Initializes mat4f mat from Array src.
Arguments:
mat : goog.vec.mat4f.Type
The destination matrix.
src : Array.<number>
The source matrix.
Returns: !goog.vec.mat4f.Type  Return mat so that operations can be chained together.
code »
goog.vec.mat4f.setFromMat4d(matsrc) !goog.vec.mat4f.Type
Initializes mat4f mat from mat4d src (typed as a Float64Array to avoid circular goog.requires).
Arguments:
mat : goog.vec.mat4f.Type
The destination matrix.
src : Float64Array
The source matrix.
Returns: !goog.vec.mat4f.Type  Return mat so that operations can be chained together.
code »
goog.vec.mat4f.setFromMat4f(matsrc) !goog.vec.mat4f.Type
Initializes mat4f mat from mat4f src.
Arguments:
mat : goog.vec.mat4f.Type
The destination matrix.
src : goog.vec.mat4f.Type
The source matrix.
Returns: !goog.vec.mat4f.Type  Return mat so that operations can be chained together.
code »
goog.vec.mat4f.setFromValues(matv00v10v20v30v01v11v21v31v02v12v22v32v03v13v23v33) !goog.vec.mat4f.Type
Initializes the matrix from the set of values. Note the values supplied are in column major order.
Arguments:
mat : goog.vec.mat4f.Type
The matrix to receive the values.
v00 : number
The values at (0, 0).
v10 : number
The values at (1, 0).
v20 : number
The values at (2, 0).
v30 : number
The values at (3, 0).
v01 : number
The values at (0, 1).
v11 : number
The values at (1, 1).
v21 : number
The values at (2, 1).
v31 : number
The values at (3, 1).
v02 : number
The values at (0, 2).
v12 : number
The values at (1, 2).
v22 : number
The values at (2, 2).
v32 : number
The values at (3, 2).
v03 : number
The values at (0, 3).
v13 : number
The values at (1, 3).
v23 : number
The values at (2, 3).
v33 : number
The values at (3, 3).
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained together.
code »
goog.vec.mat4f.setRow(matrowvec) !goog.vec.mat4f.Type
Sets the row values from the supplied vector.
Arguments:
mat : goog.vec.mat4f.Type
The matrix to receive the row values.
row : number
The index of the row.
vec : goog.vec.vec4f.Type
The vector containing the values.
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained together.
code »
goog.vec.mat4f.setRowValues(matrowv0v1v2v3) !goog.vec.mat4f.Type
Sets the row values from the supplied values.
Arguments:
mat : goog.vec.mat4f.Type
The matrix to receive the values.
row : number
The index of the row to receive the values.
v0 : number
The value for column 0.
v1 : number
The value for column 1.
v2 : number
The value for column 2.
v3 : number
The value for column 3.
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained together.
code »
goog.vec.mat4f.setRows(matvec0vec1vec2vec3) !goog.vec.mat4f.Type
Sets the rows of the matrix from the supplied vectors.
Arguments:
mat : goog.vec.mat4f.Type
The matrix to receive the values.
vec0 : goog.vec.vec4f.Type
The values for row 0.
vec1 : goog.vec.vec4f.Type
The values for row 1.
vec2 : goog.vec.vec4f.Type
The values for row 2.
vec3 : goog.vec.vec4f.Type
The values for row 3.
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained together.
code »
goog.vec.mat4f.subMat(mat0mat1resultMat) !goog.vec.mat4f.Type
Performs a per-component subtraction of the matrix mat0 and mat1, storing the result into resultMat.
Arguments:
mat0 : goog.vec.mat4f.Type
The minuend.
mat1 : goog.vec.mat4f.Type
The subtrahend.
resultMat : goog.vec.mat4f.Type
The matrix to receive the results (may be either mat0 or mat1).
Returns: !goog.vec.mat4f.Type  return resultMat so that operations can be chained together.
code »
goog.vec.mat4f.toEulerZXZ(mateuleropt_theta2IsNegative) !goog.vec.vec4f.Type
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.
Arguments:
mat : goog.vec.mat4f.Type
The matrix.
euler : goog.vec.vec3f.Type
The ZXZ Euler angles in radians as [theta1, theta2, theta3].
opt_theta2IsNegative : boolean=
Whether theta2 is in [-pi, 0] instead of the default [0, pi].
Returns: !goog.vec.vec4f.Type  return euler so that operations can be chained together.
code »
goog.vec.mat4f.toLookAt(mateyePtfwdVecworldUpVec) 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. Note that unlike most other goog.vec functions where we inline everything, this function does not inline various goog.vec functions. This makes the code more readable, but somewhat less efficient.
Arguments:
mat : goog.vec.mat4f.Type
The matrix.
eyePt : goog.vec.vec3f.Type
The position of the eye point (camera origin).
fwdVec : goog.vec.vec3f.Type
The vector describing where the camera points to.
worldUpVec : goog.vec.vec3f.Type
The vector that identifies the up direction for the camera.
Returns: boolean  True if the method succeeds, false otherwise. The method can only fail if the inverse of viewMatrix is not defined.
code »
goog.vec.mat4f.translate(matxyz) !goog.vec.mat4f.Type
Translates the given matrix by x,y,z. Equvialent to: goog.vec.mat4f.multMat( mat, goog.vec.mat4f.makeTranslate(goog.vec.mat4f.create(), x, y, z), mat);
Arguments:
mat : goog.vec.mat4f.Type
The matrix.
x : number
The translation along the x axis.
y : number
The translation along the y axis.
z : number
The translation along the z axis.
Returns: !goog.vec.mat4f.Type  return mat so that operations can be chained.
code »
goog.vec.mat4f.transpose(matresultMat) !goog.vec.mat4f.Type
Transposes the given matrix mat storing the result into resultMat.
Arguments:
mat : goog.vec.mat4f.Type
The matrix to transpose.
resultMat : goog.vec.mat4f.Type
The matrix to receive the results (may be mat).
Returns: !goog.vec.mat4f.Type  return resultMat so that operations can be chained together.
code »

Directory vec

File Reference