| Package | flare.utils |
| Class | public class Vector3DUtils |
| Inheritance | Vector3DUtils Object |
| Method | Defined By | ||
|---|---|---|---|
abs(a:Vector3D):void [static] | Vector3DUtils | ||
add(a:Vector3D, b:Vector3D, out:Vector3D = null):Vector3D [static]
Calculates the sum of two vectors. | Vector3DUtils | ||
cross(a:Vector3D, b:Vector3D, out:Vector3D = null):Vector3D [static]
Calculates the crossed product of two vectors. | Vector3DUtils | ||
interpolate(a:Vector3D, b:Vector3D, value:Number, out:Vector3D = null):Vector3D [static]
Calculates the interpolation between two vectors. | Vector3DUtils | ||
length(a:Vector3D, b:Vector3D):Number [static]
Calculates the length between two vectors. | Vector3DUtils | ||
lengthSquared(a:Vector3D, b:Vector3D):Number [static]
Calculates the squared length between two vectors. | Vector3DUtils | ||
max(a:Vector3D, b:Vector3D, out:Vector3D = null):Vector3D [static] | Vector3DUtils | ||
min(a:Vector3D, b:Vector3D, out:Vector3D = null):Vector3D [static] | Vector3DUtils | ||
mirror(vector:Vector3D, normal:Vector3D, out:Vector3D = null):Vector3D [static]
Returns the vector mirrored with respect to another. | Vector3DUtils | ||
negate(a:Vector3D, out:Vector3D = null):Vector3D [static]
Calculates the inverse vector of another vector. | Vector3DUtils | ||
random(min:Number, max:Number, out:Vector3D = null):Vector3D [static]
Fills a vector with random numbers in a defined range. | Vector3DUtils | ||
set(a:Vector3D, x:Number = 0, y:Number = 0, z:Number = 0, w:Number = 0):void [static]
Sets the values for a vector. | Vector3DUtils | ||
setLength(a:Vector3D, length:Number):void [static]
Sets a scale for a vector. | Vector3DUtils | ||
sub(a:Vector3D, b:Vector3D, out:Vector3D = null):Vector3D [static]
Calculates the subtraction of two vectors. | Vector3DUtils | ||
| Constant | Defined By | ||
|---|---|---|---|
| BACK : Vector3D [static]
Vector that defines the (0,0,-1) constant. | Vector3DUtils | ||
| DOWN : Vector3D [static]
Vector that defines the (0,-1,0) constant. | Vector3DUtils | ||
| FORWARD : Vector3D [static]
Vector that defines the (0,0,1) constant. | Vector3DUtils | ||
| LEFT : Vector3D [static]
Vector that defines the (-1,0,0) constant. | Vector3DUtils | ||
| ONE : Vector3D [static]
Vector that defines the (1,1,1) constant. | Vector3DUtils | ||
| RIGHT : Vector3D [static]
Vector that defines the (1,0,0) constant. | Vector3DUtils | ||
| UP : Vector3D [static]
Vector that defines the (0,1,0) constant. | Vector3DUtils | ||
| ZERO : Vector3D [static]
Vector that defines the (0,0,0) constant. | Vector3DUtils | ||
| abs | () | method |
public static function abs(a:Vector3D):voidParameters
a:Vector3D |
| add | () | method |
public static function add(a:Vector3D, b:Vector3D, out:Vector3D = null):Vector3DCalculates the sum of two vectors.
Parameters
a:Vector3D — First vector.
| |
b:Vector3D — Second vector.
| |
out:Vector3D (default = null) — Vector3D-type object where the result is to be returned.
|
Vector3D — If the 'out' parameter is 'null', a new Vector3D with the result will be returned. Otherwise, the same vector passed to the 'out' parameter will be returned.
|
| cross | () | method |
public static function cross(a:Vector3D, b:Vector3D, out:Vector3D = null):Vector3DCalculates the crossed product of two vectors.
Parameters
a:Vector3D — First vector to be tested.
| |
b:Vector3D — Second vector to be tested.
| |
out:Vector3D (default = null) — Vector3D-type object where the result is to be returned.
|
Vector3D — If the 'out' parameter is 'null', a new Vector3D with the result will be returned. Otherwise, the same vector passed to the 'out' parameter will be returned.
|
| interpolate | () | method |
public static function interpolate(a:Vector3D, b:Vector3D, value:Number, out:Vector3D = null):Vector3DCalculates the interpolation between two vectors.
Parameters
a:Vector3D — Source vector.
| |
b:Vector3D — Destination vector.
| |
value:Number — Interpolation value (0-1).
| |
out:Vector3D (default = null) — Vector where the result is to be returned.
|
Vector3D — If the 'out' parameter is 'null', a new Vector3D with the result will be returned. Otherwise, the same vector passed to the 'out' parameter will be returned.
|
| length | () | method |
public static function length(a:Vector3D, b:Vector3D):NumberCalculates the length between two vectors.
Parameters
a:Vector3D — First vector to be tested.
| |
b:Vector3D — Second vector to be tested.
|
Number — Distance between vectors 'a' and 'b'.
|
| lengthSquared | () | method |
public static function lengthSquared(a:Vector3D, b:Vector3D):NumberCalculates the squared length between two vectors.
Parameters
a:Vector3D — First vector to be tested.
| |
b:Vector3D — Second vector to be tested.
|
Number — Distance aquared between vectors 'a' and 'b'.
|
| max | () | method |
public static function max(a:Vector3D, b:Vector3D, out:Vector3D = null):Vector3DParameters
a:Vector3D | |
b:Vector3D | |
out:Vector3D (default = null) |
Vector3D |
| min | () | method |
public static function min(a:Vector3D, b:Vector3D, out:Vector3D = null):Vector3DParameters
a:Vector3D | |
b:Vector3D | |
out:Vector3D (default = null) |
Vector3D |
| mirror | () | method |
public static function mirror(vector:Vector3D, normal:Vector3D, out:Vector3D = null):Vector3DReturns the vector mirrored with respect to another.
Parameters
vector:Vector3D — Source vector that is to be mirrored.
| |
normal:Vector3D — Plane normal on which the source vector is to be mirrored.
| |
out:Vector3D (default = null) — Vector where the result is to be returned.
|
Vector3D — If the 'out' parameter is 'null', a new Vector3D with the result will be returned. Otherwise, the same vector passed to the 'out' parameter will be returned.
|
| negate | () | method |
public static function negate(a:Vector3D, out:Vector3D = null):Vector3DCalculates the inverse vector of another vector.
Parameters
a:Vector3D — Vector to be tested.
| |
out:Vector3D (default = null) — Vector where the result is to be returned.
|
Vector3D — If the 'out' parameter is 'null', a new Vector3D with the result will be returned. Otherwise, the same vector passed to the 'out' parameter will be returned.
|
| random | () | method |
public static function random(min:Number, max:Number, out:Vector3D = null):Vector3DFills a vector with random numbers in a defined range.
Parameters
min:Number — Minimum number that values can hold.
| |
max:Number — Maximum number that values can hold.
| |
out:Vector3D (default = null) — Vector where the result is to be returned.
|
Vector3D — If the 'out' parameter is 'null', a new Vector3D with the result will be returned. Otherwise, the same vector passed to the 'out' parameter will be returned.
|
| set | () | method |
public static function set(a:Vector3D, x:Number = 0, y:Number = 0, z:Number = 0, w:Number = 0):voidSets the values for a vector.
Parameters
a:Vector3D — Vector to be set.
| |
x:Number (default = 0) — X component of the vector.
| |
y:Number (default = 0) — Y component of the vector.
| |
z:Number (default = 0) — Z component fo the vector.
| |
w:Number (default = 0) |
| setLength | () | method |
public static function setLength(a:Vector3D, length:Number):voidSets a scale for a vector.
Parameters
a:Vector3D — Vector whose scale is to be set.
| |
length:Number — Scale to be set.
|
| sub | () | method |
public static function sub(a:Vector3D, b:Vector3D, out:Vector3D = null):Vector3DCalculates the subtraction of two vectors.
Parameters
a:Vector3D — First vector.
| |
b:Vector3D — Second vector.
| |
out:Vector3D (default = null) — Vector3D-type object where the result is to be returned.
|
Vector3D — If the 'out' parameter is 'null', a new Vector3D with the result will be returned. Otherwise, the same vector passed to the 'out' parameter will be returned.
|
| BACK | Constant |
public static const BACK:Vector3DVector that defines the (0,0,-1) constant.
| DOWN | Constant |
public static const DOWN:Vector3DVector that defines the (0,-1,0) constant.
| FORWARD | Constant |
public static const FORWARD:Vector3DVector that defines the (0,0,1) constant.
| LEFT | Constant |
public static const LEFT:Vector3DVector that defines the (-1,0,0) constant.
| ONE | Constant |
public static const ONE:Vector3DVector that defines the (1,1,1) constant.
| RIGHT | Constant |
public static const RIGHT:Vector3DVector that defines the (1,0,0) constant.
| UP | Constant |
public static const UP:Vector3DVector that defines the (0,1,0) constant.
| ZERO | Constant |
public static const ZERO:Vector3DVector that defines the (0,0,0) constant.