Public Methods |
| Vec4 () |
| Vec4 (float x, float y, float z, float w) |
| Vec4 (const Vec3 &v3, float w) |
const bool | operator== (const Vec4 &v) const |
const bool | operator!= (const Vec4 &v) const |
const bool | operator< (const Vec4 &v) const |
float * | ptr () |
const float * | ptr () const |
void | set (float x, float y, float z, float w) |
float & | operator[] (const int i) |
float | operator[] (const int i) const |
float & | x () |
float & | y () |
float & | z () |
float & | w () |
float | x () const |
float | y () const |
float | z () const |
float | w () const |
unsigned long | asABGR () const |
const unsigned long | asRGBA () const |
const bool | valid () const |
const bool | isNaN () const |
float | operator * (const Vec4 &rhs) const |
| dot product
|
Vec4 | operator * (const float rhs) const |
| multiply by scalar
|
Vec4 & | operator *= (const float rhs) |
| unary multiply by scalar
|
Vec4 | operator/ (const float rhs) const |
| divide by scalar
|
Vec4 & | operator/= (const float rhs) |
| unary divide by scalar
|
Vec4 | operator+ (const Vec4 &rhs) const |
| binary vector add
|
Vec4 & | operator+= (const Vec4 &rhs) |
| unary vector add.
|
Vec4 | operator- (const Vec4 &rhs) const |
| binary vector subtract
|
Vec4 & | operator-= (const Vec4 &rhs) |
| unary vector subtract
|
const Vec4 | operator- () const |
| negation operator. Returns the negative of the Vec4
|
const float | length () const |
| Length of the vector = sqrt( vec . vec ).
|
const float | length2 () const |
| Length squared of the vector = vec . vec.
|
const float | normalize () |
| normalize the vector so that it has length unity returns the previous length of the vector
|
Public Attributes |
float | _v [4] |
Friends |
std::ostream & | operator<< (std::ostream &output, const Vec4 &vec) |