|
@@ -51,53 +51,53 @@
|
|
|
|
|
|
<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]</h3>
|
|
|
+ <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>
|
|
|
<div>
|
|
|
Sets all fields of this matrix to the supplied row-major values n11..n44.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.identity() [page:Matrix4]</h3>
|
|
|
+ <h3>.identity() [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
Resets this matrix to identity.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.copy( [page:Matrix4 m] ) [page:Matrix4]</h3>
|
|
|
+ <h3>.copy( [page:Matrix4 m] ) [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
Copies a matrix *m* into this matrix.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.copyPosition( [page:Matrix4 m] ) [page:Matrix4]</h3>
|
|
|
+ <h3>.copyPosition( [page:Matrix4 m] ) [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
Copies the translation component of the supplied matrix *m* into this matrix translation component.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.extractRotation( [page:Matrix4 m] ) [page:Matrix4]</h3>
|
|
|
+ <h3>.extractRotation( [page:Matrix4 m] ) [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
Extracts the rotation of the supplied matrix *m* into this matrix rotation component.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.lookAt( [page:Vector3 eye], [page:Vector3 center], [page:Vector3 up], ) [page:Matrix4]</h3>
|
|
|
+ <h3>.lookAt( [page:Vector3 eye], [page:Vector3 center], [page:Vector3 up], ) [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
Constructs a rotation matrix, looking from *eye* towards *center* with defined *up* vector.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.multiply( [page:Matrix4 m] ) [page:Matrix4]</h3>
|
|
|
+ <h3>.multiply( [page:Matrix4 m] ) [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
Multiplies this matrix by *m*.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.multiplyMatrices( [page:Matrix4 a], [page:Matrix4 b] ) [page:Matrix4]</h3>
|
|
|
+ <h3>.multiplyMatrices( [page:Matrix4 a], [page:Matrix4 b] ) [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
Sets this matrix to *a x b*.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.multiplyToArray( [page:Matrix4 a], [page:Matrix4 b], [page:Array r] ) [page:Matrix4]</h3>
|
|
|
+ <h3>.multiplyToArray( [page:Matrix4 a], [page:Matrix4 b], [page:Array r] ) [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
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.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.multiplyScalar( [page:Float s] ) [page:Matrix4]</h3>
|
|
|
+ <h3>.multiplyScalar( [page:Float s] ) [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
Multiplies this matrix by *s*.
|
|
|
</div>
|
|
@@ -108,7 +108,7 @@
|
|
|
Based on [link:http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm]
|
|
|
</div>
|
|
|
|
|
|
- <h3>.transpose() [page:Matrix4]</h3>
|
|
|
+ <h3>.transpose() [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
Transposes this matrix.
|
|
|
</div>
|
|
@@ -123,18 +123,18 @@
|
|
|
Flattens this matrix into supplied *flat* array starting from *offset* position in the array.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.setPosition( [page:Vector3 v] ) [page:Matrix4]</h3>
|
|
|
+ <h3>.setPosition( [page:Vector3 v] ) [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
Sets the position component for this matrix from vector *v*.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.getInverse( [page:Matrix4 m] ) [page:Matrix4]</h3>
|
|
|
+ <h3>.getInverse( [page:Matrix4 m] ) [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
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].
|
|
|
</div>
|
|
|
|
|
|
- <h3>.makeRotationFromEuler( [page:Vector3 v], [page:String order] ) [page:Matrix4]</h3>
|
|
|
+ <h3>.makeRotationFromEuler( [page:Vector3 v], [page:String order] ) [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
v — Rotation vector.
|
|
|
order — The order of rotations. Eg. "XYZ".
|
|
@@ -144,17 +144,17 @@
|
|
|
Default order is *"XYZ"*.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.makeRotationFromQuaternion( [page:Quaternion q] ) [page:Matrix4]</h3>
|
|
|
+ <h3>.makeRotationFromQuaternion( [page:Quaternion q] ) [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
Sets the rotation submatrix of this matrix to the rotation specified by *q*. The rest of the matrix is identity.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.scale( [page:Vector3 v] ) [page:Matrix4]</h3>
|
|
|
+ <h3>.scale( [page:Vector3 v] ) [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
Multiplies the columns of this matrix by vector *v*.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.compose( [page:Vector3 translation], [page:Quaternion quaternion], [page:Vector3 scale] ) [page:Matrix4]</h3>
|
|
|
+ <h3>.compose( [page:Vector3 translation], [page:Quaternion quaternion], [page:Vector3 scale] ) [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
Sets this matrix to the transformation composed of *translation*, *quaternion* and *scale*.
|
|
|
</div>
|
|
@@ -165,12 +165,12 @@
|
|
|
If parameters are not passed, new instances will be created.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.makeTranslation( [page:Float x], [page:Float y], [page:Float z] ) [page:Matrix4]</h3>
|
|
|
+ <h3>.makeTranslation( [page:Float x], [page:Float y], [page:Float z] ) [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
Sets this matrix as translation transform.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.makeRotationX( [page:Float theta] ) [page:Matrix4]</h3>
|
|
|
+ <h3>.makeRotationX( [page:Float theta] ) [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
theta — Rotation angle in radians.
|
|
|
</div>
|
|
@@ -178,7 +178,7 @@
|
|
|
Sets this matrix as rotation transform around x axis by *theta* radians.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.makeRotationY( [page:Float theta] ) [page:Matrix4]</h3>
|
|
|
+ <h3>.makeRotationY( [page:Float theta] ) [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
theta — Rotation angle in radians.
|
|
|
</div>
|
|
@@ -186,7 +186,7 @@
|
|
|
Sets this matrix as rotation transform around y axis by *theta* radians.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.makeRotationZ( [page:Float theta] ) [page:Matrix4]</h3>
|
|
|
+ <h3>.makeRotationZ( [page:Float theta] ) [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
theta — Rotation angle in radians.
|
|
|
</div>
|
|
@@ -194,7 +194,7 @@
|
|
|
Sets this matrix as rotation transform around z axis by *theta* radians.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.makeRotationAxis( [page:Vector3 axis], [page:Float theta] ) [page:Matrix4]</h3>
|
|
|
+ <h3>.makeRotationAxis( [page:Vector3 axis], [page:Float theta] ) [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
axis — Rotation axis, should be normalized.
|
|
|
theta — Rotation angle in radians.
|
|
@@ -204,22 +204,22 @@
|
|
|
Based on [link:http://www.gamedev.net/reference/articles/article1199.asp].
|
|
|
</div>
|
|
|
|
|
|
- <h3>.makeScale( [page:Float x], [page:Float y], [page:Float z] ) [page:Matrix4]</h3>
|
|
|
+ <h3>.makeScale( [page:Float x], [page:Float y], [page:Float z] ) [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
Sets this matrix as scale transform.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.makeFrustum( [page:Float left], [page:Float right], [page:Float bottom], [page:Float top], [page:Float near], [page:Float far] ) [page:Matrix4]</h3>
|
|
|
+ <h3>.makeFrustum( [page:Float left], [page:Float right], [page:Float bottom], [page:Float top], [page:Float near], [page:Float far] ) [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
Creates a [page:Frustum frustum] matrix.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.makePerspective( [page:Float fov], [page:Float aspect], [page:Float near], [page:Float far] ) [page:Matrix4]</h3>
|
|
|
+ <h3>.makePerspective( [page:Float fov], [page:Float aspect], [page:Float near], [page:Float far] ) [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
Creates a perspective projection matrix.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.makeOrthographic( [page:Float left], [page:Float right], [page:Float bottom], [page:Float top], [page:Float near], [page:Float far] ) [page:Matrix4]</h3>
|
|
|
+ <h3>.makeOrthographic( [page:Float left], [page:Float right], [page:Float bottom], [page:Float top], [page:Float near], [page:Float far] ) [page:Matrix4 this]</h3>
|
|
|
<div>
|
|
|
Creates an orthographic projection matrix.
|
|
|
</div>
|
|
@@ -229,17 +229,17 @@
|
|
|
Clones this matrix.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.multiplyVector3Array([page:todo a]) [page:todo]</h3>
|
|
|
+ <h3>.multiplyVector3Array([page:Array a]) [page:Array]</h3>
|
|
|
<div>
|
|
|
- a -- todo
|
|
|
+ array -- An array in the form [vector1x, vector1y, vector1z, vector2x, vector2y, vector2z, ...]
|
|
|
</div>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Multiply (apply) this matrix against every vector3 in the array.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.getMaxScaleOnAxis() [page:todo]</h3>
|
|
|
+ <h3>.getMaxScaleOnAxis() [page:Float]</h3>
|
|
|
<div>
|
|
|
- todo
|
|
|
+ Gets the max scale value of the 3 axes.
|
|
|
</div>
|
|
|
|
|
|
<h2>Source</h2>
|