|
@@ -98,7 +98,7 @@ m.elements = [ 11, 21, 31, 41,
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<h3>[method:Matrix4 clone]()</h3>
|
|
<h3>[method:Matrix4 clone]()</h3>
|
|
- <div>Creates a new Matrix4 and with identical elements to this one.</div>
|
|
|
|
|
|
+ <div>Creates a new Matrix4 with identical elements to this one.</div>
|
|
|
|
|
|
<h3>[method:Matrix4 compose]( [page:Vector3 position], [page:Quaternion quaternion], [page:Vector3 scale] )</h3>
|
|
<h3>[method:Matrix4 compose]( [page:Vector3 position], [page:Quaternion quaternion], [page:Vector3 scale] )</h3>
|
|
<div>
|
|
<div>
|
|
@@ -110,7 +110,7 @@ m.elements = [ 11, 21, 31, 41,
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<h3>[method:Matrix4 copy]( [page:Matrix4 m] )</h3>
|
|
<h3>[method:Matrix4 copy]( [page:Matrix4 m] )</h3>
|
|
- <div>Copies the elements of matrix [page:Matrix4 m] into this matrix.</div>
|
|
|
|
|
|
+ <div>Copies the [page:.elements elements] of matrix [page:Matrix4 m] into this matrix.</div>
|
|
|
|
|
|
<h3>[method:Matrix4 copyPosition]( [page:Matrix4 m] )</h3>
|
|
<h3>[method:Matrix4 copyPosition]( [page:Matrix4 m] )</h3>
|
|
<div>
|
|
<div>
|
|
@@ -124,7 +124,6 @@ m.elements = [ 11, 21, 31, 41,
|
|
[page:Vector3 scale] components.
|
|
[page:Vector3 scale] components.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Float determinant]()</h3>
|
|
|
|
<h3>[method:Float determinant]()</h3>
|
|
<h3>[method:Float determinant]()</h3>
|
|
<div>
|
|
<div>
|
|
Computes and returns the
|
|
Computes and returns the
|
|
@@ -134,12 +133,24 @@ m.elements = [ 11, 21, 31, 41,
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<h3>[method:Boolean equals]( [page:Matrix4 m] )</h3>
|
|
<h3>[method:Boolean equals]( [page:Matrix4 m] )</h3>
|
|
- <div>Return true if this and [page:Matrix4 m] are equal.</div>
|
|
|
|
|
|
+ <div>Return true if this matrix and [page:Matrix4 m] are equal.</div>
|
|
|
|
|
|
<h3>[method:Matrix4 extractBasis]( [page:Vector3 xAxis], [page:Vector3 yAxis], [page:Vector3 zAxis] )</h3>
|
|
<h3>[method:Matrix4 extractBasis]( [page:Vector3 xAxis], [page:Vector3 yAxis], [page:Vector3 zAxis] )</h3>
|
|
<div>
|
|
<div>
|
|
Extracts the [link:https://en.wikipedia.org/wiki/Basis_(linear_algebra) basis] of this
|
|
Extracts the [link:https://en.wikipedia.org/wiki/Basis_(linear_algebra) basis] of this
|
|
- matrix into the three axis vectors provided.
|
|
|
|
|
|
+ matrix into the three axis vectors provided. If this matrix is:
|
|
|
|
+ <code>
|
|
|
|
+a, b, c, d,
|
|
|
|
+e, f, g, h,
|
|
|
|
+i, j, k, l,
|
|
|
|
+m, n, o, p
|
|
|
|
+ </code>
|
|
|
|
+ then the [page:Vector3 xAxis], [page:Vector3 yAxis], [page:Vector3 zAxis] will be set to:
|
|
|
|
+ <code>
|
|
|
|
+xAxis = (a, e, i)
|
|
|
|
+yAxis = (d, f, j)
|
|
|
|
+zAxis = (c, g, k)
|
|
|
|
+ </code>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<h3>[method:Matrix4 extractRotation]( [page:Matrix4 m] )</h3>
|
|
<h3>[method:Matrix4 extractRotation]( [page:Matrix4 m] )</h3>
|
|
@@ -194,8 +205,14 @@ m.elements = [ 11, 21, 31, 41,
|
|
|
|
|
|
<h3>[method:Matrix4 makeBasis]( [page:Vector3 xAxis], [page:Vector3 yAxis], [page:Vector3 zAxis] )</h3>
|
|
<h3>[method:Matrix4 makeBasis]( [page:Vector3 xAxis], [page:Vector3 yAxis], [page:Vector3 zAxis] )</h3>
|
|
<div>
|
|
<div>
|
|
- Creates the [link:https://en.wikipedia.org/wiki/Basis_(linear_algebra) basis] matrix consisting
|
|
|
|
- of the three provided basis vectors.
|
|
|
|
|
|
+ Set this to the [link:https://en.wikipedia.org/wiki/Basis_(linear_algebra) basis] matrix consisting
|
|
|
|
+ of the three provided basis vectors:
|
|
|
|
+ <code>
|
|
|
|
+xAxis.x, yAxis.x, zAxis.x, 0,
|
|
|
|
+xAxis.y, yAxis.y, zAxis.y, 0,
|
|
|
|
+xAxis.z, yAxis.z, zAxis.z, 0,
|
|
|
|
+0, 0, 0, 1
|
|
|
|
+ </code>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<h3>[method:Matrix4 makeFrustum]( [page:Float left], [page:Float right], [page:Float bottom], [page:Float top], [page:Float near], [page:Float far] )</h3>
|
|
<h3>[method:Matrix4 makeFrustum]( [page:Float left], [page:Float right], [page:Float bottom], [page:Float top], [page:Float near], [page:Float far] )</h3>
|
|
@@ -214,18 +231,29 @@ m.elements = [ 11, 21, 31, 41,
|
|
<div>
|
|
<div>
|
|
Creates a [link:https://en.wikipedia.org/wiki/3D_projection#Perspective_projection perspective projection] matrix.
|
|
Creates a [link:https://en.wikipedia.org/wiki/3D_projection#Perspective_projection perspective projection] matrix.
|
|
|
|
|
|
|
|
+ Internally this calculates the values of [page:Float left], [page:Float right], [page:Float bottom] and [page:Float top],
|
|
|
|
+ and calls [page:.makeFrustum makeFrustum].
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<h3>[method:Matrix4 makeRotationFromEuler]( [page:Euler euler] )</h3>
|
|
<h3>[method:Matrix4 makeRotationFromEuler]( [page:Euler euler] )</h3>
|
|
<div>
|
|
<div>
|
|
- Sets the rotation component of this matrix to the rotation specified by the given [page:Euler Euler Angle].
|
|
|
|
- The rest of the matrix is set to the identity.
|
|
|
|
|
|
+ Sets the rotation component (the upper left 3x3 matrix) of this matrix to the rotation specified by the given [page:Euler Euler Angle].
|
|
|
|
+ The rest of the matrix is set to the identity. Depending on the [page:Euler.order order] of the [page:Euler euler], there are six possible outcomes.
|
|
|
|
+ See [link:https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix this page] for a complete list.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<h3>[method:Matrix4 makeRotationFromQuaternion]( [page:Quaternion q] )</h3>
|
|
<h3>[method:Matrix4 makeRotationFromQuaternion]( [page:Quaternion q] )</h3>
|
|
<div>
|
|
<div>
|
|
- Sets the rotation component of this matrix to the rotation specified by [page:Quaternion q].
|
|
|
|
- The rest of the matrix is set to the identity.
|
|
|
|
|
|
+ Sets the rotation component of this matrix to the rotation specified by [page:Quaternion q], as outlined
|
|
|
|
+ [link:https://en.wikipedia.org/wiki/Rotation_matrix#Quaternion here].
|
|
|
|
+ The rest of the matrix is set to the identity. So, given [page:Quaternion q] = w + xi + yj + zk, the resulting matrix will be:
|
|
|
|
+ <code>
|
|
|
|
+1-2y²-2z² 2xy-2zw 2xz-2yw 0
|
|
|
|
+2xy+2zw 1-2x²-2z² 2yz-2xw 0
|
|
|
|
+2xz-2yw 2yz+2xw 1-2x²-2y² 0
|
|
|
|
+0 0 0 1
|
|
|
|
+ </code>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<h3>[method:Matrix4 makeRotationX]( [page:Float theta] )</h3>
|
|
<h3>[method:Matrix4 makeRotationX]( [page:Float theta] )</h3>
|