The Vector3d JavaScript class. Defines a three dimensional vector. More...
Public Slots | |
void | setXYZ (const double x, const double y, const double z) |
Set the x, y, z coordinate to the given. More... | |
bool | isZero () const |
Test if Vector3d is zero. More... | |
bool | isEqual (const Vector3d v2) const |
Test if the two vectors are equals. More... | |
bool | isNotEqual (const Vector3d v2) const |
Test if the two vectors are not equals. More... | |
double | length () const |
Retrieve length of Vector3d. More... | |
double | lengthSq () const |
Retrieve square length of Vector3d. More... | |
double | getCos (const Vector3d v2) const |
Calculate cosine angle between current Vector3d and specified Vector3d. More... | |
double | getSin (const Vector3d v2) const |
Calculate sine angle between current Vector3d and specified Vector3d. More... | |
double | dot (const Vector3d v2) const |
Calculate dot product between current Vector3d and specified Vector3d. More... | |
Vector3d | cross (const Vector3d v2) |
Calculate cross product between current Vector3d and specified Vector3d. More... | |
Vector3d & | project (const Vector3d v2) |
Project current Vector3d onto specified Vector3d. More... | |
Vector3d | getProjection (const Vector3d *v2) |
Project current Vector3d onto specified Vector3d. More... | |
double | getProjectionRatio (const Vector3d v2) const |
Get ratio from projection of current Vector3d onto specified Vector3d. More... | |
Vector3d & | normalize () |
Normalize current Vector3d. More... | |
Vector3d | getNormalized () |
Normalize current Vector3d. More... | |
Vector3d & | negate () |
Negate current Vector3d. More... | |
Public Member Functions | |
Vector3d () | |
Create a new empty Vector3d. More... | |
Vector3d (double x, double y, double z) | |
Create a new Vector3d. More... | |
Properties | |
double | x |
x value More... | |
double | y |
y value More... | |
double | z |
z value More... | |
The Vector3d JavaScript class. Defines a three dimensional vector.
The Vector3d class defines a three-dimensional vector container. Vector3d objects can be instantiated in the scripting environment.
Vector3d::Vector3d | ( | ) |
Create a new empty Vector3d.
Vector3d::Vector3d | ( | double | x, |
double | y, | ||
double | z | ||
) |
Create a new Vector3d.
x | X value |
y | Y value |
z | Z value |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
|
slot |
Test if Vector3d is zero.
|
slot |
Retrieve length of Vector3d.
|
slot |
Retrieve square length of Vector3d.
|
slot |
Set the x, y, z coordinate to the given.
|
readwrite |
x value
|
readwrite |
y value
|
readwrite |
z value