Matrix4 Class
Matrix4 class
This class extends the one from Three.js, API available here : http://threejs.org/docs/#Reference/Math/Matrix4
Item Index
Methods
- applyToVector3Array
- clone
- compose
- copy
- copyPosition
- decompose
- determinant
- extractBasis
- extractRotation
- flattenToArrayOffset
- getInverse
- identity
- lookAt
- makeBasis
- makeFrustum
- makeOrthographic
- makePerspective
- makeRotationAxis
- makeRotationFromEuler
- makeRotationFromQuaternion
- makeRotationX
- makeRotationY
- makeRotationZ
- makeScale
- makeTranslation
- multiply
- multiplyMatrices
- multiplyScalar
- multiplyToArray
- scale
- set
- setPosition
- transpose
Methods
applyToVector3Array
-
a
Multiplies (applies) this matrix to every vector3 in the array.
Parameters:
-
a
Array
Returns:
Array
clone
()
Returns:
Matrix4
compose
-
translation
-
quaternion
-
scale
Parameters:
-
translation
Vector3 -
quaternion
Quaternion -
scale
Vector3
Returns:
Matrix4
decompose
-
translation
-
quaternion
-
scale
Parameters:
-
translation
Vector3 -
quaternion
Quaternion -
scale
Vector3
Returns:
Array
determinant
()
Returns:
Float
extractBasis
-
xAxis
-
yAxis
-
zAxis
Returns:
Matrix4
flattenToArrayOffset
-
flat
-
offset
Parameters:
-
flat
Array -
offset
Integer
Returns:
Array
identity
()
Returns:
Matrix4
makeBasis
-
xAxis
-
yAxis
-
zAxis
Returns:
Matrix4
makeFrustum
-
left
-
right
-
bottom
-
top
-
near
-
far
Parameters:
-
left
Float -
right
Float -
bottom
Float -
top
Float -
near
Float -
far
Float
Returns:
Matrix4
makeOrthographic
-
left
-
right
-
top
-
bottom
-
near
-
far
Parameters:
-
left
Float -
right
Float -
top
Float -
bottom
Float -
near
Float -
far
Float
Returns:
Matrix4
makePerspective
-
fov
-
aspect
-
near
-
far
Parameters:
-
fov
Float -
aspect
Float -
near
Float -
far
Float
Returns:
Matrix4
makeRotationAxis
-
axis
-
theta
Sets this matrix as rotation transform around axis by angle radians. Based on [link:http://www.gamedev.net/reference/articles/article1199.asp.
Parameters:
-
axis
Vector3 -
theta
Float
Returns:
Matrix4
makeRotationFromEuler
-
euler
Sets the rotation submatrix of this matrix to the rotation specified by Euler angles, the rest of the matrix is identity. Default order is "XYZ".
Parameters:
-
euler
Euler
Returns:
Matrix4
makeRotationX
-
theta
Sets this matrix as rotation transform around x axis by theta radians.
Parameters:
-
theta
Float
Returns:
Matrix4
makeRotationY
-
theta
Sets this matrix as rotation transform around y axis by theta radians.
Parameters:
-
theta
Float
Returns:
Matrix4
makeRotationZ
-
theta
Sets this matrix as rotation transform around z axis by theta radians.
Parameters:
-
theta
Float
Returns:
Matrix4
makeScale
-
x
-
y
-
z
Parameters:
-
x
Float -
y
Float -
z
Float
Returns:
Matrix4
makeTranslation
-
x
-
y
-
z
Parameters:
-
x
Float -
y
Float -
z
Float
Returns:
Matrix4
multiplyScalar
-
s
Parameters:
-
s
Float
Returns:
Matrix4
set
-
n11
-
n12
-
n13
-
n14
-
n21
-
n22
-
n23
-
n24
-
n31
-
n32
-
n33
-
n34
-
n41
-
n42
-
n43
-
n44
Parameters:
-
n11
Float -
n12
Float -
n13
Float -
n14
Float -
n21
Float -
n22
Float -
n23
Float -
n24
Float -
n31
Float -
n32
Float -
n33
Float -
n34
Float -
n41
Float -
n42
Float -
n43
Float -
n44
Float
Returns:
Matrix4
transpose
()
Returns:
Matrix4