|
@@ -46,126 +46,125 @@
|
|
|
|
|
|
<h2>Properties</h2>
|
|
<h2>Properties</h2>
|
|
|
|
|
|
- <h3>.[page:Float32Array elements]</h3>
|
|
|
|
|
|
+ <h3>[property:Float32Array elements]</h3>
|
|
<div>A column-major list of matrix values.</div>
|
|
<div>A column-major list of matrix values.</div>
|
|
|
|
|
|
<h2>Methods</h2>
|
|
<h2>Methods</h2>
|
|
|
|
|
|
- <h3>.set( [page:Float n11], [page:Float n12], [page:Float n13], [page:Float n14], [page:Float n21], [page:Float n22], [page:Float n23], [page:Float n24], [page:Float n31], [page:Float n32], [page:Float n33], [page:Float n34], [page:Float n41], [page:Float n42], [page:Float n43], [page:Float n44] ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 set]( [page:Float n11], [page:Float n12], [page:Float n13], [page:Float n14], [page:Float n21], [page:Float n22], [page:Float n23], [page:Float n24], [page:Float n31], [page:Float n32], [page:Float n33], [page:Float n34], [page:Float n41], [page:Float n42], [page:Float n43], [page:Float n44] ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
Sets all fields of this matrix to the supplied row-major values n11..n44.
|
|
Sets all fields of this matrix to the supplied row-major values n11..n44.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.identity() [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 identity]() [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
Resets this matrix to identity.
|
|
Resets this matrix to identity.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.copy( [page:Matrix4 m] ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 copy]( [page:Matrix4 m] ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
Copies a matrix *m* into this matrix.
|
|
Copies a matrix *m* into this matrix.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.copyPosition( [page:Matrix4 m] ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 copyPosition]( [page:Matrix4 m] ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
Copies the translation component of the supplied matrix *m* into this matrix translation component.
|
|
Copies the translation component of the supplied matrix *m* into this matrix translation component.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.extractRotation( [page:Matrix4 m] ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 extractRotation]( [page:Matrix4 m] ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
Extracts the rotation of the supplied matrix *m* into this matrix rotation component.
|
|
Extracts the rotation of the supplied matrix *m* into this matrix rotation component.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.lookAt( [page:Vector3 eye], [page:Vector3 center], [page:Vector3 up], ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 lookAt]( [page:Vector3 eye], [page:Vector3 center], [page:Vector3 up], ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
Constructs a rotation matrix, looking from *eye* towards *center* with defined *up* vector.
|
|
Constructs a rotation matrix, looking from *eye* towards *center* with defined *up* vector.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.multiply( [page:Matrix4 m] ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 multiply]( [page:Matrix4 m] ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
Multiplies this matrix by *m*.
|
|
Multiplies this matrix by *m*.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.multiplyMatrices( [page:Matrix4 a], [page:Matrix4 b] ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 multiplyMatrices]( [page:Matrix4 a], [page:Matrix4 b] ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
Sets this matrix to *a x b*.
|
|
Sets this matrix to *a x b*.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.multiplyToArray( [page:Matrix4 a], [page:Matrix4 b], [page:Array r] ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 multiplyToArray]( [page:Matrix4 a], [page:Matrix4 b], [page:Array r] ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
Sets this matrix to *a x b* and stores the result into the flat array *r*.<br />
|
|
Sets this matrix to *a x b* and stores the result into the flat array *r*.<br />
|
|
*r* can be either a regular Array or a TypedArray.
|
|
*r* can be either a regular Array or a TypedArray.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.multiplyScalar( [page:Float s] ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 multiplyScalar]( [page:Float s] ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
Multiplies this matrix by *s*.
|
|
Multiplies this matrix by *s*.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.determinant() [page:Float]</h3>
|
|
|
|
|
|
+ <h3>[method:Float determinant]()</h3>
|
|
<div>
|
|
<div>
|
|
Computes determinant of this matrix.<br />
|
|
Computes determinant of this matrix.<br />
|
|
Based on [link:http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm]
|
|
Based on [link:http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm]
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.transpose() [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 transpose]() [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
Transposes this matrix.
|
|
Transposes this matrix.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.flattenToArrayOffset( [page:Array flat], [page:Integer offset] ) [page:Array]</h3>
|
|
|
|
|
|
+ <h3>[method:Array flattenToArrayOffset]( [page:Array flat], [page:Integer offset] )</h3>
|
|
<div>
|
|
<div>
|
|
Flattens this matrix into supplied *flat* array starting from *offset* position in the array.
|
|
Flattens this matrix into supplied *flat* array starting from *offset* position in the array.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.setPosition( [page:Vector3 v] ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 setPosition]( [page:Vector3 v] ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
Sets the position component for this matrix from vector *v*.
|
|
Sets the position component for this matrix from vector *v*.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.getInverse( [page:Matrix4 m] ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 getInverse]( [page:Matrix4 m] ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
Sets this matrix to the inverse of matrix *m*.<br />
|
|
Sets this matrix to the inverse of matrix *m*.<br />
|
|
Based on [link:http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm].
|
|
Based on [link:http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm].
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.makeRotationFromEuler( [page:Vector3 v], [page:String order] ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 makeRotationFromEuler]( [page:Euler euler] ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
- v — Rotation vector.
|
|
|
|
- order — The order of rotations. Eg. "XYZ".
|
|
|
|
|
|
+ euler — Rotation vector followed by order of rotations. Eg. "XYZ".
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
Sets the rotation submatrix of this matrix to the rotation specified by Euler angles, the rest of the matrix is identity.<br />
|
|
Sets the rotation submatrix of this matrix to the rotation specified by Euler angles, the rest of the matrix is identity.<br />
|
|
Default order is *"XYZ"*.
|
|
Default order is *"XYZ"*.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.makeRotationFromQuaternion( [page:Quaternion q] ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 makeRotationFromQuaternion]( [page:Quaternion q] ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
Sets the rotation submatrix of this matrix to the rotation specified by *q*. The rest of the matrix is identity.
|
|
Sets the rotation submatrix of this matrix to the rotation specified by *q*. The rest of the matrix is identity.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.scale( [page:Vector3 v] ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 scale]( [page:Vector3 v] ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
Multiplies the columns of this matrix by vector *v*.
|
|
Multiplies the columns of this matrix by vector *v*.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.compose( [page:Vector3 translation], [page:Quaternion quaternion], [page:Vector3 scale] ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 compose]( [page:Vector3 translation], [page:Quaternion quaternion], [page:Vector3 scale] ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
Sets this matrix to the transformation composed of *translation*, *quaternion* and *scale*.
|
|
Sets this matrix to the transformation composed of *translation*, *quaternion* and *scale*.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.decompose( [page:Vector3 translation], [page:Quaternion quaternion], [page:Vector3 scale] ) [page:Array]</h3>
|
|
|
|
|
|
+ <h3>[method:Array decompose]( [page:Vector3 translation], [page:Quaternion quaternion], [page:Vector3 scale] )</h3>
|
|
<div>
|
|
<div>
|
|
Decomposes this matrix into the *translation*, *quaternion* and *scale* components.<br />
|
|
Decomposes this matrix into the *translation*, *quaternion* and *scale* components.<br />
|
|
If parameters are not passed, new instances will be created.
|
|
If parameters are not passed, new instances will be created.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.makeTranslation( [page:Float x], [page:Float y], [page:Float z] ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 makeTranslation]( [page:Float x], [page:Float y], [page:Float z] ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
Sets this matrix as translation transform.
|
|
Sets this matrix as translation transform.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.makeRotationX( [page:Float theta] ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 makeRotationX]( [page:Float theta] ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
theta — Rotation angle in radians.
|
|
theta — Rotation angle in radians.
|
|
</div>
|
|
</div>
|
|
@@ -173,7 +172,7 @@
|
|
Sets this matrix as rotation transform around x axis by *theta* radians.
|
|
Sets this matrix as rotation transform around x axis by *theta* radians.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.makeRotationY( [page:Float theta] ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 makeRotationY]( [page:Float theta] ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
theta — Rotation angle in radians.
|
|
theta — Rotation angle in radians.
|
|
</div>
|
|
</div>
|
|
@@ -181,7 +180,7 @@
|
|
Sets this matrix as rotation transform around y axis by *theta* radians.
|
|
Sets this matrix as rotation transform around y axis by *theta* radians.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.makeRotationZ( [page:Float theta] ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 makeRotationZ]( [page:Float theta] ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
theta — Rotation angle in radians.
|
|
theta — Rotation angle in radians.
|
|
</div>
|
|
</div>
|
|
@@ -189,7 +188,7 @@
|
|
Sets this matrix as rotation transform around z axis by *theta* radians.
|
|
Sets this matrix as rotation transform around z axis by *theta* radians.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.makeRotationAxis( [page:Vector3 axis], [page:Float theta] ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 makeRotationAxis]( [page:Vector3 axis], [page:Float theta] ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
axis — Rotation axis, should be normalized.
|
|
axis — Rotation axis, should be normalized.
|
|
theta — Rotation angle in radians.
|
|
theta — Rotation angle in radians.
|
|
@@ -199,32 +198,32 @@
|
|
Based on [link:http://www.gamedev.net/reference/articles/article1199.asp].
|
|
Based on [link:http://www.gamedev.net/reference/articles/article1199.asp].
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.makeScale( [page:Float x], [page:Float y], [page:Float z] ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 makeScale]( [page:Float x], [page:Float y], [page:Float z] ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
Sets this matrix as scale transform.
|
|
Sets this matrix as scale transform.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.makeFrustum( [page:Float left], [page:Float right], [page:Float bottom], [page:Float top], [page:Float near], [page:Float far] ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 makeFrustum]( [page:Float left], [page:Float right], [page:Float bottom], [page:Float top], [page:Float near], [page:Float far] ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
Creates a [page:Frustum frustum] matrix.
|
|
Creates a [page:Frustum frustum] matrix.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.makePerspective( [page:Float fov], [page:Float aspect], [page:Float near], [page:Float far] ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 makePerspective]( [page:Float fov], [page:Float aspect], [page:Float near], [page:Float far] ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
Creates a perspective projection matrix.
|
|
Creates a perspective projection matrix.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.makeOrthographic( [page:Float left], [page:Float right], [page:Float bottom], [page:Float top], [page:Float near], [page:Float far] ) [page:Matrix4 this]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 makeOrthographic]( [page:Float left], [page:Float right], [page:Float bottom], [page:Float top], [page:Float near], [page:Float far] ) [page:Matrix4 this]</h3>
|
|
<div>
|
|
<div>
|
|
Creates an orthographic projection matrix.
|
|
Creates an orthographic projection matrix.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.clone() [page:Matrix4]</h3>
|
|
|
|
|
|
+ <h3>[method:Matrix4 clone]()</h3>
|
|
<div>
|
|
<div>
|
|
Clones this matrix.
|
|
Clones this matrix.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.applyToVector3Array([page:Array a]) [page:Array]</h3>
|
|
|
|
|
|
+ <h3>[method:Array applyToVector3Array]([page:Array a])</h3>
|
|
<div>
|
|
<div>
|
|
array -- An array in the form [vector1x, vector1y, vector1z, vector2x, vector2y, vector2z, ...]
|
|
array -- An array in the form [vector1x, vector1y, vector1z, vector2x, vector2y, vector2z, ...]
|
|
</div>
|
|
</div>
|
|
@@ -232,7 +231,7 @@
|
|
Multiply (apply) this matrix to every vector3 in the array.
|
|
Multiply (apply) this matrix to every vector3 in the array.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>.getMaxScaleOnAxis() [page:Float]</h3>
|
|
|
|
|
|
+ <h3>[method:Float getMaxScaleOnAxis]()</h3>
|
|
<div>
|
|
<div>
|
|
Gets the max scale value of the 3 axes.
|
|
Gets the max scale value of the 3 axes.
|
|
</div>
|
|
</div>
|