|
@@ -77,19 +77,19 @@ var d = a.distanceTo( b );
|
|
|
|
|
|
<h2>Methods</h2>
|
|
<h2>Methods</h2>
|
|
|
|
|
|
- <h3>[method:Vector3 add]( [page:Vector3 v] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 add]( [param:Vector3 v] )</h3>
|
|
<div>Adds [page:Vector3 v] to this vector.</div>
|
|
<div>Adds [page:Vector3 v] to this vector.</div>
|
|
|
|
|
|
- <h3>[method:Vector3 addScalar]( [page:Float s] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 addScalar]( [param:Float s] )</h3>
|
|
<div>Adds the scalar value s to this vector's [page:.x x], [page:.y y] and [page:.z z] values.</div>
|
|
<div>Adds the scalar value s to this vector's [page:.x x], [page:.y y] and [page:.z z] values.</div>
|
|
|
|
|
|
- <h3>[method:Vector3 addScaledVector]( [page:Vector3 v], [page:Float s] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 addScaledVector]( [param:Vector3 v], [param:Float s] )</h3>
|
|
<div>Adds the multiple of [page:Vector3 v] and [page:Float s] to this vector.</div>
|
|
<div>Adds the multiple of [page:Vector3 v] and [page:Float s] to this vector.</div>
|
|
|
|
|
|
- <h3>[method:Vector3 addVectors]( [page:Vector3 a], [page:Vector3 b] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 addVectors]( [param:Vector3 a], [param:Vector3 b] )</h3>
|
|
<div>Sets this vector to [page:Vector3 a] + [page:Vector3 b].</div>
|
|
<div>Sets this vector to [page:Vector3 a] + [page:Vector3 b].</div>
|
|
|
|
|
|
- <h3>[method:Vector3 applyAxisAngle]( [page:Vector3 axis], [page:Float angle] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 applyAxisAngle]( [param:Vector3 axis], [param:Float angle] )</h3>
|
|
<div>
|
|
<div>
|
|
[page:Vector3 axis] - A normalized [page:Vector3].<br />
|
|
[page:Vector3 axis] - A normalized [page:Vector3].<br />
|
|
[page:Float angle] - An angle in radians.<br /><br />
|
|
[page:Float angle] - An angle in radians.<br /><br />
|
|
@@ -97,27 +97,27 @@ var d = a.distanceTo( b );
|
|
Applies a rotation specified by an axis and an angle to this vector.
|
|
Applies a rotation specified by an axis and an angle to this vector.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 applyEuler]( [page:Euler euler] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 applyEuler]( [param:Euler euler] )</h3>
|
|
<div>
|
|
<div>
|
|
Applies euler transform to this vector by converting the [page:Euler] object to a
|
|
Applies euler transform to this vector by converting the [page:Euler] object to a
|
|
[page:Quaternion] and applying.
|
|
[page:Quaternion] and applying.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 applyMatrix3]( [page:Matrix3 m] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 applyMatrix3]( [param:Matrix3 m] )</h3>
|
|
<div>Multiplies this vector by [page:Matrix3 m]</div>
|
|
<div>Multiplies this vector by [page:Matrix3 m]</div>
|
|
|
|
|
|
- <h3>[method:Vector3 applyMatrix4]( [page:Matrix4 m] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 applyMatrix4]( [param:Matrix4 m] )</h3>
|
|
<div>
|
|
<div>
|
|
Multiplies this vector (with an implicit 1 in the 4th dimension) and m, and divides by perspective.
|
|
Multiplies this vector (with an implicit 1 in the 4th dimension) and m, and divides by perspective.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 applyQuaternion]( [page:Quaternion quaternion] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 applyQuaternion]( [param:Quaternion quaternion] )</h3>
|
|
<div>
|
|
<div>
|
|
Applies a [page:Quaternion] transform to this vector.
|
|
Applies a [page:Quaternion] transform to this vector.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
- <h3>[method:Float angleTo]( [page:Vector3 v] )</h3>
|
|
|
|
|
|
+ <h3>[method:Float angleTo]( [param:Vector3 v] )</h3>
|
|
<div>
|
|
<div>
|
|
Returns the angle between this vector and vector [page:Vector3 v] in radians.
|
|
Returns the angle between this vector and vector [page:Vector3 v] in radians.
|
|
</div>
|
|
</div>
|
|
@@ -127,7 +127,7 @@ var d = a.distanceTo( b );
|
|
The [page:.x x], [page:.y y] and [page:.z z] components of the vector are rounded up to the nearest integer value.
|
|
The [page:.x x], [page:.y y] and [page:.z z] components of the vector are rounded up to the nearest integer value.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 clamp]( [page:Vector3 min], [page:Vector3 max] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 clamp]( [param:Vector3 min], [param:Vector3 max] )</h3>
|
|
<div>
|
|
<div>
|
|
[page:Vector3 min] - the minimum [page:.x x], [page:.y y] and [page:.z z] values.<br />
|
|
[page:Vector3 min] - the minimum [page:.x x], [page:.y y] and [page:.z z] values.<br />
|
|
[page:Vector3 max] - the maximum [page:.x x], [page:.y y] and [page:.z z] values in the desired range<br /><br />
|
|
[page:Vector3 max] - the maximum [page:.x x], [page:.y y] and [page:.z z] values in the desired range<br /><br />
|
|
@@ -136,7 +136,7 @@ var d = a.distanceTo( b );
|
|
If this vector's x, y or z value is less than the min vector's x, y or z value, it is replaced by the corresponding value.
|
|
If this vector's x, y or z value is less than the min vector's x, y or z value, it is replaced by the corresponding value.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 clampLength]( [page:Float min], [page:Float max] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 clampLength]( [param:Float min], [param:Float max] )</h3>
|
|
<div>
|
|
<div>
|
|
[page:Float min] - the minimum value the length will be clamped to <br />
|
|
[page:Float min] - the minimum value the length will be clamped to <br />
|
|
[page:Float max] - the maximum value the length will be clamped to<br /><br />
|
|
[page:Float max] - the maximum value the length will be clamped to<br /><br />
|
|
@@ -145,7 +145,7 @@ var d = a.distanceTo( b );
|
|
If this vector's length is less than the min value, it is replaced by the min value.
|
|
If this vector's length is less than the min value, it is replaced by the min value.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 clampScalar]( [page:Float min], [page:Float max] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 clampScalar]( [param:Float min], [param:Float max] )</h3>
|
|
<div>
|
|
<div>
|
|
[page:Float min] - the minimum value the components will be clamped to <br />
|
|
[page:Float min] - the minimum value the components will be clamped to <br />
|
|
[page:Float max] - the maximum value the components will be clamped to<br /><br />
|
|
[page:Float max] - the maximum value the components will be clamped to<br /><br />
|
|
@@ -159,59 +159,59 @@ var d = a.distanceTo( b );
|
|
Returns a new vector3 with the same [page:.x x], [page:.y y] and [page:.z z] values as this one.
|
|
Returns a new vector3 with the same [page:.x x], [page:.y y] and [page:.z z] values as this one.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 copy]( [page:Vector3 v] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 copy]( [param:Vector3 v] )</h3>
|
|
<div>
|
|
<div>
|
|
Copies the values of the passed vector3's [page:.x x], [page:.y y] and [page:.z z]
|
|
Copies the values of the passed vector3's [page:.x x], [page:.y y] and [page:.z z]
|
|
properties to this vector3.
|
|
properties to this vector3.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 cross]( [page:Vector3 v] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 cross]( [param:Vector3 v] )</h3>
|
|
<div>
|
|
<div>
|
|
Sets this vector to [link:https://en.wikipedia.org/wiki/Cross_product cross product] of itself and [page:Vector3 v].
|
|
Sets this vector to [link:https://en.wikipedia.org/wiki/Cross_product cross product] of itself and [page:Vector3 v].
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 crossVectors]( [page:Vector3 a], [page:Vector3 b] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 crossVectors]( [param:Vector3 a], [param:Vector3 b] )</h3>
|
|
<div>
|
|
<div>
|
|
Sets this vector to [link:https://en.wikipedia.org/wiki/Cross_product cross product] of [page:Vector3 a] and [page:Vector3 b].
|
|
Sets this vector to [link:https://en.wikipedia.org/wiki/Cross_product cross product] of [page:Vector3 a] and [page:Vector3 b].
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Float distanceTo]( [page:Vector3 v] )</h3>
|
|
|
|
|
|
+ <h3>[method:Float distanceTo]( [param:Vector3 v] )</h3>
|
|
<div>Computes the distance from this vector to [page:Vector3 v].</div>
|
|
<div>Computes the distance from this vector to [page:Vector3 v].</div>
|
|
|
|
|
|
- <h3>[method:Float manhattanDistanceTo]( [page:Vector3 v] )</h3>
|
|
|
|
|
|
+ <h3>[method:Float manhattanDistanceTo]( [param:Vector3 v] )</h3>
|
|
<div>
|
|
<div>
|
|
Computes the [link:https://en.wikipedia.org/wiki/Taxicab_geometry Manhattan distance] from this vector to [page:Vector3 v].
|
|
Computes the [link:https://en.wikipedia.org/wiki/Taxicab_geometry Manhattan distance] from this vector to [page:Vector3 v].
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Float distanceToSquared]( [page:Vector3 v] )</h3>
|
|
|
|
|
|
+ <h3>[method:Float distanceToSquared]( [param:Vector3 v] )</h3>
|
|
<div>
|
|
<div>
|
|
Computes the squared distance from this vector to [page:Vector3 v]. If you are just
|
|
Computes the squared distance from this vector to [page:Vector3 v]. If you are just
|
|
comparing the distance with another distance, you should compare the distance squared instead
|
|
comparing the distance with another distance, you should compare the distance squared instead
|
|
as it is slightly more efficient to calculate.
|
|
as it is slightly more efficient to calculate.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 divide]( [page:Vector3 v] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 divide]( [param:Vector3 v] )</h3>
|
|
<div>Divides this vector by [page:Vector3 v].</div>
|
|
<div>Divides this vector by [page:Vector3 v].</div>
|
|
|
|
|
|
- <h3>[method:Vector3 divideScalar]( [page:Float s] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 divideScalar]( [param:Float s] )</h3>
|
|
<div>
|
|
<div>
|
|
Divides this vector by scalar [page:Float s].<br />
|
|
Divides this vector by scalar [page:Float s].<br />
|
|
Sets vector to *( 0, 0, 0 )* if *[page:Float s] = 0*.
|
|
Sets vector to *( 0, 0, 0 )* if *[page:Float s] = 0*.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Float dot]( [page:Vector3 v] )</h3>
|
|
|
|
|
|
+ <h3>[method:Float dot]( [param:Vector3 v] )</h3>
|
|
<div>
|
|
<div>
|
|
Calculate the [link:https://en.wikipedia.org/wiki/Dot_product dot product] of this
|
|
Calculate the [link:https://en.wikipedia.org/wiki/Dot_product dot product] of this
|
|
vector and [page:Vector3 v].
|
|
vector and [page:Vector3 v].
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Boolean equals]( [page:Vector3 v] )</h3>
|
|
|
|
|
|
+ <h3>[method:Boolean equals]( [param:Vector3 v] )</h3>
|
|
<div>Checks for strict equality of this vector and [page:Vector3 v].</div>
|
|
<div>Checks for strict equality of this vector and [page:Vector3 v].</div>
|
|
|
|
|
|
<h3>[method:Vector3 floor]()</h3>
|
|
<h3>[method:Vector3 floor]()</h3>
|
|
<div>The components of the vector are rounded down to the nearest integer value.</div>
|
|
<div>The components of the vector are rounded down to the nearest integer value.</div>
|
|
|
|
|
|
- <h3>[method:Vector3 fromArray]( [page:Array array], [page:Integer offset] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 fromArray]( [param:Array array], [param:Integer offset] )</h3>
|
|
<div>
|
|
<div>
|
|
[page:Array array] - the source array.<br />
|
|
[page:Array array] - the source array.<br />
|
|
[page:Integer offset] - ( optional) offset into the array. Default is 0.<br /><br />
|
|
[page:Integer offset] - ( optional) offset into the array. Default is 0.<br /><br />
|
|
@@ -220,7 +220,7 @@ var d = a.distanceTo( b );
|
|
and [page:.z z] value to be array[ offset + 2 ].
|
|
and [page:.z z] value to be array[ offset + 2 ].
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 fromBufferAttribute]( [page:BufferAttribute attribute], [page:Integer index] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 fromBufferAttribute]( [param:BufferAttribute attribute], [param:Integer index] )</h3>
|
|
<div>
|
|
<div>
|
|
[page:BufferAttribute attribute] - the source attribute.<br />
|
|
[page:BufferAttribute attribute] - the source attribute.<br />
|
|
[page:Integer index] - index in the attribute.<br /><br />
|
|
[page:Integer index] - index in the attribute.<br /><br />
|
|
@@ -228,7 +228,7 @@ var d = a.distanceTo( b );
|
|
Sets this vector's [page:.x x], [page:.y y] and [page:.z z] values from the [page:BufferAttribute attribute].
|
|
Sets this vector's [page:.x x], [page:.y y] and [page:.z z] values from the [page:BufferAttribute attribute].
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Float getComponent]( [page:Integer index] )</h3>
|
|
|
|
|
|
+ <h3>[method:Float getComponent]( [param:Integer index] )</h3>
|
|
<div>
|
|
<div>
|
|
[page:Integer index] - 0, 1 or 2.<br /><br />
|
|
[page:Integer index] - 0, 1 or 2.<br /><br />
|
|
|
|
|
|
@@ -253,7 +253,7 @@ var d = a.distanceTo( b );
|
|
vectors, you should compare the length squared instead as it is slightly more efficient to calculate.
|
|
vectors, you should compare the length squared instead as it is slightly more efficient to calculate.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 lerp]( [page:Vector3 v], [page:Float alpha] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 lerp]( [param:Vector3 v], [param:Float alpha] )</h3>
|
|
<div>
|
|
<div>
|
|
[page:Vector3 v] - [page:Vector3] to interpolate towards.<br />
|
|
[page:Vector3 v] - [page:Vector3] to interpolate towards.<br />
|
|
alpha - interpolation factor in the closed interval [0, 1].<br /><br />
|
|
alpha - interpolation factor in the closed interval [0, 1].<br /><br />
|
|
@@ -262,7 +262,7 @@ var d = a.distanceTo( b );
|
|
distance along the line - alpha = 0 will be this vector, and alpha = 1 will be [page:Vector3 v].
|
|
distance along the line - alpha = 0 will be this vector, and alpha = 1 will be [page:Vector3 v].
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 lerpVectors]( [page:Vector3 v1], [page:Vector3 v2], [page:Float alpha] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 lerpVectors]( [param:Vector3 v1], [param:Vector3 v2], [param:Float alpha] )</h3>
|
|
<div>
|
|
<div>
|
|
[page:Vector3 v1] - the starting [page:Vector3].<br />
|
|
[page:Vector3 v1] - the starting [page:Vector3].<br />
|
|
[page:Vector3 v2] - [page:Vector3] to interpolate towards.<br />
|
|
[page:Vector3 v2] - [page:Vector3] to interpolate towards.<br />
|
|
@@ -282,35 +282,35 @@ var d = a.distanceTo( b );
|
|
as this one, but [page:.length length] 1.
|
|
as this one, but [page:.length length] 1.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 max]( [page:Vector3 v] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 max]( [param:Vector3 v] )</h3>
|
|
<div>
|
|
<div>
|
|
If this vector's x, y or z value is less than [page:Vector3 v]'s x, y or z value, replace
|
|
If this vector's x, y or z value is less than [page:Vector3 v]'s x, y or z value, replace
|
|
that value with the corresponding max value.
|
|
that value with the corresponding max value.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 min]( [page:Vector3 v] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 min]( [param:Vector3 v] )</h3>
|
|
<div>
|
|
<div>
|
|
If this vector's x, y or z value is greater than [page:Vector3 v]'s x, y or z value, replace
|
|
If this vector's x, y or z value is greater than [page:Vector3 v]'s x, y or z value, replace
|
|
that value with the corresponding min value.
|
|
that value with the corresponding min value.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 multiply]( [page:Vector3 v] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 multiply]( [param:Vector3 v] )</h3>
|
|
<div>Multiplies this vector by [page:Vector3 v].</div>
|
|
<div>Multiplies this vector by [page:Vector3 v].</div>
|
|
|
|
|
|
- <h3>[method:Vector3 multiplyScalar]( [page:Float s] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 multiplyScalar]( [param:Float s] )</h3>
|
|
<div>Multiplies this vector by scalar [page:Float s].</div>
|
|
<div>Multiplies this vector by scalar [page:Float s].</div>
|
|
|
|
|
|
- <h3>[method:Vector3 multiplyVectors]( [page:Vector3 a], [page:Vector3 b] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 multiplyVectors]( [param:Vector3 a], [param:Vector3 b] )</h3>
|
|
<div>Sets this vector equal to [page:Vector3 a] * [page:Vector3 b], component-wise.</div>
|
|
<div>Sets this vector equal to [page:Vector3 a] * [page:Vector3 b], component-wise.</div>
|
|
|
|
|
|
- <h3>[method:Vector3 project]( [page:Camera camera] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 project]( [param:Camera camera] )</h3>
|
|
<div>
|
|
<div>
|
|
[page:Camera camera] — camera to use in the projection.<br /><br />
|
|
[page:Camera camera] — camera to use in the projection.<br /><br />
|
|
|
|
|
|
[link:https://en.wikipedia.org/wiki/Vector_projection Projects] the vector with the camera.
|
|
[link:https://en.wikipedia.org/wiki/Vector_projection Projects] the vector with the camera.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 projectOnPlane]( [page:Vector3 planeNormal] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 projectOnPlane]( [param:Vector3 planeNormal] )</h3>
|
|
<div>
|
|
<div>
|
|
[page:Vector3 planeNormal] - A vector representing a plane normal.<br /><br />
|
|
[page:Vector3 planeNormal] - A vector representing a plane normal.<br /><br />
|
|
|
|
|
|
@@ -318,10 +318,10 @@ var d = a.distanceTo( b );
|
|
normal from this vector.
|
|
normal from this vector.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 projectOnVector]( [page:Vector3] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 projectOnVector]( [param:Vector3] )</h3>
|
|
<div>[link:https://en.wikipedia.org/wiki/Vector_projection Projects] this vector onto another vector.</div>
|
|
<div>[link:https://en.wikipedia.org/wiki/Vector_projection Projects] this vector onto another vector.</div>
|
|
|
|
|
|
- <h3>[method:Vector3 reflect]( [page:Vector3 normal] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 reflect]( [param:Vector3 normal] )</h3>
|
|
<div>
|
|
<div>
|
|
[page:Vector3 normal] - the normal to the reflecting plane<br /><br />
|
|
[page:Vector3 normal] - the normal to the reflecting plane<br /><br />
|
|
|
|
|
|
@@ -337,10 +337,10 @@ var d = a.distanceTo( b );
|
|
The components of the vector are rounded towards zero (up if negative, down if positive) to an integer value.
|
|
The components of the vector are rounded towards zero (up if negative, down if positive) to an integer value.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 set]( [page:Float x], [page:Float y], [page:Float z] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 set]( [param:Float x], [param:Float y], [param:Float z] )</h3>
|
|
<div>Sets the [page:.x x], [page:.y y] and [page:.z z] components of this vector.</div>
|
|
<div>Sets the [page:.x x], [page:.y y] and [page:.z z] components of this vector.</div>
|
|
|
|
|
|
- <h3>[method:null setComponent]( [page:Integer index], [page:Float value] )</h3>
|
|
|
|
|
|
+ <h3>[method:null setComponent]( [param:Integer index], [param:Float value] )</h3>
|
|
<div>
|
|
<div>
|
|
[page:Integer index] - 0, 1 or 2.<br />
|
|
[page:Integer index] - 0, 1 or 2.<br />
|
|
[page:Float value] - [page:Float]<br /><br />
|
|
[page:Float value] - [page:Float]<br /><br />
|
|
@@ -350,64 +350,64 @@ var d = a.distanceTo( b );
|
|
If index equals 2 set [page:.z z] to [page:Float value]
|
|
If index equals 2 set [page:.z z] to [page:Float value]
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 setFromCylindrical]( [page:Cylindrical c] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 setFromCylindrical]( [param:Cylindrical c] )</h3>
|
|
<div>
|
|
<div>
|
|
Sets this vector from the cylindrical coordinates [page:Cylindrical c].
|
|
Sets this vector from the cylindrical coordinates [page:Cylindrical c].
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 setFromMatrixColumn]( [page:Matrix4 matrix], [page:Integer index] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 setFromMatrixColumn]( [param:Matrix4 matrix], [param:Integer index] )</h3>
|
|
<div>
|
|
<div>
|
|
Sets this vector's [page:.x x], [page:.y y] and [page:.z z] equal to the column of
|
|
Sets this vector's [page:.x x], [page:.y y] and [page:.z z] equal to the column of
|
|
the [page:Matrix4 matrix] specified by the [page:Integer index].
|
|
the [page:Matrix4 matrix] specified by the [page:Integer index].
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 setFromMatrixPosition]( [page:Matrix4 m] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 setFromMatrixPosition]( [param:Matrix4 m] )</h3>
|
|
<div>
|
|
<div>
|
|
Sets this vector to the position elements of the
|
|
Sets this vector to the position elements of the
|
|
[link:https://en.wikipedia.org/wiki/Transformation_matrix transformation matrix] [page:Matrix4 m].
|
|
[link:https://en.wikipedia.org/wiki/Transformation_matrix transformation matrix] [page:Matrix4 m].
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 setFromMatrixScale]( [page:Matrix4 m] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 setFromMatrixScale]( [param:Matrix4 m] )</h3>
|
|
<div>
|
|
<div>
|
|
Sets this vector to the scale elements of the
|
|
Sets this vector to the scale elements of the
|
|
[link:https://en.wikipedia.org/wiki/Transformation_matrix transformation matrix] [page:Matrix4 m].
|
|
[link:https://en.wikipedia.org/wiki/Transformation_matrix transformation matrix] [page:Matrix4 m].
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 setFromSpherical]( [page:Spherical s] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 setFromSpherical]( [param:Spherical s] )</h3>
|
|
<div>
|
|
<div>
|
|
Sets this vector from the spherical coordinates [page:Spherical s].
|
|
Sets this vector from the spherical coordinates [page:Spherical s].
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 setLength]( [page:Float l] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 setLength]( [param:Float l] )</h3>
|
|
<div>
|
|
<div>
|
|
Set this vector to the vector with the same direction as this one, but [page:.length length]
|
|
Set this vector to the vector with the same direction as this one, but [page:.length length]
|
|
[page:Float l].
|
|
[page:Float l].
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 setScalar]( [page:Float scalar] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 setScalar]( [param:Float scalar] )</h3>
|
|
<div>
|
|
<div>
|
|
Set the [page:.x x], [page:.y y] and [page:.z z] values of this vector both equal to [page:Float scalar].
|
|
Set the [page:.x x], [page:.y y] and [page:.z z] values of this vector both equal to [page:Float scalar].
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 setX]( [page:Float x] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 setX]( [param:Float x] )</h3>
|
|
<div>Replace this vector's [page:.x x] value with [page:Float x].</div>
|
|
<div>Replace this vector's [page:.x x] value with [page:Float x].</div>
|
|
|
|
|
|
- <h3>[method:Vector3 setY]( [page:Float y] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 setY]( [param:Float y] )</h3>
|
|
<div>Replace this vector's [page:.y y] value with [page:Float y].</div>
|
|
<div>Replace this vector's [page:.y y] value with [page:Float y].</div>
|
|
|
|
|
|
- <h3>[method:Vector3 setZ]( [page:Float z] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 setZ]( [param:Float z] )</h3>
|
|
<div>Replace this vector's [page:.z z] value with [page:Float z].</div>
|
|
<div>Replace this vector's [page:.z z] value with [page:Float z].</div>
|
|
|
|
|
|
- <h3>[method:Vector3 sub]( [page:Vector3 v] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 sub]( [param:Vector3 v] )</h3>
|
|
<div>Subtracts [page:Vector3 v] from this vector.</div>
|
|
<div>Subtracts [page:Vector3 v] from this vector.</div>
|
|
|
|
|
|
- <h3>[method:Vector3 subScalar]( [page:Float s] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 subScalar]( [param:Float s] )</h3>
|
|
<div>Subtracts [page:Float s] from this vector's [page:.x x], [page:.y y] and [page:.z z] compnents.</div>
|
|
<div>Subtracts [page:Float s] from this vector's [page:.x x], [page:.y y] and [page:.z z] compnents.</div>
|
|
|
|
|
|
- <h3>[method:Vector3 subVectors]( [page:Vector3 a], [page:Vector3 b] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 subVectors]( [param:Vector3 a], [param:Vector3 b] )</h3>
|
|
<div>Sets this vector to [page:Vector3 a] - [page:Vector3 b].</div>
|
|
<div>Sets this vector to [page:Vector3 a] - [page:Vector3 b].</div>
|
|
|
|
|
|
- <h3>[method:Array toArray]( [page:Array array], [page:Integer offset] )</h3>
|
|
|
|
|
|
+ <h3>[method:Array toArray]( [param:Array array], [param:Integer offset] )</h3>
|
|
<div>
|
|
<div>
|
|
[page:Array array] - (optional) array to store the vector to. If this is not provided
|
|
[page:Array array] - (optional) array to store the vector to. If this is not provided
|
|
a new array will be created.<br />
|
|
a new array will be created.<br />
|
|
@@ -416,13 +416,13 @@ var d = a.distanceTo( b );
|
|
Returns an array [x, y, z], or copies x, y and z into the provided [page:Array array].
|
|
Returns an array [x, y, z], or copies x, y and z into the provided [page:Array array].
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 transformDirection]( [page:Matrix4 m] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 transformDirection]( [param:Matrix4 m] )</h3>
|
|
<div>
|
|
<div>
|
|
Transforms the direction of this vector by a matrix (the upper left 3 x 3 subset of a [page:Matrix4 m])
|
|
Transforms the direction of this vector by a matrix (the upper left 3 x 3 subset of a [page:Matrix4 m])
|
|
and then [page:.normalize normalizes] the result.
|
|
and then [page:.normalize normalizes] the result.
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <h3>[method:Vector3 unproject]( [page:Camera camera] )</h3>
|
|
|
|
|
|
+ <h3>[method:Vector3 unproject]( [param:Camera camera] )</h3>
|
|
<div>
|
|
<div>
|
|
[page:Camera camera] — camera to use in the projection.<br /><br />
|
|
[page:Camera camera] — camera to use in the projection.<br /><br />
|
|
|
|
|