Crevaya 0.1-PreAlpha
|
Contains a vector in 3D space. More...
#include <Vector3.h>
Public Member Functions | |
Vector3 (float px=0.0, float py=0.0, float pz=0.0) | |
Vector3 (wxString string) | |
~Vector3 (void) | |
wxString | ToString (void) const |
void | FromString (wxString const &string) |
float | Abs () |
Calculate the absolut length of a vector. | |
Vector3 & | operator+= (const Vector3 &a) |
Overloaded operator for vector addition. | |
const Vector3 | operator+ (const Vector3 &a) const |
Overloaded operator for vector addition. | |
Vector3 & | operator-= (const Vector3 &a) |
Overloaded operator for vector subtraction. | |
const Vector3 | operator- (const Vector3 &a) const |
Overloaded operator for vector subtraction. | |
const Vector3 | operator- () const |
Overloaded operator for vector negation. | |
Vector3 & | operator*= (const Vector3 &b) |
Overloaded operator for vector product. | |
Vector3 & | operator*= (const float &b) |
Overloaded operator for scalar product. | |
const Vector3 | operator* (const Vector3 &b) const |
const Vector3 | operator* (const float &b) const |
Overloaded operator for scalar product. | |
float | Dot (const Vector3 &b) |
Calculates the dot product (inner product) of two vectors. | |
Vector3 & | operator/= (const float &b) |
Overloaded operator for scalar division. | |
const Vector3 | operator/ (const float &b) const |
Overloaded operator for scalar division. | |
bool | operator== (const Vector3 &b) const |
Comparison operator. | |
bool | operator!= (const Vector3 &b) const |
Comparison operator. | |
void | Zero (void) |
Zeros a vector. | |
void | Set (float x, float y, float z) |
Sets the vector to the given coordinates. | |
void | Swap (Vector3 &b) |
Swap the vector with a given vector. | |
Vector3 | Normalize (void) |
Normalizes the length of a vector. | |
Public Attributes | |
float | x |
float | y |
float | z |
Contains a vector in 3D space.
Vector3::Vector3 | ( | float | px = 0.0 , |
float | py = 0.0 , |
||
float | pz = 0.0 |
||
) | [inline] |
Vector3::Vector3 | ( | wxString | string | ) | [inline] |
Vector3::~Vector3 | ( | void | ) | [inline] |
float Vector3::Abs | ( | void | ) |
Calculate the absolut length of a vector.
float Vector3::Dot | ( | const Vector3 & | b | ) | [inline] |
Calculates the dot product (inner product) of two vectors.
void Vector3::FromString | ( | wxString const & | string | ) |
Vector3 Vector3::Normalize | ( | void | ) |
Normalizes the length of a vector.
bool Vector3::operator!= | ( | const Vector3 & | b | ) | const [inline] |
Comparison operator.
const Vector3 Vector3::operator* | ( | const float & | b | ) | const [inline] |
Overloaded operator for scalar product.
Overloaded operator for vector product.
This function calculates the vector product
.Overloaded operator for vector product.
Vector3& Vector3::operator*= | ( | const float & | b | ) | [inline] |
Overloaded operator for scalar product.
Overloaded operator for vector addition.
const Vector3 Vector3::operator- | ( | ) | const [inline] |
Overloaded operator for vector negation.
Overloaded operator for vector subtraction.
Overloaded operator for vector subtraction.
const Vector3 Vector3::operator/ | ( | const float & | b | ) | const [inline] |
Overloaded operator for scalar division.
Vector3& Vector3::operator/= | ( | const float & | b | ) | [inline] |
Overloaded operator for scalar division.
bool Vector3::operator== | ( | const Vector3 & | b | ) | const [inline] |
Comparison operator.
void Vector3::Set | ( | float | x, |
float | y, | ||
float | z | ||
) | [inline] |
Sets the vector to the given coordinates.
void Vector3::Swap | ( | Vector3 & | b | ) |
Swap the vector with a given vector.
wxString Vector3::ToString | ( | void | ) | const |
void Vector3::Zero | ( | void | ) |
Zeros a vector.
float Vector3::x |
float Vector3::y |
float Vector3::z |