Math functions for vector manipulations.
public static function addVector(p_oV:Vector, p_oW:Vector):Vector
Adds two 3D vectors.
Parameters
| p_oV:Vector — The first vector
|
| |
| p_oW:Vector — The second vector
|
Returns
public static function clone(p_oV:Vector):Vector
Clones a 3D vector.
Parameters
Returns
public static function cross(p_oW:Vector, p_oV:Vector):Vector
Computes the cross product of two 3D vectors.
Parameters
| p_oW:Vector — The first vector
|
| |
| p_oV:Vector — The second vector
|
Returns
| Vector —
The resulting cross product
|
public static function dot(p_oV:Vector, p_oW:Vector):Number
Computes the dot product the two 3D vectors.
Parameters
| p_oV:Vector — The first vector
|
| |
| p_oW:Vector — The second vector
|
Returns
public static function getAngle(p_oV:Vector, p_oW:Vector):Number
Calculates the angle between two 3D vectors.
Parameters
| p_oV:Vector — The first Vector
|
| |
| p_oW:Vector — The second vector
|
Returns
| Number — The angle in radians between the two vectors.
|
public static function getNorm(p_oV:Vector):Number
Computes the norm of a 3D vector.
Parameters
Returns
| Number — The norm of the vector.
|
public static function negate(p_oV:Vector):Vector
Computes the oposite vector of a specified 3D vector.
Parameters
Returns
public static function normalize(p_oV:Vector):Boolean
Normalizes a 3d vector.
Parameters
| p_oV:Vector — The vector to normalize
|
Returns
| Boolean — true if the normalization was successful, false otherwise.
|
public static function pow(p_oV:Vector, p_nExp:Number):Vector
Computes the power of a 3D vector.
Here the meaning of the power of a vector is a new vector
where each element is the the n:th power of the corresponding element.
Ex: A^n = ( A.x^n, A.y^n, A.z^n )
Parameters
| p_oV:Vector — The vector.
|
| |
| p_nExp:Number — The exponent
|
Returns
| Vector —
The resulting vector.
|
public static function scale(p_oV:Vector, n:Number):Vector
Multiplies a 3D vector by specified scalar.
Parameters
| p_oV:Vector — The vector to multiply
|
| |
| n:Number — The scaler to multiply
|
Returns
public static function sub(p_oV:Vector, p_oW:Vector):Vector
Substracts one 3D vector from another
Parameters
| p_oV:Vector — The vector to subtract from
|
| |
| p_oW:Vector — The vector to subtract
|
Returns
ASDoc: Preliminary documentation for the Sandy 3D Engine, version 3.0.1