Browse Source

Merge branch 'vector3Docs' of https://github.com/walfly/three.js into dev

Mr.doob 12 years ago
parent
commit
eafdc4d387
2 changed files with 110 additions and 121 deletions
  1. 1 1
      docs/api/math/Vector2.html
  2. 109 120
      docs/api/math/Vector3.html

+ 1 - 1
docs/api/math/Vector2.html

@@ -140,7 +140,7 @@
 		max -- [page:Vector2] containing the max x and y values in the desired range
 		max -- [page:Vector2] containing the max x and y values in the desired range
 		</div>
 		</div>
 		<div>
 		<div>
-		If this vector's x or y value is greater than the max vector's x or y value, it is replaced by that value. <br />  If this vector's x or y value is less than the min vector's x or y value, it is replace by that value.
+		If this vector's x or y value is greater than the max vector's x or y value, it is replaced by the corresponding value. <br />  If this vector's x or y value is less than the min vector's x or y value, it is replace by the corresponding value.
 		</div>
 		</div>
 
 
 		<h3>.toArray() [page:Array]</h3>
 		<h3>.toArray() [page:Array]</h3>

+ 109 - 120
docs/api/math/Vector3.html

@@ -27,12 +27,12 @@
 
 
 		<h3>[name]( [page:Float x], [page:Float y], [page:Float z] )</h3>
 		<h3>[name]( [page:Float x], [page:Float y], [page:Float z] )</h3>
 		<div>
 		<div>
-		x -- todo <br />
-		y -- todo <br />
-		z -- todo
+		x -- [page:Float] the vector's x value <br />
+		y -- [page:Float] the vector's y value <br />
+		z -- [page:Float] the vector's z value
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		A 3 dimensional vector
 		</div>
 		</div>
 
 
 
 
@@ -47,63 +47,63 @@
 
 
 		<h2>Methods</h2>
 		<h2>Methods</h2>
 
 
-		<h3>.set( [page:Float x], [page:Float y], [page:Float z] ) [page:Vector3]</h3>
+		<h3>.set( [page:Float x], [page:Float y], [page:Float z] ) [page:this]</h3>
 		<div>
 		<div>
 		Sets value of this vector.
 		Sets value of this vector.
 		</div>
 		</div>
 
 
-		<h3>.setX( [page:Float x] ) [page:Vector3]</h3>
+		<h3>.setX( [page:Float x] ) [page:this]</h3>
 		<div>
 		<div>
 		Sets x value of this vector.
 		Sets x value of this vector.
 		</div>
 		</div>
 
 
-		<h3>.setY( [page:Float y] ) [page:Vector3]</h3>
+		<h3>.setY( [page:Float y] ) [page:this]</h3>
 		<div>
 		<div>
 		Sets y value of this vector.
 		Sets y value of this vector.
 		</div>
 		</div>
 
 
-		<h3>.setZ( [page:Float z] ) [page:Vector3]</h3>
+		<h3>.setZ( [page:Float z] ) [page:this]</h3>
 		<div>
 		<div>
 		Sets z value of this vector.
 		Sets z value of this vector.
 		</div>
 		</div>
 
 
-		<h3>.copy( [page:Vector3 v] ) [page:Vector3]</h3>
+		<h3>.copy( [page:Vector3 v] ) [page:this]</h3>
 		<div>
 		<div>
 		Copies value of *v* to this vector.
 		Copies value of *v* to this vector.
 		</div>
 		</div>
 
 
-		<h3>.add( [page:Vector3 v] ) [page:Vector3]</h3>
+		<h3>.add( [page:Vector3 v] ) [page:this]</h3>
 		<div>
 		<div>
 		Adds *v* to this vector.
 		Adds *v* to this vector.
 		</div>
 		</div>
 
 
-		<h3>.addVectors( [page:Vector3 a], [page:Vector3 b] ) [page:Vector3]</h3>
+		<h3>.addVectors( [page:Vector3 a], [page:Vector3 b] ) [page:this]</h3>
 		<div>
 		<div>
 		Sets this vector to *a + b*.
 		Sets this vector to *a + b*.
 		</div>
 		</div>
 
 
