|
T & | x () |
|
const T & | x () const |
|
T & | y () |
|
const T & | y () const |
|
T & | z () |
|
const T & | z () const |
|
T & | w () |
|
const T & | w () const |
|
T & | r () |
|
const T & | r () const |
|
T & | g () |
|
const T & | g () const |
|
T & | b () |
|
const T & | b () const |
|
T & | a () |
|
const T & | a () const |
|
T & | u () |
|
const T & | u () const |
|
T & | v () |
|
const T & | v () const |
|
template<unsigned char s> |
Vector< T, i > & | operator+= (const Vector< T, s > &other) |
| Adds one vector to another.
|
|
template<unsigned char s> |
Vector< T, i > | operator+ (const Vector< T, s > &other) const |
|
template<unsigned char s> |
Vector< T, i > & | operator-= (const Vector< T, s > &other) |
| Subtracts one vector from another.
|
|
template<unsigned char s> |
Vector< T, i > | operator- (const Vector< T, s > &other) const |
|
template<unsigned char s> |
Vector< T, i > & | operator*= (const Vector< T, s > &other) |
| Multiplies one vector with another.
|
|
template<unsigned char s> |
Vector< T, i > | operator* (const Vector< T, s > &other) const |
|
template<unsigned char s> |
Vector< T, i > & | operator/= (const Vector< T, s > &other) |
| Divides one vector from another.
|
|
template<unsigned char s> |
Vector< T, i > | operator/ (const Vector< T, s > &other) const |
|
template<unsigned char s> |
Vector< T, i > & | operator%= (const Vector< T, s > &other) |
| Modulos one vector from another.
|
|
template<unsigned char s> |
Vector< T, i > | operator% (const Vector< T, s > &other) const |
| Modulos two vectors.
|
|
bool | operator== (Vector< T, i > const &other) const |
|
bool | operator!= (Vector< T, i > const &other) const |
|
template<typename O, unsigned char s> |
| operator Vector< O, s > () |
| Convert a Vector of one type into another type.
|
|
std::array< T, i > | GetAsArray () const |
| Get a copy of the Vector as a plain std::array.
|
|
| operator std::string () const |
| Convert the Vector to a string (for printing or serialization purposes)
|
|
| Vector () |
| Default initializer, setting all values to garbage data.
|
|
| Vector (std::initializer_list< T > il) |
| Initializer list, sets all values to the given values in the list.
|
|
template<typename T, unsigned char i>
class TeaPacket::Math::Vector< T, i >
A template class for all base Vector types.
template<typename T, unsigned char i>
template<unsigned char s>
Adds one vector to another.
All vector math operations are simply the operations applied on all members of that vector.
For example, addition adds all members together, subtraction subtracts all the 2nd Vector's values from the first Vector's, etc.