3D vector class with lots of operators and a few useful functions. More...
#include <gelVector.h>
Public Member Functions | |
Gel3dVec () | |
Default constructor. | |
Gel3dVec (const Gel3dVec &vec) | |
Copy constructor. | |
Gel3dVec (float n) | |
Single value constructor. | |
Gel3dVec (float _x, float _y, float _z) | |
Gel3dVec constructor. | |
float | getLength () const |
Gets the length of the vector. | |
float | getSqrLength () const |
Gets the square length of the vector. | |
float | getDistanceTo (const Gel3dVec &vec) const |
Gets the distance from this vector to another Gel3dVec. | |
float | getDot (const Gel3dVec &vec) const |
Gets the dot product of this vector with another Gel3dVec. | |
Gel3dVec | getCross (const Gel3dVec &vec) const |
Gets the cross product of this vector with another Gel3dVec. | |
void | normalize () |
Normalizes the vector. | |
Gel3dVec | operator+ (const Gel3dVec &v) |
Gel3dVec | operator- (const Gel3dVec &v) |
Gel3dVec | operator* (const Gel3dVec &v) |
Gel3dVec | operator/ (const Gel3dVec &v) |
Gel3dVec | operator= (const Gel3dVec &v) |
Gel3dVec | operator+= (const Gel3dVec &v) |
Gel3dVec | operator-= (const Gel3dVec &v) |
Gel3dVec | operator*= (const Gel3dVec &v) |
Gel3dVec | operator/= (const Gel3dVec &v) |
bool | operator== (const Gel3dVec &v) const |
bool | operator!= (const Gel3dVec &v) const |
Public Attributes | |
float | x |
x coordinate. | |
float | y |
y coordinate. | |
float | z |
z coordinate. |
3D vector class with lots of operators and a few useful functions.
This class exists solely for possible future needs. It currently has no applicable purposes in a 2D environment, at least as far as I can tell.
gel::Gel3dVec::Gel3dVec | ( | ) | [inline] |
Default constructor.
gel::Gel3dVec::Gel3dVec | ( | const Gel3dVec & | vec | ) | [inline] |
Copy constructor.
vec | : The Gel3dVec to copy. |
gel::Gel3dVec::Gel3dVec | ( | float | n | ) | [inline] |
Single value constructor.
n | : Value to use for the vector's x, y and z coordinates. |
gel::Gel3dVec::Gel3dVec | ( | float | _x, |
float | _y, | ||
float | _z | ||
) | [inline] |
Gel3dVec constructor.
_x | : The vector's x coordinate. |
_y | : The vector's y coordinate. |
_z | : The vector's z coordinate. |
float gel::Gel3dVec::getLength | ( | ) | const [inline] |
Gets the length of the vector.
float gel::Gel3dVec::getSqrLength | ( | ) | const [inline] |
Gets the square length of the vector.
float gel::Gel3dVec::getDistanceTo | ( | const Gel3dVec & | vec | ) | const [inline] |
float gel::Gel3dVec::getDot | ( | const Gel3dVec & | vec | ) | const [inline] |
void gel::Gel3dVec::normalize | ( | ) | [inline] |
Normalizes the vector.
bool gel::Gel3dVec::operator== | ( | const Gel3dVec & | v | ) | const [inline] |
bool gel::Gel3dVec::operator!= | ( | const Gel3dVec & | v | ) | const [inline] |
float gel::Gel3dVec::x |
x coordinate.
float gel::Gel3dVec::y |
y coordinate.
float gel::Gel3dVec::z |
z coordinate.
API Documentation by Mark D. Procarione | Generated by |