-		<h3>.sub( [page:Vector3 v] ) [page:Vector3]</h3>
+		<h3>.sub( [page:Vector3 v] ) [page:this]</h3>
 		<div>
 		<div>
 		Subtracts *v* from this vector.
 		Subtracts *v* from this vector.
 		</div>
 		</div>
 
 
-		<h3>.subVectors( [page:Vector3 a], [page:Vector3 b] ) [page:Vector3]</h3>
+		<h3>.subVectors( [page:Vector3 a], [page:Vector3 b] ) [page:this]</h3>
 		<div>
 		<div>
 		Sets this vector to *a - b*.
 		Sets this vector to *a - b*.
 		</div>
 		</div>
 
 
-		<h3>.multiplyScalar( [page:Float s] ) [page:Vector3]</h3>
+		<h3>.multiplyScalar( [page:Float s] ) [page:this]</h3>
 		<div>
 		<div>
 		Multiplies this vector by scalar *s*.
 		Multiplies this vector by scalar *s*.
 		</div>
 		</div>
 
 
-		<h3>.divideScalar( [page:Float s] ) [page:Vector3]</h3>
+		<h3>.divideScalar( [page:Float s] ) [page:this]</h3>
 		<div>
 		<div>
 		Divides this vector by scalar *s*.<br />
 		Divides this vector by scalar *s*.<br />
 		Set vector to *( 0, 0, 0 )* if *s == 0*.
 		Set vector to *( 0, 0, 0 )* if *s == 0*.
 		</div>
 		</div>
 
 
-		<h3>.negate() [page:Vector3]</h3>
+		<h3>.negate() [page:this]</h3>
 		<div>
 		<div>
 		Inverts this vector.
 		Inverts this vector.
 		</div>
 		</div>
