提交 9ab7aa3a 编写于 作者: G Greg Tatum

More math doc updates

上级 574f8d78
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<h2>Methods</h2> <h2>Methods</h2>
<h3>.copy( [page:Color color] ) [page:this]</h3> <h3>.copy( [page:Color color] ) [page:Color this]</h3>
<div> <div>
color — Color to copy. color — Color to copy.
</div> </div>
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
Copies given color. Copies given color.
</div> </div>
<h3>.copyGammaToLinear( [page:Color color] ) [page:this]</h3> <h3>.copyGammaToLinear( [page:Color color] ) [page:Color this]</h3>
<div> <div>
color — Color to copy. color — Color to copy.
</div> </div>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
Copies given color making conversion from gamma to linear space. Copies given color making conversion from gamma to linear space.
</div> </div>
<h3>.copyLinearToGamma( [page:Color color] ) [page:this]</h3> <h3>.copyLinearToGamma( [page:Color color] ) [page:Color this]</h3>
<div> <div>
color — Color to copy. color — Color to copy.
</div> </div>
...@@ -71,17 +71,17 @@ ...@@ -71,17 +71,17 @@
Copies given color making conversion from linear to gamma space. Copies given color making conversion from linear to gamma space.
</div> </div>
<h3>.convertGammaToLinear() [page:this]</h3> <h3>.convertGammaToLinear() [page:Color this]</h3>
<div> <div>
Converts this color from gamma to linear space. Converts this color from gamma to linear space.
</div> </div>
<h3>.convertLinearToGamma() [page:this]</h3> <h3>.convertLinearToGamma() [page:Color this]</h3>
<div> <div>
Converts this color from linear to gamma space. Converts this color from linear to gamma space.
</div> </div>
<h3>.setRGB( [page:Float r], [page:Float g], [page:Float b] ) [page:this]</h3> <h3>.setRGB( [page:Float r], [page:Float g], [page:Float b] ) [page:Color this]</h3>
<div> <div>
r — Red channel value between 0 and 1.<br /> r — Red channel value between 0 and 1.<br />
g — Green channel value between 0 and 1.<br /> g — Green channel value between 0 and 1.<br />
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
Returns the string formated hexadecimal value of this color. Returns the string formated hexadecimal value of this color.
</div> </div>
<h3>.setHex( [page:Integer hex] ) [page:this]</h3> <h3>.setHex( [page:Integer hex] ) [page:Color this]</h3>
<div> <div>
hex — Color in hexadecimal.<br /> hex — Color in hexadecimal.<br />
</div> </div>
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
Sets this color from a hexadecimal value. Sets this color from a hexadecimal value.
</div> </div>
<h3>.setStyle( [page:String style] ) [page:this]</h3> <h3>.setStyle( [page:String style] ) [page:Color this]</h3>
<div> <div>
style — color as a CSS-style string, for example, "rgb(250, 0,0)", "rgb(100%,0%,0%)", "#ff0000", "#f00", or "red" style — color as a CSS-style string, for example, "rgb(250, 0,0)", "rgb(100%,0%,0%)", "#ff0000", "#f00", or "red"
</div> </div>
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
Returns the value of this color as a CSS-style string. Example: rgb(255,0,0) Returns the value of this color as a CSS-style string. Example: rgb(255,0,0)
</div> </div>
<h3>.setHSL( [page:Float h], [page:Float s], [page:Float l] ) [page:this]</h3> <h3>.setHSL( [page:Float h], [page:Float s], [page:Float l] ) [page:Color this]</h3>
<div> <div>
h — hue value between 0.0 and 1.0 <br /> h — hue value between 0.0 and 1.0 <br />
s — saturation value between 0.0 and 1.0 <br /> s — saturation value between 0.0 and 1.0 <br />
...@@ -137,37 +137,37 @@ ...@@ -137,37 +137,37 @@
Returns an object with properties h, s, and l. Returns an object with properties h, s, and l.
</div> </div>
<h3>.offsetHSL( [page:Float h], [page:Float s], [page:Float l] ) [page:this]</h3> <h3>.offsetHSL( [page:Float h], [page:Float s], [page:Float l] ) [page:Color this]</h3>
<div> <div>
Adds given h, s, and l to this color's existing h, s, and l values. Adds given h, s, and l to this color's existing h, s, and l values.
</div> </div>
<h3>.add ( [page:Color color] ) [page:this]</h3> <h3>.add ( [page:Color color] ) [page:Color this]</h3>
<div> <div>
Adds rgb values of given color to rgb values of this color Adds rgb values of given color to rgb values of this color
</div> </div>
<h3>.addColors( [page:Color color1], [page:Color color2] ) [page:this]</h3> <h3>.addColors( [page:Color color1], [page:Color color2] ) [page:Color this]</h3>
<div> <div>
Sets this color to the sum of color1 and color2 Sets this color to the sum of color1 and color2
</div> </div>
<h3>.addScalar( [page:Number s] ) [page:this]</h3> <h3>.addScalar( [page:Number s] ) [page:Color this]</h3>
<div> <div>
Adds s to the rgb values of this color Adds s to the rgb values of this color
</div> </div>
<h3>.multiply( [page:Color color] ) [page:this]</h3> <h3>.multiply( [page:Color color] ) [page:Color this]</h3>
<div> <div>
Multiplies this color's rgb values by given color's rgb values Multiplies this color's rgb values by given color's rgb values
</div> </div>
<h3>.multiplyScalar( [page:Number s] ) [page:this]</h3> <h3>.multiplyScalar( [page:Number s] ) [page:Color this]</h3>
<div> <div>
Multiplies this color's rgb values by s Multiplies this color's rgb values by s
</div> </div>
<h3>.lerp( [page:Color color], alpha ) [page:this]</h3> <h3>.lerp( [page:Color color], alpha ) [page:Color this]</h3>
<div> <div>
alpha -- a number between 0 and 1. alpha -- a number between 0 and 1.
</div> </div>
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
Linear interpolation of this colors rgb values and the rgb values of the first argument. The alpha argument can be thought of as the percent between the two colors, where 0 is this color and 1 is the first argument. Linear interpolation of this colors rgb values and the rgb values of the first argument. The alpha argument can be thought of as the percent between the two colors, where 0 is this color and 1 is the first argument.
</div> </div>
<h3>.equals( [page:Color c] ) [page:this]</h3> <h3>.equals( [page:Color c] ) [page:Color this]</h3>
<div> <div>
Compares this color and c and returns true if they are the same, false otherwise. Compares this color and c and returns true if they are the same, false otherwise.
</div> </div>
...@@ -185,9 +185,9 @@ ...@@ -185,9 +185,9 @@
Clones this color. Clones this color.
</div> </div>
<h3>.set([page:todo value]) [page:this]</h3> <h3>.set( value ) [page:Color this]</h3>
<div> <div>
value -- either an instance of Color, a hexadecimal value, or a css style string value -- either an instance of [page:Color], a [page:Integer hexadecimal] value, or a css style [page:String string]
</div> </div>
<div> <div>
Delegates to .copy, .setStyle, or .setHex depending on input type. Delegates to .copy, .setStyle, or .setHex depending on input type.
......
...@@ -9,7 +9,10 @@ ...@@ -9,7 +9,10 @@
<body> <body>
<h1>[name]</h1> <h1>[name]</h1>
<div class="desc">Euler Angles.</div> <div class="desc">Euler Angles. <br/><br/>
Euler angles describe a rotation transformation by rotating an object on its various axes in specified amounts per axis, and a specified axis order.
(More information on <a href='http://en.wikipedia.org/wiki/Euler_angles' target='blank'>Wikipedia</a>)</div>
<h2>Example</h2> <h2>Example</h2>
...@@ -22,11 +25,11 @@ ...@@ -22,11 +25,11 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]( [page:Float x], [page:Float y], [page:Float z], [page:String Order] )</h3> <h3>[name]( [page:Float x], [page:Float y], [page:Float z], [page:String order] )</h3>
<div> <div>
x -- [page:Float] the angle of the x axis<br /> x -- [page:Float] the angle of the x axis in radians<br />
y -- [page:Float] the angle of the y axis<br /> y -- [page:Float] the angle of the y axis in radians<br />
z -- [page:Float] the angle of the z axis<br /> z -- [page:Float] the angle of the z axis in radians<br />
order -- [page:String] A string representing the order that the rotations are applied, defaults to 'XYZ' (must be upper case). order -- [page:String] A string representing the order that the rotations are applied, defaults to 'XYZ' (must be upper case).
</div> </div>
<div> <div>
...@@ -48,23 +51,23 @@ ...@@ -48,23 +51,23 @@
<h2>Methods</h2> <h2>Methods</h2>
<h3>.set( [page:Float x], [page:Float y], [page:Float z], [page:String order] ) [page:this]</h3> <h3>.set( [page:Float x], [page:Float y], [page:Float z], [page:String order] ) [page:Euler this]</h3>
<div> <div>
x -- [page:Float] Angle in x axis<br /> x -- [page:Float] Angle in x axis in radians<br />
x -- [page:Float] Angle in x axis<br /> x -- [page:Float] Angle in x axis in radians<br />
x -- [page:Float] Angle in x axis<br /> x -- [page:Float] Angle in x axis in radians<br />
order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case) order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
</div> </div>
<div> <div>
Sets the angles of this euler transform. Sets the angles of this euler transform.
</div> </div>
<h3>.copy( [page:Euler euler] ) [page:this]</h3> <h3>.copy( [page:Euler euler] ) [page:Euler this]</h3>
<div> <div>
Copies value of *euler* to this euler. Copies value of *euler* to this euler.
</div> </div>
<h3>.setFromRotationMatrix( [page:Matrix4 m], [page:String order] ) [page:this]</h3> <h3>.setFromRotationMatrix( [page:Matrix4 m], [page:String order] ) [page:Euler this]</h3>
<div> <div>
m -- [page:Matrix4] assumes upper 3x3 of matrix is a pure rotation matrix (i.e. unscaled)<br /> m -- [page:Matrix4] assumes upper 3x3 of matrix is a pure rotation matrix (i.e. unscaled)<br />
order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case) order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
...@@ -73,7 +76,7 @@ ...@@ -73,7 +76,7 @@
Sets the angles of this euler transform from a pure rotation matrix based on the orientation specified by order. Sets the angles of this euler transform from a pure rotation matrix based on the orientation specified by order.
</div> </div>
<h3>.setFromQuaternion( [page:Quaternion q], [page:String order] ) [page:this]</h3> <h3>.setFromQuaternion( [page:Quaternion q], [page:String order] ) [page:Euler this]</h3>
<div> <div>
q -- [page:Quaternion] quaternion must be normalized<br /> q -- [page:Quaternion] quaternion must be normalized<br />
order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case) order -- [page:string] Order of axes, defaults to 'XYZ' (must be upper case)
...@@ -82,13 +85,13 @@ ...@@ -82,13 +85,13 @@
Sets the angles of this euler transform from a normalized quaternion based on the orientation specified by order. Sets the angles of this euler transform from a normalized quaternion based on the orientation specified by order.
</div> </div>
<h3>.reorder( [page:String newOrder] ) [page:this]</h3> <h3>.reorder( [page:String newOrder] ) [page:Euler this]</h3>
<div> <div>
Resets the euler angle with a new order by creating a quaternion from this euler angle and then setting this euler angle with the quaternion and the new order. <br /> Resets the euler angle with a new order by creating a quaternion from this euler angle and then setting this euler angle with the quaternion and the new order. <br />
WARNING: this discards revolution information. WARNING: this discards revolution information.
</div> </div>
<h3>.fromArray([page:Array array]) [page:this]</h3> <h3>.fromArray([page:Array array]) [page:Euler this]</h3>
<div> <div>
array -- [page:Array] of length 3 or 4. array[3] is an optional order argument. array -- [page:Array] of length 3 or 4. array[3] is an optional order argument.
</div> </div>
......
...@@ -15,17 +15,17 @@ ...@@ -15,17 +15,17 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]([page:todo p0], [page:todo p1], [page:todo p2], [page:todo p3], [page:todo p4], [page:todo p5])</h3> <h3>[name]([page:Plane p0], [page:Plane p1], [page:Plane p2], [page:Plane p3], [page:Plane p4], [page:Plane p5])</h3>
<div> <div>
p0 -- todo <br /> p0 -- [page:Plane] <br />
p1 -- todo <br /> p1 -- [page:Plane] <br />
p2 -- todo <br /> p2 -- [page:Plane] <br />
p3 -- todo <br /> p3 -- [page:Plane] <br />
p4 -- todo <br /> p4 -- [page:Plane] <br />
p5 -- todo p5 -- [page:Plane]
</div> </div>
<div> <div>
todo Creates a frustum from the designated planes.
</div> </div>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<h3>.[page:Array planes]</h3> <h3>.[page:Array planes]</h3>
<div> <div>
Array of 6 [page:Vector4 vectors]. Array of 6 [page:Plane planes].
</div> </div>
...@@ -46,46 +46,46 @@ ...@@ -46,46 +46,46 @@
Checks whether the object is inside the Frustum. Checks whether the object is inside the Frustum.
</div> </div>
<h3>.clone() [page:todo]</h3> <h3>.clone() [page:Frustum]</h3>
<div> <div>
todo Return a copy of this Frustum
</div> </div>
<h3>.set([page:todo p0], [page:todo p1], [page:todo p2], [page:todo p3], [page:todo p4], [page:todo p5]) [page:todo]</h3> <h3>.set([page:Plane p0], [page:Plane p1], [page:Plane p2], [page:Plane p3], [page:Plane p4], [page:Plane p5]) [page:Boolean]</h3>
<div> <div>
p0 -- todo <br /> p0 -- [page:Plane] <br />
p1 -- todo <br /> p1 -- [page:Plane] <br />
p2 -- todo <br /> p2 -- [page:Plane] <br />
p3 -- todo <br /> p3 -- [page:Plane] <br />
p4 -- todo <br /> p4 -- [page:Plane] <br />
p5 -- todo p5 -- [page:Plane]
</div> </div>
<div> <div>
todo todo
</div> </div>
<h3>.copy([page:todo frustum]) [page:todo]</h3> <h3>.copy([page:Frustum frustum]) [page:Frustum this]</h3>
<div> <div>
frustum -- todo frustum -- The frustum to copy
</div> </div>
<div> <div>
todo todo
</div> </div>
<h3>.containsPoint([page:todo point]) [page:todo]</h3> <h3>.containsPoint([page:Vector3 point]) [page:Boolean]</h3>
<div> <div>
point -- todo point -- [page:Vector3] to test
</div> </div>
<div> <div>
todo Checks to see if the frustum contains the point.
</div> </div>
<h3>.intersectsSphere([page:todo sphere]) [page:todo]</h3> <h3>.intersectsSphere([page:Sphere sphere]) [page:Boolean]</h3>
<div> <div>
sphere -- todo sphere -- [page:Sphere]
</div> </div>
<div> <div>
todo Check to see if the sphere intersects with the frustum.
</div> </div>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -72,42 +72,44 @@ ...@@ -72,42 +72,44 @@
Returns -1 if *x* is less than 0, 1 if *x* is greater than 0, and 0 if *x* is zero. Returns -1 if *x* is less than 0, 1 if *x* is greater than 0, and 0 if *x* is zero.
</div> </div>
<h3>.degToRad([page:todo degrees]) [page:todo]</h3> <h3>.degToRad([page:Float degrees]) [page:Float]</h3>
<div> <div>
degrees -- todo degrees -- [page:Float]
</div> </div>
<div> <div>
todo Converts degrees to radians.
</div> </div>
<h3>.smoothstep([page:todo x], [page:todo min], [page:todo max]) [page:todo]</h3> <h3>.radToDeg([page:Float radians]) [page:Float]</h3>
<div> <div>
x -- todo <br /> radians -- [page:Float]
min -- todo <br />
max -- todo
</div> </div>
<div> <div>
todo Converts radians to degrees
</div> </div>
<h3>.smootherstep([page:todo x], [page:todo min], [page:todo max]) [page:todo]</h3> <h3>.smoothstep([page:Float x], [page:Float min], [page:Float max]) [page:Float]</h3>
<div> <div>
x -- todo <br /> x -- The value to evaluate based on its position between min and max. <br />
min -- todo <br /> min -- Any x value below min will be 0 <br />
max -- todo max -- Any x value above max will be 1
</div> </div>
<div> <div>
todo Returns a value between 0-1 that represents the percentage that x has moved between min and max, but smoothed or slowed down the closer X is to the min and max.<br/><br/>
[link:http://en.wikipedia.org/wiki/Smoothstep Wikipedia]
</div> </div>
<h3>.radToDeg([page:todo radians]) [page:todo]</h3> <h3>.smootherstep([page:Float x], [page:Float min], [page:Float max]) [page:Float]</h3>
<div> <div>
radians -- todo x -- The value to evaluate based on its position between min and max. <br />
min -- Any x value below min will be 0 <br />
max -- Any x value above max will be 1
</div> </div>
<div> <div>
todo Returns a value between 0-1. It works the same as smoothstep, but more smooth.
</div> </div>
<h2>Source</h2> <h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js] [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
......
...@@ -15,20 +15,26 @@ ...@@ -15,20 +15,26 @@
<h2>Constructor</h2> <h2>Constructor</h2>
<h3>[name]([page:todo n11], [page:todo n12], [page:todo n13], [page:todo n21], [page:todo n22], [page:todo n23], [page:todo n31], [page:todo n32], [page:todo n33])</h3> <h3>[name]([page:Float n11], [page:Float n12], [page:Float n13], [page:Float n21], [page:Float n22], [page:Float n23], [page:Float n31], [page:Float n32], [page:Float n33])</h3>
<div> <div>
n11 -- todo <br /> n11 -- [page:Float] <br />
n12 -- todo <br /> n12 -- [page:Float] <br />
n13 -- todo <br /> n13 -- [page:Float] <br />
n21 -- todo <br /> n21 -- [page:Float] <br />
n22 -- todo <br /> n22 -- [page:Float] <br />
n23 -- todo <br /> n23 -- [page:Float] <br />
n31 -- todo <br /> n31 -- [page:Float] <br />
n32 -- todo <br /> n32 -- [page:Float] <br />
n33 -- todo n33 -- [page:Float]
</div> </div>
<div> <div>
Initialize the 3x3 matrix with a row-major sequence of values. Initialize the 3x3 matrix with a row-major sequence of values.<br/><br/>
n11, n12, n13,<br/>
n21, n22, n23,<br/>
n31, n32, n33<br/><br/>
If no values are sent the matrix will be initialized as an identity matrix.
</div> </div>
...@@ -48,82 +54,89 @@ ...@@ -48,82 +54,89 @@
Transposes this matrix in place. Transposes this matrix in place.
</div> </div>
<h3>.transposeIntoArray( [page:Array r] ) [page:Matrix3]</h3> <h3>.transposeIntoArray( [page:Array array] ) [page:Matrix3]</h3>
<div> <div>
Transposes this matrix into the supplied array *r*, and returns itself. array -- [page:Array] <br />
</div>
<div>
Transposes this matrix into the supplied array, and returns itself.
</div> </div>
<h3>.determinant() [page:todo]</h3> <h3>.determinant() [page:Float]</h3>
<div> <div>
todo Returns the matrix's determinant.
</div> </div>
<h3>.set([page:todo n11], [page:todo n12], [page:todo n13], [page:todo n21], [page:todo n22], [page:todo n23], [page:todo n31], [page:todo n32], [page:todo n33]) [page:todo]</h3> <h3>.set([page:Float n11], [page:Float n12], [page:Float n13], [page:Float n21], [page:Float n22], [page:Float n23], [page:Float n31], [page:Float n32], [page:Float n33]) [page:Matrix3 this]</h3>
<div> <div>
n11 -- todo <br /> n11 -- [page:Float] <br />
n12 -- todo <br /> n12 -- [page:Float] <br />
n13 -- todo <br /> n13 -- [page:Float] <br />
n21 -- todo <br /> n21 -- [page:Float] <br />
n22 -- todo <br /> n22 -- [page:Float] <br />
n23 -- todo <br /> n23 -- [page:Float] <br />
n31 -- todo <br /> n31 -- [page:Float] <br />
n32 -- todo <br /> n32 -- [page:Float] <br />
n33 -- todo n33 -- [page:Float]
</div> </div>
<div> <div>
Set the 3x3 matrix values to the given row-major sequence of values. Set the 3x3 matrix values to the given row-major sequence of values.
</div> </div>
<h3>.multiplyScalar([page:todo s]) [page:todo]</h3> <h3>.multiplyScalar([page:Float scalar]) [page:Matrix3 this]</h3>
<div> <div>
s -- todo scalar -- [page:Float]
</div> </div>
<div> <div>
todo Multiply every component of the matrix by a scalar value.
</div> </div>
<h3>.multiplyVector3Array([page:todo a]) [page:todo]</h3> <h3>.multiplyVector3Array([page:Array array]) [page:Array]</h3>
<div> <div>
a -- todo array -- An array in the form [vector1x, vector1y, vector1z, vector2x, vector2y, vector2z, ...]
</div> </div>
<div> <div>
todo Multiply (apply) this matrix against every vector3 in the array.
</div> </div>
<h3>.getNormalMatrix([page:todo m]) [page:todo]</h3> <h3>.getNormalMatrix([page:Matrix4 matrix4]) [page:Matrix3 this]</h3>
<div> <div>
m -- todo matrix4 -- [page:Matrix4]
</div> </div>
<div> <div>
todo Set this matrix as the normal matrix of the passed [page:Matrix4 matrix4]. The normal matrix is the inverse transpose of the matrix.
</div> </div>
<h3>.getInverse([page:todo matrix], [page:todo throwOnInvertible]) [page:todo]</h3> <h3>.getInverse([page:Matrix4 matrix4], [page:Boolean throwOnInvertible]) [page:Matrix3 this]</h3>
<div> <div>
matrix -- todo <br /> matrix4 -- [page:Matrix4] <br />
throwOnInvertible -- todo throwOnInvertible -- [Page:Boolean] If true, throw an error if the matrix is invertible.
</div> </div>
<div> <div>
todo Set this matrix to the inverse of the passed matrix.
</div> </div>
<h3>.copy([page:todo m]) [page:todo]</h3> <h3>.copy([page:Matrix3 matrix]) [page:Matrix3 this]</h3>
<div> <div>
m -- todo matrix -- [page:Matrix3]
</div> </div>
<div> <div>
todo Copy the values of the passed matrix.
</div> </div>
<h3>.clone() [page:todo]</h3> <h3>.clone() [page:Matrix3]</h3>
<div> <div>
todo Create a copy of the matrix.
</div> </div>
<h3>.identity() [page:todo]</h3> <h3>.identity() [page:Matrix3 this]</h3>
<div> <div>
todo Set as an identity matrix.<br/><br/>
1, 0, 0<br/>
0, 1, 0<br/>
0, 0, 1<br/>
</div> </div>
<h2>Source</h2> <h2>Source</h2>
......
...@@ -51,53 +51,53 @@ ...@@ -51,53 +51,53 @@
<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]</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> <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]</h3> <h3>.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]</h3> <h3>.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]</h3> <h3>.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]</h3> <h3>.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]</h3> <h3>.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]</h3> <h3>.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]</h3> <h3>.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]</h3> <h3>.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]</h3> <h3>.multiplyScalar( [page:Float s] ) [page:Matrix4 this]</h3>
<div> <div>
Multiplies this matrix by *s*. Multiplies this matrix by *s*.
</div> </div>
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
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]</h3> <h3>.transpose() [page:Matrix4 this]</h3>
<div> <div>
Transposes this matrix. Transposes this matrix.
</div> </div>
...@@ -123,18 +123,18 @@ ...@@ -123,18 +123,18 @@
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]</h3> <h3>.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]</h3> <h3>.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]</h3> <h3>.makeRotationFromEuler( [page:Vector3 v], [page:String order] ) [page:Matrix4 this]</h3>
<div> <div>
v — Rotation vector. v — Rotation vector.
order — The order of rotations. Eg. "XYZ". order — The order of rotations. Eg. "XYZ".
...@@ -144,17 +144,17 @@ ...@@ -144,17 +144,17 @@
Default order is *"XYZ"*. Default order is *"XYZ"*.
</div> </div>
<h3>.makeRotationFromQuaternion( [page:Quaternion q] ) [page:Matrix4]</h3> <h3>.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]</h3> <h3>.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]</h3> <h3>.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>
...@@ -165,12 +165,12 @@ ...@@ -165,12 +165,12 @@
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]</h3> <h3>.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]</h3> <h3>.makeRotationX( [page:Float theta] ) [page:Matrix4 this]</h3>
<div> <div>
theta — Rotation angle in radians. theta — Rotation angle in radians.
</div> </div>
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,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]</h3> <h3>.makeRotationY( [page:Float theta] ) [page:Matrix4 this]</h3>
<div> <div>
theta — Rotation angle in radians. theta — Rotation angle in radians.
</div> </div>
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,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]</h3> <h3>.makeRotationZ( [page:Float theta] ) [page:Matrix4 this]</h3>
<div> <div>
theta — Rotation angle in radians. theta — Rotation angle in radians.
</div> </div>
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,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]</h3> <h3>.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.
...@@ -204,22 +204,22 @@ ...@@ -204,22 +204,22 @@
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]</h3> <h3>.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]</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> <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]</h3> <h3>.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]</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> <div>
Creates an orthographic projection matrix. Creates an orthographic projection matrix.
</div> </div>
...@@ -229,17 +229,17 @@ ...@@ -229,17 +229,17 @@
Clones this matrix. Clones this matrix.
</div> </div>
<h3>.multiplyVector3Array([page:todo a]) [page:todo]</h3> <h3>.multiplyVector3Array([page:Array a]) [page:Array]</h3>
<div> <div>
a -- todo array -- An array in the form [vector1x, vector1y, vector1z, vector2x, vector2y, vector2z, ...]
</div> </div>
<div> <div>
todo Multiply (apply) this matrix against every vector3 in the array.
</div> </div>
<h3>.getMaxScaleOnAxis() [page:todo]</h3> <h3>.getMaxScaleOnAxis() [page:Float]</h3>
<div> <div>
todo Gets the max scale value of the 3 axes.
</div> </div>
<h2>Source</h2> <h2>Source</h2>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册