#include <Vector2.h>
Public Member Functions | |
BasicVector2 () | |
BasicVector2 (const Element &x_, const Element &y_) | |
Element & | x () |
Element & | y () |
const Element & | x () const |
const Element & | y () const |
Element & | operator[] (std::size_t i) |
const Element & | operator[] (std::size_t i) const |
Element * | data () |
const Element * | data () const |
bool | operator== (const BasicVector2 &other) const |
bool | operator!= (const BasicVector2 &other) const |
BasicVector2< Element > | operator- () const |
template<typename OtherElement > | |
BasicVector2< Element > | operator+ (const BasicVector2< OtherElement > &other) const |
template<typename OtherElement > | |
void | operator+= (const BasicVector2< OtherElement > &other) |
template<typename OtherElement > | |
BasicVector2< Element > | operator- (const BasicVector2< OtherElement > &other) const |
template<typename OtherElement > | |
void | operator-= (const BasicVector2< OtherElement > &other) |
template<typename OtherElement > | |
BasicVector2< Element > | operator* (const BasicVector2< OtherElement > &other) const |
template<typename OtherElement > | |
void | operator*= (const BasicVector2< OtherElement > &other) |
template<typename OtherElement > | |
BasicVector2< Element > | operator* (const OtherElement &other) const |
template<typename OtherElement > | |
void | operator*= (const OtherElement &other) |
template<typename OtherElement > | |
BasicVector2< Element > | operator/ (const BasicVector2< OtherElement > &other) const |
template<typename OtherElement > | |
void | operator/= (const BasicVector2< OtherElement > &other) |
template<typename OtherElement > | |
BasicVector2< Element > | operator/ (const OtherElement &other) const |
template<typename OtherElement > | |
void | operator/= (const OtherElement &other) |
double | getLength () const |
double | getLengthSquared () const |
template<typename OtherT > | |
Element | dot (const BasicVector2< OtherT > &other) const |
template<typename OtherT > | |
Element | crossProduct (const BasicVector2< OtherT > &other) const |
std::string | toString () const |
Private Attributes | |
Element | m_elements [2] |
Definition at line 23 of file Vector2.h.
BasicVector2< Element >::BasicVector2 | ( | ) | [inline] |
BasicVector2< Element >::BasicVector2 | ( | const Element & | x_, | |
const Element & | y_ | |||
) | [inline] |
Construct a BasicVector2 with the 2 provided components.
Element BasicVector2< Element >::crossProduct | ( | const BasicVector2< OtherT > & | other | ) | const [inline] |
const Element* BasicVector2< Element >::data | ( | ) | const [inline] |
Element* BasicVector2< Element >::data | ( | ) | [inline] |
Element BasicVector2< Element >::dot | ( | const BasicVector2< OtherT > & | other | ) | const [inline] |
double BasicVector2< Element >::getLength | ( | ) | const [inline] |
double BasicVector2< Element >::getLengthSquared | ( | ) | const [inline] |
bool BasicVector2< Element >::operator!= | ( | const BasicVector2< Element > & | other | ) | const [inline] |
Compare this BasicVector2 against another for inequality.
BasicVector2<Element> BasicVector2< Element >::operator* | ( | const OtherElement & | other | ) | const [inline] |
BasicVector2<Element> BasicVector2< Element >::operator* | ( | const BasicVector2< OtherElement > & | other | ) | const [inline] |
void BasicVector2< Element >::operator*= | ( | const OtherElement & | other | ) | [inline] |
void BasicVector2< Element >::operator*= | ( | const BasicVector2< OtherElement > & | other | ) | [inline] |
BasicVector2<Element> BasicVector2< Element >::operator+ | ( | const BasicVector2< OtherElement > & | other | ) | const [inline] |
void BasicVector2< Element >::operator+= | ( | const BasicVector2< OtherElement > & | other | ) | [inline] |
BasicVector2<Element> BasicVector2< Element >::operator- | ( | const BasicVector2< OtherElement > & | other | ) | const [inline] |
BasicVector2<Element> BasicVector2< Element >::operator- | ( | ) | const [inline] |
void BasicVector2< Element >::operator-= | ( | const BasicVector2< OtherElement > & | other | ) | [inline] |
BasicVector2<Element> BasicVector2< Element >::operator/ | ( | const OtherElement & | other | ) | const [inline] |
BasicVector2<Element> BasicVector2< Element >::operator/ | ( | const BasicVector2< OtherElement > & | other | ) | const [inline] |
void BasicVector2< Element >::operator/= | ( | const OtherElement & | other | ) | [inline] |
void BasicVector2< Element >::operator/= | ( | const BasicVector2< OtherElement > & | other | ) | [inline] |
bool BasicVector2< Element >::operator== | ( | const BasicVector2< Element > & | other | ) | const [inline] |
Compare this BasicVector2 against another for equality.
const Element& BasicVector2< Element >::operator[] | ( | std::size_t | i | ) | const [inline] |
Element& BasicVector2< Element >::operator[] | ( | std::size_t | i | ) | [inline] |
std::string BasicVector2< Element >::toString | ( | ) | const [inline] |
const Element& BasicVector2< Element >::x | ( | ) | const [inline] |
Element& BasicVector2< Element >::x | ( | ) | [inline] |
Definition at line 43 of file Vector2.h.
Referenced by BasicVector2< float >::BasicVector2(), BasicVector2< float >::crossProduct(), BasicVector2< float >::dot(), BasicVector2< float >::operator*(), BasicVector2< float >::operator*=(), BasicVector2< float >::operator+(), BasicVector2< float >::operator+=(), BasicVector2< float >::operator-(), BasicVector2< float >::operator-=(), BasicVector2< float >::operator/(), BasicVector2< float >::operator/=(), and BasicVector2< float >::operator==().
const Element& BasicVector2< Element >::y | ( | ) | const [inline] |
Element& BasicVector2< Element >::y | ( | ) | [inline] |
Definition at line 47 of file Vector2.h.
Referenced by BasicVector2< float >::BasicVector2(), BasicVector2< float >::crossProduct(), BasicVector2< float >::dot(), BasicVector2< float >::operator*(), BasicVector2< float >::operator*=(), BasicVector2< float >::operator+(), BasicVector2< float >::operator+=(), BasicVector2< float >::operator-(), BasicVector2< float >::operator-=(), BasicVector2< float >::operator/(), BasicVector2< float >::operator/=(), and BasicVector2< float >::operator==().
Element BasicVector2< Element >::m_elements[2] [private] |
Definition at line 26 of file Vector2.h.
Referenced by BasicVector2< float >::crossProduct(), BasicVector2< float >::data(), BasicVector2< float >::dot(), BasicVector2< float >::getLength(), BasicVector2< float >::getLengthSquared(), BasicVector2< float >::operator*(), BasicVector2< float >::operator*=(), BasicVector2< float >::operator+(), BasicVector2< float >::operator+=(), BasicVector2< float >::operator-(), BasicVector2< float >::operator-=(), BasicVector2< float >::operator/(), BasicVector2< float >::operator/=(), BasicVector2< float >::operator[](), BasicVector2< float >::toString(), BasicVector2< float >::x(), and BasicVector2< float >::y().