#include <Vector.h>
Public Types | |
| typedef T | TYPE |
| typedef T | value_type |
| typedef VECTRAIT< T >::DIST | DIST |
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 |
| T * | ptr () 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 | cross (const Vec2< T > &rhs) const |
| Returns the z component of the cross if the two operands were Vec3's on the XY plane, the equivalent of Vec3(*this).cross( Vec3(rhs) ).z. | |
| DIST | distance (const Vec2< T > &rhs) const |
| T | distanceSquared (const Vec2< T > &rhs) const |
| DIST | length () const |
| void | normalize () |
| Vec2< T > | normalized () const |
| void | safeNormalize () |
| Vec2< T > | safeNormalized () const |
| void | rotate (DIST radians) |
| T | lengthSquared () const |
| void | limit (DIST maxLength) |
| Limits the length of a Vec2 to maxLength, scaling it proportionally if necessary. | |
| Vec2< T > | limited (T maxLength) const |
| Returns a copy of the Vec2 with its length limited to maxLength, scaling it proportionally if necessary. | |
| void | invert () |
| Vec2< T > | inverse () const |
| Vec2< T > | lerp (T fact, const Vec2< T > &r) const |
| void | lerpEq (T fact, const Vec2< T > &rhs) |
| Vec2< T > | xx () const |
| Vec2< T > | xy () const |
| Vec2< T > | yx () const |
| Vec2< T > | yy () const |
| Vec3< T > | xxx () const |
| Vec3< T > | xxy () const |
| Vec3< T > | xyx () const |
| Vec3< T > | xyy () const |
| Vec3< T > | yxx () const |
| Vec3< T > | yxy () const |
| Vec3< T > | yyx () const |
| Vec3< T > | yyy () 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 () |
| static Vec2< T > | NaN () |
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 |
| typedef T cinder::Vec2< T >::value_type |
| typedef VECTRAIT<T>::DIST cinder::Vec2< T >::DIST |
| 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] |
| 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 |
| T* cinder::Vec2< T >::ptr | ( | ) | 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 >::cross | ( | const Vec2< T > & | rhs | ) | const |
Returns the z component of the cross if the two operands were Vec3's on the XY plane, the equivalent of Vec3(*this).cross( Vec3(rhs) ).z.
| DIST cinder::Vec2< T >::distance | ( | const Vec2< T > & | rhs | ) | const |
| T cinder::Vec2< T >::distanceSquared | ( | const Vec2< T > & | rhs | ) | const |
| DIST 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 | ( | ) | const |
| void cinder::Vec2< T >::rotate | ( | DIST | radians | ) |
| T cinder::Vec2< T >::lengthSquared | ( | ) | const |
| void cinder::Vec2< T >::limit | ( | DIST | maxLength | ) |
Limits the length of a Vec2 to maxLength, scaling it proportionally if necessary.
| Vec2<T> cinder::Vec2< T >::limited | ( | T | maxLength | ) | const |
Returns a copy of the Vec2 with its length limited to maxLength, scaling it proportionally if necessary.
| void cinder::Vec2< T >::invert | ( | ) |
| Vec2<T> cinder::Vec2< T >::inverse | ( | ) | const |
| Vec2<T> cinder::Vec2< T >::lerp | ( | T | fact, |
| const Vec2< T > & | r | ||
| ) | const |
| void cinder::Vec2< T >::lerpEq | ( | T | fact, |
| const Vec2< T > & | rhs | ||
| ) |
| Vec2<T> cinder::Vec2< T >::xx | ( | ) | const |
| Vec2<T> cinder::Vec2< T >::xy | ( | ) | const |
| Vec2<T> cinder::Vec2< T >::yx | ( | ) | const |
| Vec2<T> cinder::Vec2< T >::yy | ( | ) | const |
| Vec3<T> cinder::Vec2< T >::xxx | ( | ) | const |
| Vec3<T> cinder::Vec2< T >::xxy | ( | ) | const |
| Vec3<T> cinder::Vec2< T >::xyx | ( | ) | const |
| Vec3<T> cinder::Vec2< T >::xyy | ( | ) | const |
| Vec3<T> cinder::Vec2< T >::yxx | ( | ) | const |
| Vec3<T> cinder::Vec2< T >::yxy | ( | ) | const |
| Vec3<T> cinder::Vec2< T >::yyx | ( | ) | const |
| Vec3<T> cinder::Vec2< T >::yyy | ( | ) | 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] |
| static Vec2<T> cinder::Vec2< T >::xAxis | ( | ) | [static] |
| static Vec2<T> cinder::Vec2< T >::yAxis | ( | ) | [static] |
| static Vec2<T> cinder::Vec2< T >::NaN | ( | ) | [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] |