#include <tb_vector.hpp>
Public Member Functions | |
Vector4 (const SkipInitialization &fastAndStupid) | |
Vector4 (void) | |
Vector4 (const float valueX, const float valueY, const float valueZ, const float valueW) | |
Vector4 (const Vector2 &other, const float valueZ, const float valueW) | |
Vector4 (const Vector3 &other, const float valueW) | |
Vector4 (const float *componentArray) | |
Vector4 (const Vector4 &other) | |
~Vector4 (void) | |
Vector4 & | operator= (const Vector4 &other) |
bool | operator== (const Vector4 &other) const |
bool | operator!= (const Vector4 &other) const |
operator const float * (void) const | |
operator float * (void) | |
const float & | operator[] (const int index) const |
float & | operator[] (const int index) |
Static Public Member Functions | |
static Vector4 | Zero (void) |
Public Attributes | |
union { | |
float mComponents [4] | |
struct { | |
float x | |
float y | |
float z | |
float w | |
} | |
}; | |
The Vector4 object is a four component mathematical vector of floats packed together with some functionality to perform basic vector math.
|
inlineexplicit |
Constructs a Vector4 object leaving the members uninitialized and must be initialized manually before the object is used.
|
inline |
Constructs a default Vector4 object with all components set to 0.0f.
|
inline |
Constructs a Vector4 object with each component initialized with the values provided.
valueX | The value to initialize the x component as. |
valueY | The value to initialize the y component as. |
valueZ | The value to initialize the z component as. |
valueW | The value to initialize the w component as. |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inline |
|
inline |
Nothing needs to happen to destroy a Vector4 object.
|
inlineexplicit |
Returns a float array of the Vector4 components.
|
inlineexplicit |
Returns a float array of the Vector4 components. If modified the internal components will also be modified as well.
|
inline |
Inequality operator, returns the opposite of the equality operator, which compares each value in one Vector4 object to another using IsEqual to compare the floating point component values.
|
inline |
Equality operator, compares each component of the Vector4 object to the values of another Vector4 returning true if all components are equal, or false if any of the components are not equal.
other | The Vector4 object to compare against. |
|
inline |
Returns a reference to one of the Vector4 components by an index provided by the VectorComponent enum.
|
inline |
Returns a reference to one of the Vector4 components by an index provided by the VectorComponent enum. If the reference returned is modified, the internal components will also be modified as well.