Scripting Interface |
The Vector2d JavaScript class. Defines a two dimensional vector. More...
Public Slots | |
bool | isZero () |
Test if Vector2d is zero. More... | |
bool | isEqual (Vector2d v2) |
Test if the two vectors are equals. More... | |
bool | isNotEqual (Vector2d v2) |
Test if the two vectors are not equals. More... | |
double | length () |
Retrieve length of Vector2d. More... | |
double | lengthSq () |
Retrieve square length of Vector2d. More... | |
double | radianAngle () |
Retrieve radian angle defined by Vector2d. More... | |
double | degreeAngle () |
Retrieve degree angle defined by Vector2d. More... | |
double | dot (Vector2d v2) |
Calculate dot product between current Vector2d and specified Vector2d. More... | |
Vector2d & | rotate (double rad) |
Rotate Vector2d counter-clockwise of specified radian angle. More... | |
Vector2d & | rotate90 () |
Rotate Vector2d counter-clockwise of 90 degrees. More... | |
Vector2d & | rotate270 () |
Rotate Vector2d counter-clockwise of 270 degrees. More... | |
Vector2d & | project (Vector2d v2) |
Project current Vector2d onto specified Vector2d. More... | |
Vector2d | getProjection (Vector2d v2) |
Project current Vector2d onto specified Vector2d. More... | |
Vector2d & | normalize () |
Normalize current Vector2d. More... | |
Vector2d | getNormalized () |
Normalize current Vector2d. More... | |
Vector2d & | negate () |
Negate current Vector2d. More... | |
Public Member Functions | |
Vector2d () | |
Create a new empty Vector2d. More... | |
Vector2d (double x, double y) | |
Create a new Vector2d. More... | |
Properties | |
double | x |
x value More... | |
double | y |
y value More... | |
The Vector2d JavaScript class. Defines a two dimensional vector.
The Vector2d class defines a bi-dimensional vector container. Vector2d objects can be instantiated in the scripting environment.
Vector2d::Vector2d | ( | ) |
Create a new empty Vector2d.
Vector2d::Vector2d | ( | double | x, |
double | y | ||
) |
Create a new Vector2d.
x | X value |
y | Y value |
|
slot |
Retrieve degree angle defined by Vector2d.
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
Test if Vector2d is zero.
|
slot |
Retrieve length of Vector2d.
|
slot |
Retrieve square length of Vector2d.
|
slot |
Retrieve radian angle defined by Vector2d.
|
slot |
|
slot |
|
slot |
|
readwrite |
x value
|
readwrite |
y value