ScriptModule
|
#include <MathInterface.h>
Public Slots | |
bool | isZero () const |
Test if Vector2d is zero. More... | |
bool | isEqual (const Vector2d v2) const |
Test if the two vectors are equals. More... | |
bool | isNotEqual (const Vector2d v2) const |
Test if the two vectors are not equals. More... | |
double | length () const |
Retrieve length of Vector2d. More... | |
double | lengthSq () const |
Retrieve square length of Vector2d. More... | |
double | radianAngle () const |
Retrieve radian angle defined by Vector2d. More... | |
double | degreeAngle () const |
Retrieve degree angle defined by Vector2d. More... | |
double | dot (const Vector2d v2) const |
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 (const Vector2d v2) |
Project current Vector2d onto specified Vector2d. More... | |
Vector2d | getProjection (const 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 class defines a bi-dimensional vector container. Vector2d objects can be instantiated in the scripting environment.
You can use it in both Script Editor and scriptModule.
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 |
|
readwriteprivate |
x value
|
readwriteprivate |
y value