#include <Karto.h>
Public Member Functions | |
kt_double | Distance (const Vector2 &rOther) const |
const T & | GetX () const |
const T & | GetY () const |
kt_double | Length () const |
void | MakeCeil (const Vector2 &rOther) |
void | MakeFloor (const Vector2 &rOther) |
kt_bool | operator!= (const Vector2 &rOther) const |
kt_double | operator* (const Vector2 &rOther) const |
const Vector2 | operator* (T scalar) const |
void | operator*= (T scalar) |
const Vector2 | operator+ (const Vector2 &rOther) const |
void | operator+= (const Vector2 &rOther) |
const Vector2 | operator- (const Vector2 &rOther) const |
const Vector2 | operator- (T scalar) const |
void | operator-= (const Vector2 &rOther) |
const Vector2 | operator/ (T scalar) const |
void | operator/= (T scalar) |
kt_bool | operator< (const Vector2 &rOther) const |
kt_bool | operator== (const Vector2 &rOther) const |
void | SetX (const T &x) |
void | SetY (const T &y) |
kt_double | SquaredDistance (const Vector2 &rOther) const |
kt_double | SquaredLength () const |
Vector2 () | |
Vector2 (T x, T y) | |
Private Attributes | |
T | m_Values [2] |
Friends | |
std::ostream & | operator<< (std::ostream &rStream, const Vector2 &rVector) |
std::istream & | operator>> (std::istream &rStream, const Vector2 &) |
Represents a vector (x, y) in 2-dimensional real space.
karto::Vector2< T >::Vector2 | ( | ) | [inline] |
karto::Vector2< T >::Vector2 | ( | T | x, |
T | y | ||
) | [inline] |
kt_double karto::Vector2< T >::Distance | ( | const Vector2< T > & | rOther | ) | const [inline] |
const T& karto::Vector2< T >::GetX | ( | ) | const [inline] |
const T& karto::Vector2< T >::GetY | ( | ) | const [inline] |
kt_double karto::Vector2< T >::Length | ( | ) | const [inline] |
void karto::Vector2< T >::MakeCeil | ( | const Vector2< T > & | rOther | ) | [inline] |
void karto::Vector2< T >::MakeFloor | ( | const Vector2< T > & | rOther | ) | [inline] |
kt_bool karto::Vector2< T >::operator!= | ( | const Vector2< T > & | rOther | ) | const [inline] |
kt_double karto::Vector2< T >::operator* | ( | const Vector2< T > & | rOther | ) | const [inline] |
const Vector2 karto::Vector2< T >::operator* | ( | T | scalar | ) | const [inline] |
void karto::Vector2< T >::operator*= | ( | T | scalar | ) | [inline] |
const Vector2 karto::Vector2< T >::operator+ | ( | const Vector2< T > & | rOther | ) | const [inline] |
void karto::Vector2< T >::operator+= | ( | const Vector2< T > & | rOther | ) | [inline] |
const Vector2 karto::Vector2< T >::operator- | ( | const Vector2< T > & | rOther | ) | const [inline] |
const Vector2 karto::Vector2< T >::operator- | ( | T | scalar | ) | const [inline] |
void karto::Vector2< T >::operator-= | ( | const Vector2< T > & | rOther | ) | [inline] |
const Vector2 karto::Vector2< T >::operator/ | ( | T | scalar | ) | const [inline] |
void karto::Vector2< T >::operator/= | ( | T | scalar | ) | [inline] |
kt_bool karto::Vector2< T >::operator< | ( | const Vector2< T > & | rOther | ) | const [inline] |
kt_bool karto::Vector2< T >::operator== | ( | const Vector2< T > & | rOther | ) | const [inline] |
void karto::Vector2< T >::SetX | ( | const T & | x | ) | [inline] |
void karto::Vector2< T >::SetY | ( | const T & | y | ) | [inline] |
kt_double karto::Vector2< T >::SquaredDistance | ( | const Vector2< T > & | rOther | ) | const [inline] |
kt_double karto::Vector2< T >::SquaredLength | ( | ) | const [inline] |
std::ostream& operator<< | ( | std::ostream & | rStream, |
const Vector2< T > & | rVector | ||
) | [friend] |
std::istream& operator>> | ( | std::istream & | rStream, |
const Vector2< T > & | |||
) | [friend] |
T karto::Vector2< T >::m_Values[2] [private] |