3d vector More...
#include <mo_gfx.h>
Public Member Functions | |
Vector3D () | |
Vector3D (GLfloat _x, GLfloat _y, GLfloat _z) | |
Vector3D (const Vector3D &other) | |
~Vector3D () | |
void | set (GLfloat _x, GLfloat _y, GLfloat _z) |
void | setAll (GLfloat val) |
GLfloat & | operator[] (int index) |
const GLfloat & | operator[] (int index) const |
const Vector3D & | operator= (const Vector3D &rhs) |
Vector3D | operator+ (const Vector3D &rhs) const |
Vector3D | operator- (const Vector3D &rhs) const |
Vector3D | operator* (GLfloat scalar) const |
void | operator+= (const Vector3D &rhs) |
void | operator-= (const Vector3D &rhs) |
void | operator*= (GLfloat scalar) |
GLfloat | operator* (const Vector3D &rhs) const |
dot product | |
GLfloat | magnitude () const |
magnitude | |
void | normalize () |
normalize | |
GLfloat | angleXY () const |
2d angles | |
GLfloat | angleYZ () const |
GLfloat | angleXZ () const |
void | interp () |
using the 3-tuple for interpolation | |
void | update (GLfloat _goal) |
void | update (GLfloat _goal, GLfloat _slew) |
Public Attributes | |
union { | |
GLfloat x | |
GLfloat value | |
}; | |
either use as .x, .y, .z OR .value, .goal, .slew | |
union { | |
GLfloat y | |
GLfloat goal | |
}; | |
union { | |
GLfloat z | |
GLfloat slew | |
}; | |
Static Public Attributes | |
static GLfloat | nowhere = 0.0f |
static GLfloat | zero = 0.0 |
3d vector
Vector3D::Vector3D | ( | ) | [inline] |
Vector3D::Vector3D | ( | GLfloat | _x, | |
GLfloat | _y, | |||
GLfloat | _z | |||
) | [inline] |
Vector3D::Vector3D | ( | const Vector3D & | other | ) | [inline] |
Vector3D::~Vector3D | ( | ) | [inline] |
GLfloat Vector3D::angleXY | ( | ) | const [inline] |
2d angles
GLfloat Vector3D::angleXZ | ( | ) | const [inline] |
GLfloat Vector3D::angleYZ | ( | ) | const [inline] |
void Vector3D::interp | ( | ) | [inline] |
using the 3-tuple for interpolation
GLfloat Vector3D::magnitude | ( | ) | const [inline] |
magnitude
void Vector3D::normalize | ( | ) | [inline] |
normalize
GLfloat Vector3D::operator* | ( | const Vector3D & | rhs | ) | const [inline] |
dot product
Vector3D Vector3D::operator* | ( | GLfloat | scalar | ) | const [inline] |
void Vector3D::operator*= | ( | GLfloat | scalar | ) | [inline] |
void Vector3D::operator+= | ( | const Vector3D & | rhs | ) | [inline] |
void Vector3D::operator-= | ( | const Vector3D & | rhs | ) | [inline] |
GLfloat& Vector3D::operator[] | ( | int | index | ) | [inline] |
const GLfloat& Vector3D::operator[] | ( | int | index | ) | const [inline] |
void Vector3D::set | ( | GLfloat | _x, | |
GLfloat | _y, | |||
GLfloat | _z | |||
) | [inline] |
void Vector3D::setAll | ( | GLfloat | val | ) | [inline] |
void Vector3D::update | ( | GLfloat | _goal, | |
GLfloat | _slew | |||
) | [inline] |
void Vector3D::update | ( | GLfloat | _goal | ) | [inline] |
union { ... } |
either use as .x, .y, .z OR .value, .goal, .slew
union { ... } |
union { ... } |
GLfloat Vector3D::goal |
GLfloat Vector3D::nowhere = 0.0f [static] |
GLfloat Vector3D::slew |
GLfloat Vector3D::value |
GLfloat Vector3D::x |
GLfloat Vector3D::y |
GLfloat Vector3D::z |
GLfloat Vector3D::zero = 0.0 [static] |