Browse Source

Docs: Some more Matrix4.

Mr.doob 13 years ago
parent
commit
175fd11efc
1 changed files with 159 additions and 1 deletions
  1. 159 1
      docs/api/core/Matrix4.html

+ 159 - 1
docs/api/core/Matrix4.html

@@ -104,7 +104,165 @@ Sets this matrix to <strong>a * b</strong> and sets result into flat array <stro
 Destination array can be regular Array or TypedArray.
 </div>
 
+<h3>.multiplyScalar( [page:Float s] ) [page:Matrix4]</h3>
+<div>
+Multiplies this matrix by <strong>s</strong>.
+</div>
+
+<h3>.multiplyVector3( [page:Vector3 v] ) [page:Vector3]</h3>
+<div>
+Applies this matrix to <strong>v</strong>.
+</div>
+
+<h3>.multiplyVector4( [page:Vector4 v] ) [page:Vector4]</h3>
+<div>
+Applies this matrix to <strong>v</strong>.
+</div>
+
+<h3>.rotateAxis( [page:Vector3 v] ) [page:Vector3]</h3>
+<div>
+Applies rotation submatrix of this matrix to vector <strong>v</strong> and then normalizes it.
+</div>
+
+<h3>.crossVector( [page:Vector4 a] ) [page:Vector4]</h3>
+
+<h3>.determinant() [page:Float]</h3>
+<div>
+Computes determinant of this matrix.<br />
+Based on <a href="http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm">http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm</a>
+</div>
+
+<h3>.transpose() [page:Matrix4]</h3>
+<div>
+Transposes this matrix.
+</div>
+
+<h3>.flatten() [page:Array]</h3>
+<div>
+Flattens this matrix into internal [page:Matrix4 Matrix4.flat] array.
+</div>
+
+<h3>.flattenToArray( [page:Array flat] ) [page:Array]</h3>
+<div>
+Flattens this matrix into supplied <strong>flat</strong> array.
+</div>
+
+<h3>.flattenToArrayOffset( [page:Array flat], [page:Integer offset] ) [page:Array]</h3>
+<div>
+Flattens this matrix into supplied <strong>flat</strong> array starting from <strong>offset</strong> position in the array.
+</div>
+
+<h3>.setTranslation( [page:Float x], [page:Float y], [page:Float z] ) [page:Matrix4]</h3>
+<div>
+Sets this matrix as translation transform.
+</div>
+
+<h3>.setScale( [page:Float x], [page:Float y], [page:Float z] ) [page:Matrix4]</h3>
+<div>
+Sets this matrix as scale transform.
+</div>
+
+<h3>.setRotationX( [page:Float theta] ) [page:Matrix4]</h3>
+<div>
+theta — Rotation angle in radians.
+</div>
+<div>
+Sets this matrix as rotation transform around x axis by <strong>theta</strong> radians.
+</div>
+
+<h3>.setRotationY( [page:Float theta] ) [page:Matrix4]</h3>
+<div>
+theta — Rotation angle in radians.
+</div>
+<div>
+Sets this matrix as rotation transform around y axis by <strong>theta</strong> radians.
+</div>
+
+<h3>.setRotationZ( [page:Float theta] ) [page:Matrix4]</h3>
+<div>
+theta — Rotation angle in radians.
+</div>
+<div>
+Sets this matrix as rotation transform around z axis by <strong>theta</strong> radians.
+</div>
+
+<h3>.setRotationAxis( [page:Vector3 axis], [page:Float theta] ) [page:Matrix4]</h3>
+<div>
+axis — Rotation axis.
+theta — Rotation angle in radians.
+</div>
+<div>
+Sets this matrix as rotation transform around <strong>axis</strong> by <strong>angle</strong> radians.<br />
+Based on <a href="http://www.gamedev.net/reference/articles/article1199.asp">http://www.gamedev.net/reference/articles/article1199.asp</a>.
+</div>
+
+<h3>.setPosition( [page:Vector3 v] ) [page:Matrix4]</h3>
+<div>
+Sets the position component for this matrix from vector <strong>v</strong>.
+</div>
+
+<h3>.getPosition() [page:Vector3]</h3>
+<div>
+Returns position component from this matrix.<br />
+Note: this method returns a reference to internal class vector, make copy or clone if you don't use it right away.
+</div>
+
+<h3>.getColumnX() [page:Vector3]</h3>
+<div>
+Returns x column component from this matrix.<br />
+Note: this method returns a reference to internal class vector, make copy or clone if you don't use it right away.
+</div>
+
+<h3>.getColumnY() [page:Vector3]</h3>
+<div>
+Returns y column component from this matrix.<br />
+Note: this method returns a reference to internal class vector, make copy or clone if you don't use it right away.
+</div>
+
+<h3>.getColumnZ() [page:Vector3]</h3>
+<div>
+Returns z column component from this matrix.<br />
+Note: this method returns a reference to internal class vector, make copy or clone if you don't use it right away.
+</div>
+
+<h3>.getInverse( [page:Matrix4 m] ) [page:Matrix4]</h3>
+<div>
+Sets this matrix to inverse of matrix <strong>m</strong>.<br />
+Based on <a href="http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm">http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.htm</a>.
+</div>
+
+<h3>.setRotationFromEuler( [page:Vector3 v], [page:String order] ) [page:Matrix4]</h3>
+<div>
+v — Rotation vector.
+order — The order of rotations. Eg. "XYZ".
+</div>
+<div>
+Sets rotation submatrix of this matrix to rotation specified by Euler angles.<br />
+Default order "XYZ".
+</div>
+
+<h3>.setRotationFromQuaternion( [page:Quaternion q] ) [page:Matrix4]</h3>
+<div>
+Sets rotation submatrix of this matrix to rotation specified by <strong>q</strong>.
+</div>
+
+<h3>.scale( [page:Vector3 v] ) [page:Matrix4]</h3>
+<div>
+Multiplies columns of this matrix by vector <strong>v</strong>.
+</div>
+
+<h3>.compose( [page:Vector3 translation], [page:Quaternion rotation], [page:Vector3 scale] ) [page:Matrix4]</h3>
+<div>
+Sets this matrix to transform composed of <strong>translation</strong>, <strong>rotation</strong> and <strong>scale</strong>.
+</div>
+
+<h3>.decompose( [page:Vector3 translation], [page:Quaternion rotation], [page:Vector3 scale] ) [page:Array]</h3>
+<div>
+Decomposes this matrix into <strong>translation</strong>, <strong>rotation</strong> and <strong>scale</strong> components.<br />
+If parameters are not supplied, new instances will be created.
+</div>
+
 
 <h2>Source</h2>
 
-<a href="https://github.com/mrdoob/three.js/blob/master/src/[path].js" target="_blank">src/[path].js</a>
+<a href="https://github.com/mrdoob/three.js/blob/master/src/[path].js" target="_blank">src/[path].js</a>