Public Types |
|
typedef T * | iterator |
|
typedef const T * | const_iterator |
Public Member Functions |
|
| Vector2 (const T a) |
|
| Vector2 (const T x, const T y) |
|
| Vector2 (const float *values) |
|
| Vector2 (const double *values) |
|
template<typename U > |
| | Vector2 (const Vector2< U > &a) |
|
void | set (T x, T y) |
|
void | set (const float *values) |
|
void | set (const double *values) |
|
bool | set (const std::string &values, char delimiter= ' ') |
|
bool | set (const std::vector< std::string > &values) |
|
const Vector2 & | operator= (T a) |
|
const Vector2 & | operator= (const Vector2 &a) |
|
template<typename U > |
| const Vector2 & | operator= (const Vector2< U > &a) |
|
T & | operator[] (size_t position) |
|
const T & | operator[] (size_t position) const |
|
Vector2 | operator+ (const T a) const |
|
Vector2 | operator- (const T a) const |
|
Vector2 | operator* (const T a) const |
|
Vector2 | operator/ (T a) const |
|
const Vector2 & | operator+= (T a) |
|
const Vector2 & | operator-= (T a) |
|
const Vector2 & | operator*= (T a) |
|
const Vector2 & | operator/= (T a) |
|
Vector2 | operator+ (const Vector2 &a) const |
|
Vector2 | operator- (const Vector2 &a) const |
|
Vector2 | operator* (const Vector2 &a) const |
|
Vector2 | operator/ (const Vector2 &a) const |
|
Vector2 | operator- () const |
|
const Vector2 & | operator+= (const Vector2 &a) |
|
const Vector2 & | operator-= (const Vector2 &a) |
|
const Vector2 & | operator*= (const Vector2 &a) |
|
const Vector2 & | operator/= (const Vector2 &a) |
|
bool | operator== (const Vector2 &a) const |
|
bool | operator!= (const Vector2 &a) const |
|
bool | isAkin (const Vector2 &a, const T &delta=std::numeric_limits< T >::epsilon()) const |
|
size_t | smaller (const Vector2 &a) const |
|
size_t | smaller (const Vector2 &a, const size_t axis) const |
|
size_t | greater (const Vector2 &a) const |
|
size_t | greater (const Vector2 &a, const size_t axis) const |
|
T | length () const |
|
T | lengthSquared () const |
|
T | normalize () |
|
T | normalize (const float *source) |
|
T | normalise () |
|
T | normalise (const float *source) |
|
Vector2 | getNormalized () const |
|
void | scale (T scale_factor) |
|
void | invert () |
|
T | getMinComponent () const |
|
T | getMaxComponent () const |
|
T | getArea () const |
|
void | clamp (T lower, T upper) |
|
void | randomize () |
|
bool | getString (std::string &result, const std::string &delimiter=" ") const |
|
iterator | begin () |
|
const_iterator | begin () const |
|
iterator | end () |
|
const_iterator | end () const |
|
template<> |
| float | length () const |
Public Attributes |
|
union { |
|
struct { |
| T x |
| T y |
| } | |
|
struct { |
| T min |
| T max |
| } | |
| T xy [2] |
| T array [2] |
| }; | |
Static Public Attributes |
|
static const Vector2 | ZERO |
Friends |
|
std::ostream & | operator<< (std::ostream &os, const Vector2 &v) |