|
@@ -47,140 +47,140 @@
|
|
|
|
|
|
<h2>Methods</h2>
|
|
|
|
|
|
- <h3>.set( [page:Float x], [page:Float y], [page:Float z] ) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 set]( [page:Float x], [page:Float y], [page:Float z] ) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
Sets value of this vector.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.setX( [page:Float x] ) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 setX]( [page:Float x] ) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
Sets x value of this vector.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.setY( [page:Float y] ) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 setY]( [page:Float y] ) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
Sets y value of this vector.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.setZ( [page:Float z] ) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 setZ]( [page:Float z] ) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
Sets z value of this vector.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.copy( [page:Vector3 v] ) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 copy]( [page:Vector3 v] ) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
Copies value of *v* to this vector.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.add( [page:Vector3 v] ) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 add]( [page:Vector3 v] ) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
Adds *v* to this vector.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.addVectors( [page:Vector3 a], [page:Vector3 b] ) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 addVectors]( [page:Vector3 a], [page:Vector3 b] ) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
Sets this vector to *a + b*.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.sub( [page:Vector3 v] ) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 sub]( [page:Vector3 v] ) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
Subtracts *v* from this vector.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.subVectors( [page:Vector3 a], [page:Vector3 b] ) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 subVectors]( [page:Vector3 a], [page:Vector3 b] ) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
Sets this vector to *a - b*.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.multiplyScalar( [page:Float s] ) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 multiplyScalar]( [page:Float s] ) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
Multiplies this vector by scalar *s*.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.divideScalar( [page:Float s] ) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 divideScalar]( [page:Float s] ) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
Divides this vector by scalar *s*.<br />
|
|
|
Set vector to *( 0, 0, 0 )* if *s == 0*.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.negate() [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 negate]() [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
Inverts this vector.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.dot( [page:Vector3 v] ) [page:Float]</h3>
|
|
|
+ <h3>[method:Float dot]( [page:Vector3 v] )</h3>
|
|
|
<div>
|
|
|
Computes dot product of this vector and *v*.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.lengthSq() [page:Float]</h3>
|
|
|
+ <h3>[method:Float lengthSq]()</h3>
|
|
|
<div>
|
|
|
Computes squared length of this vector.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.length() [page:Float]</h3>
|
|
|
+ <h3>[method:Float length]()</h3>
|
|
|
<div>
|
|
|
Computes length of this vector.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.lengthManhattan() [page:Float]</h3>
|
|
|
+ <h3>[method:Float lengthManhattan]()</h3>
|
|
|
<div>
|
|
|
Computes Manhattan length of this vector.<br />
|
|
|
[link:http://en.wikipedia.org/wiki/Taxicab_geometry]
|
|
|
</div>
|
|
|
|
|
|
- <h3>.normalize() [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 normalize]() [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
Normalizes this vector. Transforms this Vector into a Unit vector by dividing the vector by it's length.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.distanceTo( [page:Vector3 v] ) [page:Float]</h3>
|
|
|
+ <h3>[method:Float distanceTo]( [page:Vector3 v] )</h3>
|
|
|
<div>
|
|
|
Computes distance of this vector to *v*.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.distanceToSquared( [page:Vector3 v] ) [page:Float]</h3>
|
|
|
+ <h3>[method:Float distanceToSquared]( [page:Vector3 v] )</h3>
|
|
|
<div>
|
|
|
Computes squared distance of this vector to *v*.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.setLength( [page:Float l] ) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 setLength]( [page:Float l] ) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
Normalizes this vector and multiplies it by *l*.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.cross( [page:Vector3 v] ) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 cross]( [page:Vector3 v] ) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
Sets this vector to cross product of itself and *v*.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.crossVectors( [page:Vector3 a], [page:Vector3 b] ) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 crossVectors]( [page:Vector3 a], [page:Vector3 b] ) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
Sets this vector to cross product of *a* and *b*.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.setFromMatrixPosition( [page:Matrix4 m] ) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 setFromMatrixPosition]( [page:Matrix4 m] ) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
Sets this vector extracting position from matrix transform.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.setFromMatrixScale( [page:Matrix4 m] ) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 setFromMatrixScale]( [page:Matrix4 m] ) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
Sets this vector extracting scale from matrix transform.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.equals( [page:Vector3 v] ) [page:Boolean]</h3>
|
|
|
+ <h3>[method:Boolean equals]( [page:Vector3 v] )</h3>
|
|
|
<div>
|
|
|
Checks for strict equality of this vector and *v*.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.clone() [page:Vector3]</h3>
|
|
|
+ <h3>[method:Vector3 clone]()</h3>
|
|
|
<div>
|
|
|
Clones this vector.
|
|
|
</div>
|
|
|
|
|
|
|
|
|
- <h3>.clamp([page:Vector3 min], [page:Vector3 max]) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 clamp]([page:Vector3 min], [page:Vector3 max]) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
min -- [page:Vector3] <br />
|
|
|
max -- [page:Vector3]
|
|
@@ -190,7 +190,7 @@
|
|
|
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>
|
|
|
|
|
|
- <h3>.clampScalar([page:Float min], [page:Float max]) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 clampScalar]([page:Float min], [page:Float max]) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
min -- [page:Float] the minimum value the components will be clamped to <br />
|
|
|
max -- [page:Float] the maximum value the components will be clamped to
|
|
@@ -199,27 +199,27 @@
|
|
|
If this vector's x, y or z values are greater than the max value, they are replaced by the max value. <br /> If this vector's x, y or z values are less than the min value, they are replace by the min value.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.floor() [page:Vector3]</h3>
|
|
|
+ <h3>[method:Vector3 floor]()</h3>
|
|
|
<div>
|
|
|
The components of the vector are rounded downwards (towards negative infinity) to an integer value.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.ceil() [page:Vector3]</h3>
|
|
|
+ <h3>[method:Vector3 ceil]()</h3>
|
|
|
<div>
|
|
|
The components of the vector are rounded upwards (towards positive infinity) to an integer value.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.round() [page:Vector3]</h3>
|
|
|
+ <h3>[method:Vector3 round]()</h3>
|
|
|
<div>
|
|
|
The components of the vector are rounded towards the nearest integer value.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.roundToZero() [page:Vector3]</h3>
|
|
|
+ <h3>[method:Vector3 roundToZero]()</h3>
|
|
|
<div>
|
|
|
The components of the vector are rounded towards zero (up if negative, down if positive) to an integer value.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.applyMatrix3([page:Matrix3 m]) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 applyMatrix3]([page:Matrix3 m]) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
m -- [page:Matrix3]
|
|
|
</div>
|
|
@@ -227,7 +227,7 @@
|
|
|
Multiplies this vector times a 3 x 3 matrix.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.applyMatrix4([page:Matrix3 m]) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 applyMatrix4]([page:Matrix3 m]) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
m -- [page:Matrix4]
|
|
|
</div>
|
|
@@ -235,7 +235,7 @@
|
|
|
Multiplies this vector by 4 x 3 subset of a Matrix4.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.projectOnPlane([page:Vector3 planeNormal]) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 projectOnPlane]([page:Vector3 planeNormal]) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
planeNormal -- [page:Vector3 planeNormal] A vector representing a plane normal.
|
|
|
</div>
|
|
@@ -243,7 +243,7 @@
|
|
|
Projects this vector onto a plane by subtracting this vector projected onto the plane's normal from this vector.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.projectOnVector([page:Vector3]) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 projectOnVector]([page:Vector3]) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
vector -- [page:Vector3]
|
|
|
</div>
|
|
@@ -251,7 +251,7 @@
|
|
|
Projects this vector onto another vector.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.addScalar([page:Float]) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 addScalar]([page:Float]) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
s -- [page:Float]
|
|
|
</div>
|
|
@@ -259,7 +259,7 @@
|
|
|
Adds a s to this vector.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.divide([page:Vector3 v]) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 divide]([page:Vector3 v]) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
v -- [page:Vector3]
|
|
|
</div>
|
|
@@ -267,7 +267,7 @@
|
|
|
Divides this vector by vector v.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.min([page:Vector3 v]) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 min]([page:Vector3 v]) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
v -- [page:Vector3]
|
|
|
</div>
|
|
@@ -275,7 +275,7 @@
|
|
|
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>
|
|
|
|
|
|
- <h3>.max([page:Vector3 v]) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 max]([page:Vector3 v]) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
v -- [page:Vector3]
|
|
|
</div>
|
|
@@ -283,7 +283,7 @@
|
|
|
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>
|
|
|
|
|
|
- <h3>.setComponent([page:Integer index], [page:Float value]) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 setComponent]([page:Integer index], [page:Float value]) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
index -- 0, 1, or 2 <br />
|
|
|
value -- [page:Float]
|
|
@@ -294,7 +294,7 @@
|
|
|
If index equals 2 the method sets this vector's z value to value
|
|
|
</div>
|
|
|
|
|
|
- <h3>.transformDirection([page:Matrix4 m]) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 transformDirection]([page:Matrix4 m]) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
m -- [page:Matrix4]
|
|
|
</div>
|
|
@@ -302,7 +302,7 @@
|
|
|
Transforms the direction of this vector by a matrix (a 3 x 3 subset of a Matrix4) and then normalizes the result.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.multiplyVectors([page:Vector3 a], [page:Vector3 b]) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 multiplyVectors]([page:Vector3 a], [page:Vector3 b]) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
a -- [page:Vector3] <br />
|
|
|
b -- [page:Vector3]
|
|
@@ -311,7 +311,7 @@
|
|
|
Sets this vector equal to the result of multiplying vector a by vector b.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.getComponent([page:Integer index]) [page:Float]</h3>
|
|
|
+ <h3>[method:Float getComponent]([page:Integer index])</h3>
|
|
|
<div>
|
|
|
index -- [page:Integer] 0, 1, or 2
|
|
|
</div>
|
|
@@ -324,7 +324,7 @@
|
|
|
Index 2: z <br />
|
|
|
</div>
|
|
|
|
|
|
- <h3>.applyAxisAngle([page:Vector3 axis], [page:Float angle]) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 applyAxisAngle]([page:Vector3 axis], [page:Float angle]) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
axis -- A normalized [page:Vector3] <br />
|
|
|
angle -- An angle in radians
|
|
@@ -333,7 +333,7 @@
|
|
|
Applies a rotation specified by an axis and an angle to this vector.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.lerp([page:Vector3 v], [page:Float alpha]) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 lerp]([page:Vector3 v], [page:Float alpha]) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
v -- [page:Vector3] <br />
|
|
|
alpha -- [page:Float] between 0 and 1.
|
|
@@ -342,7 +342,7 @@
|
|
|
Linear Interpolation between this vector and vector v, where alpha is the percent along the line.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.angleTo([page:Vector3 v]) [page:Float]</h3>
|
|
|
+ <h3>[method:Float angleTo]([page:Vector3 v])</h3>
|
|
|
<div>
|
|
|
v -- [page:Vector3]
|
|
|
</div>
|
|
@@ -350,7 +350,7 @@
|
|
|
Returns the angle between this vector and vector v in radians.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.setFromMatrixColumn([page:Integer index], [page:Matrix4 matrix]) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 setFromMatrixColumn]([page:Integer index], [page:Matrix4 matrix]) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
index -- 0, 1, 2, or 3 <br />
|
|
|
matrix -- [page:Matrix4]
|
|
@@ -359,7 +359,7 @@
|
|
|
Sets this vector's x, y, and z equal to the column of the matrix specified by the index.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.reflect([page:Vector3 normal]) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 reflect]([page:Vector3 normal]) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
normal -- [page:Vector3] the normal to the reflecting plane
|
|
|
</div>
|
|
@@ -367,7 +367,7 @@
|
|
|
Reflect incident vector off of plane orthogonal to normal. normal is assumed to have unit length.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.fromArray([page:Array array]) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 fromArray]([page:Array array]) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
array -- [page:Array] [x, y, z]
|
|
|
</div>
|
|
@@ -375,7 +375,7 @@
|
|
|
Sets the vector's components based on an array formatted like [x, y, z]
|
|
|
</div>
|
|
|
|
|
|
- <h3>.multiply([page:Vector3 v]) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 multiply]([page:Vector3 v]) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
v -- [page:Vector3] <br />
|
|
|
</div>
|
|
@@ -383,7 +383,7 @@
|
|
|
Multipies this vector by vector v.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.applyProjection([page:Matrix4 m]) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 applyProjection]([page:Matrix4 m]) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
m -- [page:Matrix4] projection matrix.
|
|
|
</div>
|
|
@@ -391,7 +391,7 @@
|
|
|
Multiplies this vector and m, and divides by perspective.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.toArray() [page:Array]</h3>
|
|
|
+ <h3>[method:Array toArray]()</h3>
|
|
|
<div>
|
|
|
Assigns this vector's x value to array[0]. <br />
|
|
|
Assigns this vector's y value to array[1]. <br />
|
|
@@ -399,7 +399,7 @@
|
|
|
Returns the created array.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.applyEuler([page:Euler euler]) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 applyEuler]([page:Euler euler]) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
euler -- [page:Euler]
|
|
|
</div>
|
|
@@ -407,7 +407,7 @@
|
|
|
Applies euler transform to this vector by converting the [page:Euler] obect to a [page:Quaternion] and applying.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.applyQuaternion([page:Quaternion quaternion]) [page:Vector3 this]</h3>
|
|
|
+ <h3>[method:Vector3 applyQuaternion]([page:Quaternion quaternion]) [page:Vector3 this]</h3>
|
|
|
<div>
|
|
|
quaternion -- [page:Quaternion]
|
|
|
</div>
|
|
@@ -415,7 +415,7 @@
|
|
|
Applies a [page:Quaternion] transform to this vector.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.project( [page:Camera camera] ) [page:Vector3]</h3>
|
|
|
+ <h3>[method:Vector3 project]( [page:Camera camera] )</h3>
|
|
|
<div>
|
|
|
[page:Camera camera] — camera to use in the projection.<br />
|
|
|
</div>
|
|
@@ -423,7 +423,7 @@
|
|
|
Projects the vector with the camera.
|
|
|
</div>
|
|
|
|
|
|
- <h3>.unproject( [page:Camera camera] ) [page:Vector3]</h3>
|
|
|
+ <h3>[method:Vector3 unproject]( [page:Camera camera] )</h3>
|
|
|
<div>
|
|
|
[page:Camera camera] — camera to use in the projection.<br />
|
|
|
</div>
|