|
Public Methods |
| vec4 (void) |
| vec4 (const float x, const float y, const float z, const float w) |
| vec4 (const float d) |
| vec4 (const vec4 &v) |
| copy constructor
|
| vec4 (const vec3 &v) |
| cast vec3 to vec4
|
| vec4 (const vec3 &v, const float d) |
| cast vec3 to vec4
|
vec4 & | operator= (const vec4 &v) |
| assignment of a vec4
|
vec4 & | operator+= (const vec4 &v) |
| incrementation by a vec4
|
vec4 & | operator-= (const vec4 &v) |
| decrementation by a vec4
|
vec4 & | operator *= (const float d) |
| multiplication by a constant
|
vec4 & | operator/= (const float d) |
| division by a constant
|
float & | operator[] (int i) |
| indexing
|
float | length (void) |
| length of a vec4
|
float | length2 (void) |
| squared length of a vec4
|
vec4 & | normalize (void) |
| normalize a vec4
|
vec4 & | homogenize (void) |
| puts fourth coord to 1
|
void | print (FILE *file, char *name) |
| prints vector to a file
|
void | set (float x, float y, float z, float a) |
vec4 | operator- () |
| -v1
|
vec4 | operator+ (const vec4 &b) |
| v1 + v2
|
vec4 | operator- (const vec4 &b) |
| v1 - v2
|
vec4 | operator * (const float d) |
| v1 * 3.0
|
vec4 | operator * (mat4 &a) |
| v . M
|
float | operator * (const vec4 &a) |
| dot product
|
vec4 | operator/ (const float d) |
| v1 / 3.0
|
int | operator== (const vec4 &a) |
| v1 == v2 ?
|
int | operator!= (const vec4 &a) |
| v1 != v2 ?
|
Static Public Methods |
void | swap (vec4 &a, vec4 &b) |
| swap v1 & v2
|
vec4 | min (const vec4 &a, const vec4 &b) |
| min(v1, v2)
|
vec4 | max (const vec4 &a, const vec4 &b) |
| max(v1, v2)
|
vec4 | prod (const vec4 &a, const vec4 &b) |
| term by term *
|
Protected Attributes |
float | n [4] |
Friends |
class | vec3 |
class | mat4 |