#include <vector.h>
Public Methods | |
Vector (float i1=0, float j1=0, float k1=0) | |
~Vector () | |
void | set (float i1=-1, float j1=-1, float k1=-1) |
void | setI (float val) |
void | setJ (float val) |
void | setK (float val) |
void | setX (float val) |
void | setY (float val) |
void | setZ (float val) |
float | i () |
float | j () |
float | k () |
float | x () |
float | y () |
float | z () |
float * | ijk () |
float * | xyz () |
void | rotateX (float vx) |
void | rotateY (float vx) |
void | rotateZ (float vx) |
void | normalize () |
void | scale (float x) |
bool | isValid () const |
float | length () const |
float | dot (const Vector &vector) const |
float | dot (const Vector &vector, const Vector &vector2) const |
float | angle (const Vector &v) const |
Vector | operator * (const float mul) |
Vector | operator/ (const float div) |
Vector | operator= (const Vector &vector) |
Vector | operator+ (const Vector &vector) |
Vector | operator- (const Vector &vector) |
Vector | operator+= (const Vector &vector) |
Vector | operator-= (const Vector &vector) |
bool | operator>= (const Vector &vector) |
bool | operator> (const Vector &vector) |
bool | operator<= (const Vector &vector) |
bool | operator< (const Vector &vector) |
Private Attributes | |
float | vi |
float | vj |
float | vk |
|
Vector with defineable i,j,k values.
|
|
|
|
Return angle between two Vectors.
|
|
Calculate and return dot product of two Vectors.
|
|
Calculate and return dot product with another Vector.
|
|
Returns i-component (same as x).
|
|
Return a pointer to array of 3 float values which contains i,j,k values.
|
|
Returns true if vector is valid.
|
|
Returns j-component (same as u).
|
|
Returns k-component (same as z).
|
|
Returns lenth of Vector.
|
|
Normalize vector.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Compares i,j and k values not length.
|
|
Rotate vector around X axis by "vx" radians.
|
|
Rotate vector around Y axis by "vx" radians.
|
|
Rotate vector around Z axis by "vx" radians.
|
|
Multiply i,j,k values by x.
|
|
Set vector i,j,k, passing -1 leaves original value untouched.
|
|
Set I value.
|
|
Set J value.
|
|
Set K value.
|
|
Set X value, X value is similar to I.
|
|
Set Y value. Y value is similar to J.
|
|
Set Z value. Z value is similar to K.
|
|
Returns x-component (same as i).
|
|
Return a pointer to array of 3 float values which contains x,y,z values.
|
|
Returns y-component (same as j).
|
|
Returns z-component (same as k).
|
|
|
|
|
|
|