simple Vector class for OpenGL graphics, contains overloaded operators for most math functions, including operators for manipulation by Point3 and Matrix has a simple union to allow data to be access as x,y,z,w or float[4] array
More...
|
| Vec4 () |
|
| Vec4 (const Vec4 &_v)=default |
| copy ctor More...
|
|
| Vec4 (const Vec3 &_v, float _w=1.0f) noexcept |
| copy ctor More...
|
|
| Vec4 (Real _x, Real _y, Real _z, Real _w=1.0f) noexcept |
| initialise the constructor from 3 or 4 Real More...
|
|
Real | dot (const Vec4 &_b) const noexcept |
| return this dotted with _b More...
|
|
void | set (Real _x, Real _y, Real _z, Real _w=1.0) noexcept |
| sets the vector component from 3 values More...
|
|
void | set (const Vec4 &_v) noexcept |
| set from another vector More...
|
|
void | set (const Vec3 &_v) noexcept |
| set from another vector More...
|
|
void | null () noexcept |
| clears the vector to 0,0,0,1 More...
|
|
Vec3 | toVec3 () const noexcept |
| get as a Vec3 for glsl etc More...
|
|
Vec2 | toVec2 () const noexcept |
| get as a Vec2 for glsl etc More...
|
|
Real & | operator[] (int _i) noexcept |
| [] index operator to access the index component of the vector More...
|
|
const Real & | operator[] (int _i) const noexcept |
|
Real | length () const noexcept |
| returns the length of the vector More...
|
|
Vec4 & | normalize () noexcept |
| Normalize the vector using
. More...
|
|
void | cross (const Vec4 &_v1, const Vec4 &_v2) noexcept |
| set the vector as the cross product from 2 other vectors More...
|
|
Vec4 | cross (const Vec4 &_b) const noexcept |
| return the cross product of this cross with b More...
|
|
void | operator+= (const Vec4 &_v) noexcept |
| += operator add vector v to current vector More...
|
|
void | operator-= (const Vec4 &_v) noexcept |
| -= operator this-=v More...
|
|
Vec4 | operator* (Real _i) const noexcept |
| this * i for each element More...
|
|
Vec4 | operator+ (const Vec4 &_v) const noexcept |
|
- operator add vector+vector
More...
|
|
Vec4 | operator/ (Real _v) const noexcept |
| divide vector components by a scalar More...
|
|
void | operator/= (Real _v) noexcept |
| divide this vector components by a scalar More...
|
|
void | operator*= (Real _v) noexcept |
| multiply this vector components by a scalar More...
|
|
Vec4 | operator- (const Vec4 &_v) const noexcept |
| subtraction operator subtract vevtor-vector More...
|
|
Vec4 | operator* (const Vec4 &_v) const noexcept |
|
- operator mult vevtor*vector
More...
|
|
Vec4 & | operator= (const Vec4 &_v) noexcept |
| assignment operator set the current vector to rhs More...
|
|
Vec4 & | operator= (const Vec3 &_v) noexcept |
| assignment operator set the current vector to rhs More...
|
|
Vec4 & | operator= (Real _v) noexcept |
| assignment operator set the current vector to rhs More...
|
|
Vec4 & | operator- () noexcept |
| negate the vector components More...
|
|
bool | operator== (const Vec4 &_v) const noexcept |
| check for equality uses FCompare (from Util.h) as float values More...
|
|
bool | operator!= (const Vec4 &_v) const noexcept |
| not equal check More...
|
|
Vec4 | operator/ (const Vec4 &_v) const noexcept |
| \ operator div vector/vector More...
|
|
Real | angleBetween (const Vec4 &_v) const noexcept |
| calculate the angle between current vector and _v More...
|
|
Real | inner (const Vec4 &_v) const noexcept |
| calculate the inner product of this vector and vector passed in More...
|
|
Vec4 | outer (const Vec4 &_v) const noexcept |
| compute the outer product of this vector and vector More...
|
|
Real | lengthSquared () const noexcept |
| calculate the length squared of the vector More...
|
|
Vec4 | operator* (const Mat4 &_m) const noexcept |
| operator to multiply a vector by a matrix More...
|
|
Real * | openGL () noexcept |
| accesor to the m_openGL matrix returns the address of the 0th element More...
|
|
simple Vector class for OpenGL graphics, contains overloaded operators for most math functions, including operators for manipulation by Point3 and Matrix has a simple union to allow data to be access as x,y,z,w or float[4] array
Definition at line 57 of file Vec4.h.