#include <v4.h>
Public Methods | |
Constructors | |
| V4 (float x=0.f, float y=0.f, float z=0.f, float w=1.f) | |
| . | |
| V4 (const V4 &v) | |
| . | |
| V4 (const V3 &v, float w=0.f) | |
| . | |
Initializers | |
| void | Set (float x, float y, float z, float w) |
| . | |
| void | Set (const V4 &v) |
| . | |
| void | Set (const V3 &v, float w=0.f) |
| . | |
Overloaded operators | |
| V4 | operator- () const |
| . | |
| V4 | operator+ (float d) const |
| . | |
| V4 | operator+ (const V4 &v) const |
| . | |
| V4 | operator- (float d) const |
| . | |
| V4 | operator- (const V4 &v) const |
| . | |
| V4 | operator * (float d) const |
| . | |
| V4 | operator * (const V4 &v) const |
| . | |
| V4 | operator/ (float d) const |
| . | |
| V4 | operator/ (const V4 &v) const |
| . | |
| void | operator+= (const V4 &v) |
| . | |
| void | operator-= (const V4 &v) |
| . | |
| void | operator *= (float d) |
| . | |
| void | operator *= (const V4 &v) |
| . | |
| void | operator *= (const Mat44 &m) |
| . | |
| void | operator/= (float d) |
| . | |
Operations | |
| float | Dot (const V4 &v) const |
| Dot product. | |
| float | Mag () const |
| Vector's magnitude. | |
| float | MagSquared () const |
| Vector's squared magnitude. | |
| V4 | GetNorm () const |
| Returns a normalized vector. | |
| V4 & | Normalize () |
| Normalizes the vector in place. | |
| bool | Equals (const V4 &v, float eps=constants::Eps3) const |
| Check equality given a threshold. | |
Static Public Attributes | |
| V4 | Axes [4] |
| Cardinal vectors X, Y, Z, W. | |
| V4 | O |
| Zero vector. | |
| V4 | Inf |
| Infinity vector. | |
Union members: float x, y, z, w; float xyzw [4];
|
|
Initial value: { V4 (1.f, 0.f, 0.f, 0.f),
V4 (0.f, 1.f, 0.f, 0.f),
V4 (0.f, 0.f, 1.f, 0.f),
V4 (0.f, 0.f, 0.f, 1.f) }
|
1.2.17