Storage and manipulation of vectors. More...
Public Member Functions | |
Vector (const T &x, const T &y, const T &z) | |
Vector (const Vector &v) | |
Vector () | |
Vector (const Core::RGB< T > &rgb) | |
template<typename U > | |
Vector (const Core::RGB< U > &rgb) | |
template<typename U > | |
Vector (const Vector< U > &v) | |
~Vector () | |
T & | operator[] (uint i) |
const T & | operator[] (uint i) const |
bool | operator== (const Vector &v) const |
Vector | operator- () const |
T | length2 () const |
T | length () const |
T | normalize () |
Vector< T > | normal () const |
Vector< T > | orthogonal () const |
Vector | operator+ (const Vector &v) const |
Vector | operator- (const Vector &v) const |
Vector & | operator+= (const Vector &v) |
Vector | operator* (const T &s) const |
Vector | operator/ (const T &s) const |
Vector & | operator*= (const T &s) |
Static Public Attributes | |
static const Vector | Epsilon |
static const Vector | One |
static const Vector | Max |
static const Vector | Min |
static const Vector | Zero |
Private Attributes | |
T | e [3] |
Friends | |
class | Point< T > |
class | Vector |
Vector< T > | Math::operator* (const T &, const Vector< T > &) |
Vector< T > | Math::operator/ (const T &, const Vector< T > &) |
T | Math::Dot (const Vector< T > &, const Vector< T > &) |
Vector< T > | Math::Cross (const Vector< T > &, const Vector< T > &) |
Vector | Min (const Vector &v0, const Vector &v1) |
Vector | Max (const Vector &v0, const Vector &v1) |
istream & | operator>> (istream &in, Vector &v) |
ostream & | operator<< (ostream &out, const Vector &v) |
Storage and manipulation of vectors.
Math::Vector< T >::Vector | ( | const T & | x, |
const T & | y, | ||
const T & | z | ||
) | [inline] |
References Math::Vector< T >::e.
Math::Vector< T >::Vector | ( | const Vector< T > & | v | ) | [inline] |
References Math::Vector< T >::e.
Math::Vector< T >::Vector | ( | ) | [inline] |
References Math::Vector< T >::e.
Referenced by Math::Vector< T >::operator*(), Math::Vector< T >::operator+(), Math::Vector< T >::operator-(), and Math::Vector< T >::operator/().
Math::Vector< T >::Vector | ( | const Core::RGB< T > & | rgb | ) | [inline, explicit] |
References Core::RGB< T >::e, and Math::Vector< T >::e.
Math::Vector< T >::Vector | ( | const Core::RGB< U > & | rgb | ) | [inline, explicit] |
References Core::RGB< T >::e, and Math::Vector< T >::e.
Math::Vector< T >::Vector | ( | const Vector< U > & | v | ) | [inline, explicit] |
References Math::Vector< T >::e.
Math::Vector< T >::~Vector | ( | ) | [inline] |
T Math::Vector< T >::length | ( | ) | const [inline] |
References Math::Vector< T >::length2(), and Math::Sqrt().
Referenced by Math::Vector< T >::normalize().
T Math::Vector< T >::length2 | ( | ) | const [inline] |
References Math::Vector< T >::e.
Referenced by Math::Vector< T >::length().
Vector<T> Math::Vector< T >::normal | ( | ) | const [inline] |
References Math::Vector< T >::e, and Math::Sqrt().
Referenced by Math::Quaternion::encodeR(), and Math::Vector< T >::orthogonal().
T Math::Vector< T >::normalize | ( | ) | [inline] |
References Math::Vector< T >::e, and Math::Vector< T >::length().
Vector Math::Vector< T >::operator* | ( | const T & | s | ) | const [inline] |
References Math::Vector< T >::e, and Math::Vector< T >::Vector().
Vector& Math::Vector< T >::operator*= | ( | const T & | s | ) | [inline] |
References Math::Vector< T >::e.
Vector Math::Vector< T >::operator+ | ( | const Vector< T > & | v | ) | const [inline] |
References Math::Vector< T >::e, and Math::Vector< T >::Vector().
Vector& Math::Vector< T >::operator+= | ( | const Vector< T > & | v | ) | [inline] |
References Math::Vector< T >::e.
Vector Math::Vector< T >::operator- | ( | ) | const [inline] |
References Math::Vector< T >::e, and Math::Vector< T >::Vector().
Vector Math::Vector< T >::operator- | ( | const Vector< T > & | v | ) | const [inline] |
References Math::Vector< T >::e, and Math::Vector< T >::Vector().
Vector Math::Vector< T >::operator/ | ( | const T & | s | ) | const [inline] |
References Math::Vector< T >::e, and Math::Vector< T >::Vector().
bool Math::Vector< T >::operator== | ( | const Vector< T > & | v | ) | const [inline] |
References Math::Vector< T >::e.
T& Math::Vector< T >::operator[] | ( | uint | i | ) | [inline] |
References Math::Vector< T >::e.
const T& Math::Vector< T >::operator[] | ( | uint | i | ) | const [inline] |
References Math::Vector< T >::e.
Vector<T> Math::Vector< T >::orthogonal | ( | ) | const [inline] |
References Math::Abs(), Math::Vector< T >::e, and Math::Vector< T >::normal().
Vector<T> Math::Cross | ( | const Vector< T > & | , |
const Vector< T > & | |||
) | [friend] |
ostream& operator<< | ( | ostream & | out, |
const Vector< T > & | v | ||
) | [friend] |
istream& operator>> | ( | istream & | in, |
Vector< T > & | v | ||
) | [friend] |
friend class Point< T > [friend] |
friend class Vector [friend] |
T Math::Vector< T >::e[3] [private] |
Referenced by Math::Cross(), Math::Dot(), Math::Vector< T >::length2(), Math::Vector< T >::normal(), Math::Vector< T >::normalize(), Math::Quaternion::operator*(), Math::operator*(), Math::Vector< T >::operator*(), Math::Vector< T >::operator*=(), Math::Point< T >::operator+(), Math::Vector< T >::operator+(), Math::Vector< T >::operator+=(), Math::Point< T >::operator-(), Math::Vector< T >::operator-(), Math::operator/(), Math::Vector< T >::operator/(), Math::Vector< T >::operator==(), Math::Vector< T >::operator[](), Math::Vector< T >::orthogonal(), and Math::Vector< T >::Vector().
const Vector< T > Math::Vector< T >::Epsilon [static] |
const Vector< T > Math::Vector< T >::Max [static] |
const Vector< T > Math::Vector< T >::Min [static] |
const Vector< T > Math::Vector< T >::One [static] |
const Vector< T > Math::Vector< T >::Zero [static] |