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] |
Producer::Vec3::Vec3 | ( | ) | [inline] |
Producer::Vec3::Vec3 | ( | float | x, | |
float | y, | |||
float | z | |||
) | [inline] |
void Producer::Vec3::set | ( | float | x, | |
float | y, | |||
float | z | |||
) | [inline] |
float& Producer::Vec3::x | ( | ) | [inline] |
float& Producer::Vec3::y | ( | ) | [inline] |
float& Producer::Vec3::z | ( | ) | [inline] |
float Producer::Vec3::x | ( | ) | const [inline] |
float Producer::Vec3::y | ( | ) | const [inline] |
float Producer::Vec3::z | ( | ) | const [inline] |
float& Producer::Vec3::operator[] | ( | int | i | ) | [inline] |
float Producer::Vec3::operator[] | ( | int | i | ) | const [inline] |
const Vec3 Producer::Vec3::operator- | ( | ) | const [inline] |
float Producer::Vec3::length | ( | ) | const [inline] |
Length of the vector = sqrt( vec . vec ).
float Producer::Vec3::normalize | ( | ) | [inline] |
normalize the vector so that it has length unity returns the previous length of the vector
const Vec3 Producer::Vec3::operator * | ( | float | rhs | ) | const [inline] |
multiply by scalar
Vec3& Producer::Vec3::operator *= | ( | float | rhs | ) | [inline] |
unary multiply by scalar
float Producer::Vec3::_v[3] |