@@ -129,9 +129,9 @@
 		[link:http://en.wikipedia.org/wiki/Taxicab_geometry]
 		[link:http://en.wikipedia.org/wiki/Taxicab_geometry]
 		</div>
 		</div>
 
 
-		<h3>.normalize() [page:Vector3]</h3>
+		<h3>.normalize() [page:this]</h3>
 		<div>
 		<div>
-		Normalizes this vector.
+		Normalizes this vector. Transforms this Vector into a Unit vector by dividing the vector by it's length.
 		</div>
 		</div>
 
 
 		<h3>.distanceTo( [page:Vector3 v] ) [page:Float]</h3>
 		<h3>.distanceTo( [page:Vector3 v] ) [page:Float]</h3>
@@ -144,32 +144,32 @@
 		Computes squared distance of this vector to *v*.
 		Computes squared distance of this vector to *v*.
 		</div>
 		</div>
 
 
-		<h3>.setLength( [page:Float l] ) [page:Vector3]</h3>
+		<h3>.setLength( [page:Float l] ) [page:this]</h3>
 		<div>
 		<div>
 		Normalizes this vector and multiplies it by *l*.
 		Normalizes this vector and multiplies it by *l*.
 		</div>
 		</div>
 
 
-		<h3>.cross( [page:Vector3 v] ) [page:Vector3]</h3>
+		<h3>.cross( [page:Vector3 v] ) [page:this]</h3>
 		<div>
 		<div>
 		Sets this vector to cross product of itself and *v*.
 		Sets this vector to cross product of itself and *v*.
 		</div>
 		</div>
 
 
-		<h3>.crossVectors( [page:Vector3 a], [page:Vector3 b] ) [page:Vector3]</h3>
+		<h3>.crossVectors( [page:Vector3 a], [page:Vector3 b] ) [page:this]</h3>
 		<div>
 		<div>
 		Sets this vector to cross product of *a* and *b*.
 		Sets this vector to cross product of *a* and *b*.
 		</div>
 		</div>
 
 
-		<h3>.getPositionFromMatrix( [page:Matrix4 m] ) [page:Vector3]</h3>
+		<h3>.getPositionFromMatrix( [page:Matrix4 m] ) [page:this]</h3>
 		<div>
 		<div>
 		Sets this vector extracting position from matrix transform.
 		Sets this vector extracting position from matrix transform.
 		</div>
 		</div>
 
 
-		<h3>.getScaleFromMatrix( [page:Matrix4 m] ) [page:Vector3]</h3>
+		<h3>.getScaleFromMatrix( [page:Matrix4 m] ) [page:this]</h3>
 		<div>
 		<div>
 		Sets this vector extracting scale from matrix transform.
 		Sets this vector extracting scale from matrix transform.
 		</div>
 		</div>
 
 
-		<h3>.equals( [page:Vector3 v] ) [page:Vector3]</h3>
+		<h3>.equals( [page:Vector3 v] ) [page:Boolean]</h3>
 		<div>
 		<div>
 		Checks for strict equality of this vector and *v*.
 		Checks for strict equality of this vector and *v*.
 		</div>
 		</div>
@@ -180,219 +180,208 @@
 		</div>
 		</div>
 
 
 
 
-		<h3>.clamp([page:todo min], [page:todo max]) [page:todo]</h3>
+		<h3>.clamp([page:todo min], [page:todo max]) [page:this]</h3>
 		<div>
 		<div>
-		min -- todo <br />
-		max -- todo
+		min -- [page:Vector3] <br />
+		max -- [page:Vector3]
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		If this vector's x, y or z value is greater than the max vector's x, y or z value, it is replaced by the corresponding value. <br />  If this vector's x, y or z value is less than the min vector's x, y or z value, it is replace by the corresponding value.
 		</div>
 		</div>
 
 
-		<h3>.applyMatrix3([page:todo m]) [page:todo]</h3>
+		<h3>.applyMatrix3([page:todo m]) [page:this]</h3>
 		<div>
 		<div>
-		m -- todo
+		m -- [page:Matrix3]
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		Multiplies this vector times a 3 x 3 matrix.
 		</div>
 		</div>
 
 
-		<h3>.applyMatrix4([page:todo m]) [page:todo]</h3>
+		<h3>.applyMatrix4([page:todo m]) [page:todo this]</h3>
 		<div>
 		<div>
-		m -- todo
+		m -- [page:todo Matrix4]
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		Multiplies this vector by 4 x 3 subset of a Matrix4.
 		</div>
 		</div>
 
 
-		<h3>.projectOnPlane([page:todo planeNormal]) [page:todo]</h3>
+		<h3>.projectOnPlane([page:todo planeNormal]) [page:todo this]</h3>
 		<div>
 		<div>
-		planeNormal -- todo
+		planeNormal -- [page:todo Plane.normal]
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		Projects this vector onto a plane by subtracting this vector projected onto the plane's normal from this vector.
 		</div>
 		</div>
 
 
-		<h3>.projectOnVector([page:todo vector]) [page:todo]</h3>
+		<h3>.projectOnVector([page:todo vector]) [page:todo this]</h3>
 		<div>
 		<div>
-		vector -- todo
+		vector -- [page:todo Vector3]
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		Projects this vector onto another vector.
 		</div>
 		</div>
 
 
-		<h3>.addScalar([page:todo s]) [page:todo]</h3>
+		<h3>.addScalar([page:todo s]) [page:todo this]</h3>
 		<div>
 		<div>
-		s -- todo
+		s -- [page:todo Float]
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		Adds a s to this vector.
 		</div>
 		</div>
 
 
-		<h3>.divide([page:todo v]) [page:todo]</h3>
+		<h3>.divide([page:todo v]) [page:todo this]</h3>
 		<div>
 		<div>
-		v -- todo
+		v -- [page:todo Vector3]
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		Divides this vector by vector v.
 		</div>
 		</div>
 
 
 		<h3>.min([page:todo v]) [page:todo]</h3>
 		<h3>.min([page:todo v]) [page:todo]</h3>
 		<div>
 		<div>
-		v -- todo
+		v -- [page:todo Vector3]
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		If this vector's x, y, or z value is less than vector v's x, y, or z value, that value is replaced by the corresponding vector v value.
 		</div>
 		</div>
 
 
-		<h3>.setComponent([page:todo index], [page:todo value]) [page:todo]</h3>
+		<h3>.setComponent([page:todo index], [page:todo value]) [page:todo this]</h3>
 		<div>
 		<div>
-		index -- todo <br />
-		value -- todo
+		index -- 0, 1, or 2 <br />
+		value -- [page:todo Float]
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		If index equals 0 the method sets this vector's x value to value <br />
+		If index equals 1 the method sets this vector's y value to value <br />
+		If index equals 2 the method sets this vector's z value to value
 		</div>
 		</div>
 
 
-		<h3>.transformDirection([page:todo m]) [page:todo]</h3>
+		<h3>.transformDirection([page:todo m]) [page:todo this]</h3>
 		<div>
 		<div>
-		m -- todo
+		m -- [page:todo Matrix4]
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		Multiplies this vector by a 3 x 3 subset of a Matrix4 and then normalizes the results.
 		</div>
 		</div>
 
 
-		<h3>.multiplyVectors([page:todo a], [page:todo b]) [page:todo]</h3>
+		<h3>.multiplyVectors([page:todo a], [page:todo b]) [page:todo this]</h3>
 		<div>
 		<div>
-		a -- todo <br />
-		b -- todo
+		a -- [page:todo Vector3] <br />
+		b -- [page:todo Vector3]
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		Sets this vector equal the result of multiplying vector a by vector b.
 		</div>
 		</div>
 
 
-		<h3>.getComponent([page:todo index]) [page:todo]</h3>
+		<h3>.getComponent([page:todo index]) [page:todo Float]</h3>
 		<div>
 		<div>
-		index -- todo
+		index -- 0, 1, or 2
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		If index equals 0 the method returns this vector's x value <br />
+		If index equals 1 the method returns this vector's y value <br />
+		If index equals 2 the method returns this vector's z value
 		</div>
 		</div>
 
 
-		<h3>.applyAxisAngle([page:todo axis], [page:todo angle]) [page:todo]</h3>
+		<h3>.applyAxisAngle([page:todo axis], [page:todo angle]) [page:todo this]</h3>
 		<div>
 		<div>
-		axis -- todo <br />
-		angle -- todo
+		axis -- a normalized [page:todo Vector3] <br />
+		angle -- an angle in radians
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		Applies a rotation specified by an axis and an angle to this vector.
 		</div>
 		</div>
 
 
-		<h3>.lerp([page:todo v], [page:todo alpha]) [page:todo]</h3>
+		<h3>.lerp([page:todo v], [page:todo alpha]) [page:todo this]</h3>
 		<div>
 		<div>
-		v -- todo <br />
-		alpha -- todo
+		v -- [page:todo Vector3] <br />
+		alpha -- [page:todo Float] between 0 and 1.
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		Linear Interpolation between this vector and vector v, where alpha is the percent along the line.
 		</div>
 		</div>
 
 
-		<h3>.max([page:todo v]) [page:todo]</h3>
+		<h3>.max([page:todo v]) [page:todo this]</h3>
 		<div>
 		<div>
-		v -- todo
+		v -- [page:todo Vector3]
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		If this vector's x, y, or z value is greater than vector v's x, y, or z value, that value is replaced by the corresponding vector v value.
 		</div>
 		</div>
 
 
-		<h3>.angleTo([page:todo v]) [page:todo]</h3>
+		<h3>.angleTo([page:todo v]) [page:todo Float]</h3>
 		<div>
 		<div>
-		v -- todo
+		v -- [page:todo Vector3]
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		Returns the angle between this vector and vector v in radians.
 		</div>
 		</div>
 
 
-		<h3>.getColumnFromMatrix([page:todo index], [page:todo matrix]) [page:todo]</h3>
+		<h3>.getColumnFromMatrix([page:todo index], [page:todo matrix]) [page:todo this]</h3>
 		<div>
 		<div>
-		index -- todo <br />
-		matrix -- todo
+		index -- 0, 1, 2, or 3 <br />
+		matrix -- [page:todo Matrix4]
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		Sets this vector's x, y, and z equal to the column of the matrix specified by the index.
 		</div>
 		</div>
 
 
-		<h3>.reflect([page:todo vector]) [page:todo]</h3>
+		<h3>.reflect([page:todo vector]) [page:todo this]</h3>
 		<div>
 		<div>
-		vector -- todo
+		vector -- [page:todo Vector3] the vector to reflect about
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		Reflects this vector about a vector.
 		</div>
 		</div>
 
 
-		<h3>.fromArray([page:todo array]) [page:todo]</h3>
+		<h3>.fromArray([page:todo array]) [page:todo this]</h3>
 		<div>
 		<div>
-		array -- todo
+		array -- [page:todo Array]
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		Assigns this vectors x value to array[0]. <br />
+		Assigns this vectors y value to array[1]. <br />
+		Assigns this vectors z value to array[2]. <br />
 		</div>
 		</div>
 
 
-		<h3>.multiply([page:todo v], [page:todo w]) [page:todo]</h3>
+		<h3>.multiply([page:todo v]) [page:todo this]</h3>
 		<div>
 		<div>
-		v -- todo <br />
-		w -- todo
+		v -- [page:todo Vector3] <br />
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		Multipies this vector by vector v.
 		</div>
 		</div>
 
 
-		<h3>.applyProjection([page:todo m]) [page:todo]</h3>
+		<h3>.applyProjection([page:todo m]) [page:todo ths]</h3>
 		<div>
 		<div>
-		m -- todo
+		m -- [page:todo Matrix4] projection matrix.
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		Multiplies this vector and m, and divides by perspective.
 		</div>
 		</div>
 
 
-		<h3>.setEulerFromRotationMatrix([page:todo m], [page:todo order]) [page:todo]</h3>
+		<h3>.toArray() [page:todo Array]</h3>
 		<div>
 		<div>
-		m -- todo <br />
-		order -- todo
-		</div>
-		<div>
-		todo
-		</div>
-
-		<h3>.toArray() [page:todo]</h3>
-		<div>
-		todo
-		</div>
-
-		<h3>.applyEuler([page:todo v], [page:todo eulerOrder]) [page:todo]</h3>
-		<div>
-		v -- todo <br />
-		eulerOrder -- todo
-		</div>
-		<div>
-		todo
+		Assigns this vector's x value to array[0]. <br />
+		Assigns this vector's y value to array[1]. <br />
+		Assigns this vector's z value to array[2]. <br />
+		Returns the created array.
 		</div>
 		</div>
 
 
-		<h3>.applyQuaternion([page:todo q]) [page:todo]</h3>
+		<h3>.applyEuler( [page:todo euler] ) [page:todo this]</h3>
 		<div>
 		<div>
-		q -- todo
+		euler -- [page:todo Euler]
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		Applies euler transform to this vector by converting the [page:Euler] obect to a [page:Quaternion] and applying.
 		</div>
 		</div>
 
 
-		<h3>.setEulerFromQuaternion([page:todo q], [page:todo order]) [page:todo]</h3>
+		<h3>.applyQuaternion([page:todo q]) [page:todo this]</h3>
 		<div>
 		<div>
-		q -- todo <br />
-		order -- todo
+		q -- [page:Quaternion]
 		</div>
 		</div>
 		<div>
 		<div>
-		todo
+		Applies a [page:Quaternion] transform to this vector.
 		</div>
 		</div>
 
 
 		<h2>Source</h2>
 		<h2>Source</h2>