Flair
Framework Libre Air
|
Class defining a 2D vector. More...
#include <Vector2D.h>
Public Member Functions | |
Vector2D (T x=0, T y=0) | |
Constructor. More... | |
~Vector2D () | |
Destructor. More... | |
void | Rotate (float value) |
Rotation. More... | |
void | RotateDeg (float value) |
Rotation. More... | |
float | GetNorm (void) const |
Norm. More... | |
void | Normalize (void) |
Normalize. More... | |
void | Saturate (Vector2D< T > min, Vector2D< T > max) |
Saturate. More... | |
void | Saturate (float min, float max) |
Saturate. More... | |
void | Saturate (const Vector2D< T > &value) |
Saturate. More... | |
void | Saturate (float value) |
Saturate. More... | |
template<typename S > | |
Vector2D< T > & | operator= (const Vector2D< S > &vector) |
Vector2D< T > & | operator+= (const Vector2D< T > &vector) |
Vector2D< T > & | operator-= (const Vector2D< T > &vector) |
Public Attributes | |
T | x |
x More... | |
T | y |
y More... | |
Class defining a 2D vector.
flair::core::Vector2D< T >::Vector2D | ( | T | x = 0 , |
T | y = 0 |
||
) |
flair::core::Vector2D< T >::~Vector2D | ( | ) |
Destructor.
void flair::core::Vector2D< T >::Rotate | ( | float | value | ) |
Rotation.
value | rotation value in radians |
void flair::core::Vector2D< T >::RotateDeg | ( | float | value | ) |
Rotation.
value | rotation value in degrees |
float flair::core::Vector2D< T >::GetNorm | ( | void | ) | const |
Norm.
void flair::core::Vector2D< T >::Normalize | ( | void | ) |
Normalize.
void flair::core::Vector2D< T >::Saturate | ( | Vector2D< T > | min, |
Vector2D< T > | max | ||
) |
void flair::core::Vector2D< T >::Saturate | ( | float | min, |
float | max | ||
) |
Saturate.
Saturate between min and max
min | minimum Vector2D(min,min) value |
max | maximum Vector2D(max,max) value |
void flair::core::Vector2D< T >::Saturate | ( | const Vector2D< T > & | value | ) |
void flair::core::Vector2D< T >::Saturate | ( | float | value | ) |
Saturate.
Saturate between -abs(Vector2D(value,value)) and abs(Vector2D(value,value))
value | saturation Vector2D(value,value) |
T flair::core::Vector2D< T >::x |
x
T flair::core::Vector2D< T >::y |
y