#include <Vector.h>
Public Types | |
| typedef T | TYPE |
Public Member Functions | |
| Vec2 () | |
| Vec2 (T nx, T ny) | |
| Vec2 (const Vec2< T > &src) | |
| Vec2 (const T *d) | |
| template<typename FromT > | |
| Vec2 (const Vec2< FromT > &src) | |
| void | set (T ax, T ay) |
| void | set (const Vec2< T > &rhs) |
| template<typename FromT > | |
| Vec2< T > & | operator= (const Vec2< FromT > &rhs) |
| Vec2< T > & | operator= (const Vec2< T > &rhs) |
| T & | operator[] (int n) |
| const T & | operator[] (int n) const |
| const Vec2< T > | operator+ (const Vec2< T > &rhs) const |
| const Vec2< T > | operator- (const Vec2< T > &rhs) const |
| const Vec2< T > | operator* (const Vec2< T > &rhs) const |
| const Vec2< T > | operator/ (const Vec2< T > &rhs) const |
| Vec2< T > & | operator+= (const Vec2< T > &rhs) |
| Vec2< T > & | operator-= (const Vec2< T > &rhs) |
| Vec2< T > & | operator*= (const Vec2< T > &rhs) |
| Vec2< T > & | operator/= (const Vec2< T > &rhs) |
| const Vec2< T > | operator/ (T rhs) const |
| Vec2< T > & | operator+= (T rhs) |
| Vec2< T > & | operator-= (T rhs) |
| Vec2< T > & | operator*= (T rhs) |
| Vec2< T > & | operator/= (T rhs) |
| Vec2< T > | operator- () const |
| bool | operator== (const Vec2< T > &rhs) const |
| bool | operator!= (const Vec2< T > &rhs) const |
| T | dot (const Vec2< T > &rhs) const |
| T | distance (const Vec2< T > &rhs) const |
| T | distanceSquared (const Vec2< T > &rhs) const |
| T | length () const |
| void | normalize () |
| Vec2< T > | normalized () const |
| void | safeNormalize () |
| Vec2< T > | safeNormalized () |
| T | lengthSquared () const |
| void | invert () |
| Vec2< T > | inverse () |
| Vec2< T > | lerp (T fact, const Vec2< T > &r) const |
| operator T * () | |
| operator const T * () const | |
Static Public Member Functions | |
| static Vec2< T > | max () |
| static Vec2< T > | zero () |
| static Vec2< T > | one () |
| static Vec2< T > | xAxis () |
| static Vec2< T > | yAxis () |
Public Attributes | |
| T | x |
| T | y |
Static Public Attributes | |
| static const int | DIM = 2 |
Friends | |
| std::ostream & | operator<< (std::ostream &lhs, const Vec2< T > &rhs) |
| typedef T cinder::Vec2< T >::TYPE |
| cinder::Vec2< T >::Vec2 | ( | ) |
| cinder::Vec2< T >::Vec2 | ( | T | nx, | |
| T | ny | |||
| ) |
| cinder::Vec2< T >::Vec2 | ( | const Vec2< T > & | src | ) |
| cinder::Vec2< T >::Vec2 | ( | const T * | d | ) | [explicit] |
| cinder::Vec2< T >::Vec2 | ( | const Vec2< FromT > & | src | ) |
| void cinder::Vec2< T >::set | ( | T | ax, | |
| T | ay | |||
| ) |
| void cinder::Vec2< T >::set | ( | const Vec2< T > & | rhs | ) |
| Vec2<T>& cinder::Vec2< T >::operator= | ( | const Vec2< FromT > & | rhs | ) |
| Vec2<T>& cinder::Vec2< T >::operator= | ( | const Vec2< T > & | rhs | ) |
| T& cinder::Vec2< T >::operator[] | ( | int | n | ) |
| const T& cinder::Vec2< T >::operator[] | ( | int | n | ) | const |
| const Vec2<T> cinder::Vec2< T >::operator+ | ( | const Vec2< T > & | rhs | ) | const |
| const Vec2<T> cinder::Vec2< T >::operator- | ( | const Vec2< T > & | rhs | ) | const |
| const Vec2<T> cinder::Vec2< T >::operator* | ( | const Vec2< T > & | rhs | ) | const |
| const Vec2<T> cinder::Vec2< T >::operator/ | ( | const Vec2< T > & | rhs | ) | const |
| Vec2<T>& cinder::Vec2< T >::operator+= | ( | const Vec2< T > & | rhs | ) |
| Vec2<T>& cinder::Vec2< T >::operator-= | ( | const Vec2< T > & | rhs | ) |
| Vec2<T>& cinder::Vec2< T >::operator*= | ( | const Vec2< T > & | rhs | ) |
| Vec2<T>& cinder::Vec2< T >::operator/= | ( | const Vec2< T > & | rhs | ) |
| const Vec2<T> cinder::Vec2< T >::operator/ | ( | T | rhs | ) | const |
| Vec2<T>& cinder::Vec2< T >::operator+= | ( | T | rhs | ) |
| Vec2<T>& cinder::Vec2< T >::operator-= | ( | T | rhs | ) |
| Vec2<T>& cinder::Vec2< T >::operator*= | ( | T | rhs | ) |
| Vec2<T>& cinder::Vec2< T >::operator/= | ( | T | rhs | ) |
| Vec2<T> cinder::Vec2< T >::operator- | ( | ) | const |
| bool cinder::Vec2< T >::operator== | ( | const Vec2< T > & | rhs | ) | const |
| bool cinder::Vec2< T >::operator!= | ( | const Vec2< T > & | rhs | ) | const |
| T cinder::Vec2< T >::dot | ( | const Vec2< T > & | rhs | ) | const |
| T cinder::Vec2< T >::distance | ( | const Vec2< T > & | rhs | ) | const |
| T cinder::Vec2< T >::distanceSquared | ( | const Vec2< T > & | rhs | ) | const |
| T cinder::Vec2< T >::length | ( | ) | const |
| void cinder::Vec2< T >::normalize | ( | ) |
| Vec2<T> cinder::Vec2< T >::normalized | ( | ) | const |
| void cinder::Vec2< T >::safeNormalize | ( | ) |
| Vec2<T> cinder::Vec2< T >::safeNormalized | ( | ) |
| T cinder::Vec2< T >::lengthSquared | ( | ) | const |
| void cinder::Vec2< T >::invert | ( | ) |
| Vec2<T> cinder::Vec2< T >::inverse | ( | ) |
| Vec2<T> cinder::Vec2< T >::lerp | ( | T | fact, | |
| const Vec2< T > & | r | |||
| ) | const |
| static Vec2<T> cinder::Vec2< T >::max | ( | ) | [static] |
| static Vec2<T> cinder::Vec2< T >::zero | ( | ) | [static] |
| static Vec2<T> cinder::Vec2< T >::one | ( | ) | [static] |
| cinder::Vec2< T >::operator T * | ( | ) |
| cinder::Vec2< T >::operator const T * | ( | ) | const |
| static Vec2<T> cinder::Vec2< T >::xAxis | ( | ) | [static] |
| static Vec2<T> cinder::Vec2< T >::yAxis | ( | ) | [static] |
| std::ostream& operator<< | ( | std::ostream & | lhs, | |
| const Vec2< T > & | rhs | |||
| ) | [friend] |
| T cinder::Vec2< T >::x |
| T cinder::Vec2< T >::y |
const int cinder::Vec2< T >::DIM = 2 [static] |