Script
|
#include <math.h>
Public Slots | |
bool | isZero () |
Test if Vector2d is zero. | |
bool | isEqual (Vector2d v2) |
Test if the two vectors are equals. | |
bool | isNotEqual (Vector2d v2) |
Test if the two vectors are not equals. | |
double | length () |
Retrieve length of Vector2d. | |
double | lengthSq () |
Retrieve square length of Vector2d. | |
double | radianAngle () |
Retrieve radian angle defined by Vector2d. | |
double | degreeAngle () |
Retrieve degree angle defined by Vector2d. | |
double | dot (Vector2d v2) |
Calculate dot product between current Vector2d and specified Vector2d. | |
Vector2d & | rotate (double rad) |
Rotate Vector2d counter-clockwise of specified radian angle. | |
Vector2d & | rotate90 () |
Rotate Vector2d counter-clockwise of 90 degrees. | |
Vector2d & | rotate270 () |
Rotate Vector2d counter-clockwise of 270 degrees. | |
Vector2d & | project (Vector2d v2) |
Project current Vector2d onto specified Vector2d. | |
Vector2d | getProjection (Vector2d v2) |
Project current Vector2d onto specified Vector2d. | |
Vector2d & | normalize () |
Normalize current Vector2d. | |
Vector2d | getNormalized () |
Normalize current Vector2d. | |
Vector2d & | negate () |
Negate current Vector2d. | |
Public Member Functions | |
Vector2d () | |
Create a new empty Vector2d. | |
Vector2d (double x, double y) | |
Create a new Vector2d. | |
Properties | |
double | x |
x value | |
double | y |
y value | |
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 |
|
readwrite |
x value
|
readwrite |
y value