![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
A vector in 3D space
This class is used to specify positions and directions within the MapLink 3D SDK
This class does not define a particular unit itself, please refer to the documentation of classes which use Vec3.
Public Member Functions | |
virtual | ~Vec3 () |
Destructor. | |
double | x () const |
Get the x component of the vector. | |
double | y () const |
Get the y component of the vector. | |
double | z () const |
Get the z component of the vector. | |
void | x (double v) |
Set the x component of the vector. | |
void | y (double v) |
Set the y component of the vector. | |
void | z (double v) |
Set the z component of the vector. | |
double | length () const |
Get the length of the vector. | |
void | normalise () |
Protected Member Functions | |
Vec3 () | |
Constructor. | |
Vec3 (double x, double y, double z) | |
Constructor. | |
Vec3 (const Vec3 &other) | |
Copy Constructor. | |
bool | operator== (const Vec3 &v) const |
Equality operator. | |
bool | operator!= (const Vec3 &v) const |
Inequality operator. | |
bool | operator< (const Vec3 &v) const |
Less than operator. | |
const Vec3 | operator* (const double &v) const |
Multiply the vector by a scalar value. | |
Vec3 | operator*= (const double &v) |
Multiply the vector by a scalar value. | |
const Vec3 | operator/ (const double &v) const |
Divide the vector by a scalar value. | |
Vec3 | operator/= (const double &v) |
Divide the vector by a scalar value. | |
const Vec3 | operator+ (const Vec3 &v) const |
Addition operator. | |
Vec3 | operator+= (const Vec3 &v) |
Addition operator. | |
const Vec3 | operator- (const Vec3 &v) const |
Subtraction operator. | |
Vec3 | operator-= (const Vec3 &v) |
Subtraction operator. | |
double | operator* (const Vec3 &v) const |
const Vec3 | operator^ (const Vec3 &v) const |
Protected Attributes | |
double | m_v [3] |
|
virtual |
Destructor.
|
protected |
Constructor.
|
protected |
Constructor.
|
protected |
Copy Constructor.
double envitia::maplink::earth::Vec3::length | ( | ) | const |
Get the length of the vector.
void envitia::maplink::earth::Vec3::normalise | ( | ) |
Normalise the vector
The vector will be modified in order to set the length to 1.0.
|
protected |
Inequality operator.
|
protected |
Multiply the vector by a scalar value.
|
protected |
Calculate the dot product with another vector
v | The vector to perform a dot product against |
|
protected |
Multiply the vector by a scalar value.
Addition operator.
Subtraction operator.
|
protected |
Divide the vector by a scalar value.
|
protected |
Divide the vector by a scalar value.
|
protected |
Less than operator.
|
protected |
Equality operator.
Calculate the cross product with another vector
v | The vector to perform a cross product against |
double envitia::maplink::earth::Vec3::x | ( | ) | const |
Get the x component of the vector.
void envitia::maplink::earth::Vec3::x | ( | double | v | ) |
Set the x component of the vector.
double envitia::maplink::earth::Vec3::y | ( | ) | const |
Get the y component of the vector.
void envitia::maplink::earth::Vec3::y | ( | double | v | ) |
Set the y component of the vector.
double envitia::maplink::earth::Vec3::z | ( | ) | const |
Get the z component of the vector.
void envitia::maplink::earth::Vec3::z | ( | double | v | ) |
Set the z component of the vector.
|
protected |