Public Member Functions | |
Vec3 () | |
Vec3 (float x, float y, float z) | |
void | set (float x, float y, float z) |
float & | x () |
float & | y () |
float & | z () |
float | x () const |
float | y () const |
float | z () const |
float & | operator[] (int i) |
float | operator[] (int i) const |
const Vec3 | operator^ (const Vec3 &rhs) const |
cross product | |
const Vec3 | operator- (const Vec3 &rhs) const |
binary vector subtract | |
const Vec3 | operator- () const |
float | length () const |
Length of the vector = sqrt( vec . vec ). | |
float | normalize () |
const Vec3 | operator * (float rhs) const |
multiply by scalar | |
Vec3 & | operator *= (float rhs) |
unary multiply by scalar | |
Public Attributes | |
float | _v [3] |
|
|
|
|
|
Length of the vector = sqrt( vec . vec ).
|
|
normalize the vector so that it has length unity returns the previous length of the vector |
|
multiply by scalar
|
|
unary multiply by scalar
|
|
|
|
binary vector subtract
|
|
|
|
|
|
cross product
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|