#include <math.h>
Public Member Functions | |
RaveVector< T > & | Cross (const RaveVector< T > &v) |
RaveVector< T > & | Cross (const RaveVector< T > &u, const RaveVector< T > &v) |
this = u x v | |
template<class U > | |
T | dot (const RaveVector< U > &v) const |
T | lengthsqr2 () const |
T | lengthsqr3 () const |
T | lengthsqr4 () const |
RaveVector< T > & | normalize () |
RaveVector< T > & | normalize3 () |
RaveVector< T > & | normalize4 () |
operator const T * () const | |
operator T * () | |
template<class U > | |
RaveVector< T > | operator* (const RaveVector< U > &r) const |
RaveVector< T > | operator* (T k) const |
template<class U > | |
RaveVector< T > & | operator*= (const RaveVector< U > &r) |
RaveVector< T > & | operator*= (const T k) |
template<class U > | |
RaveVector< T > | operator+ (const RaveVector< U > &r) const |
template<class U > | |
RaveVector< T > & | operator+= (const RaveVector< U > &r) |
RaveVector< T > | operator- () const |
template<class U > | |
RaveVector< T > | operator- (const RaveVector< U > &r) const |
template<class U > | |
RaveVector< T > & | operator-= (const RaveVector< U > &r) |
RaveVector< T > & | operator/= (const T _k) |
template<class U > | |
RaveVector< T > & | operator= (const RaveVector< U > &r) |
T | operator[] (int i) const |
T & | operator[] (int i) |
template<class U > | |
RaveVector< T > | operator^ (const RaveVector< U > &v) const |
cross product operator | |
RaveVector () | |
RaveVector (T x, T y, T z) | |
RaveVector (T x, T y, T z, T w) | |
template<class U > | |
RaveVector (const RaveVector< U > &vec) | |
template<class U > | |
RaveVector (const U *pf) | |
note, it only copes 3 values! | |
void | Set3 (const T *pvals) |
void | Set3 (T val1, T val2, T val3) |
void | Set4 (const T *pvals) |
void | Set4 (T val1, T val2, T val3, T val4) |
Public Attributes | |
T | w |
T | x |
T | y |
T | z |
Friends | |
template<class U > | |
RaveVector< U > | operator* (float f, const RaveVector< U > &v) |
template<class U > | |
RaveVector< U > | operator* (double f, const RaveVector< U > &v) |
template<class S , class U > | |
std::basic_ostream< S > & | operator<< (std::basic_ostream< S > &O, const RaveVector< U > &v) |
template<class S , class U > | |
std::basic_istream< S > & | operator>> (std::basic_istream< S > &I, RaveVector< U > &v) |
class used for 3 and 4 dim vectors and quaternions It is better to use this for a 3 dim vector because it is 16byte aligned and SIMD instructions can be used
RaveVector< T >::RaveVector | ( | ) | [inline] |
RaveVector< T >::RaveVector | ( | T | x, |
T | y, | ||
T | z | ||
) | [inline] |
RaveVector< T >::RaveVector | ( | T | x, |
T | y, | ||
T | z, | ||
T | w | ||
) | [inline] |
RaveVector< T >::RaveVector | ( | const RaveVector< U > & | vec | ) | [inline] |
RaveVector<T>& RaveVector< T >::Cross | ( | const RaveVector< T > & | v | ) | [inline] |
RaveVector<T>& RaveVector< T >::Cross | ( | const RaveVector< T > & | u, |
const RaveVector< T > & | v | ||
) | [inline] |
T RaveVector< T >::dot | ( | const RaveVector< U > & | v | ) | const [inline] |
T RaveVector< T >::lengthsqr2 | ( | ) | const [inline] |
T RaveVector< T >::lengthsqr3 | ( | ) | const [inline] |
T RaveVector< T >::lengthsqr4 | ( | ) | const [inline] |
RaveVector<T>& RaveVector< T >::normalize | ( | ) | [inline] |
RaveVector<T>& RaveVector< T >::normalize3 | ( | ) | [inline] |
RaveVector<T>& RaveVector< T >::normalize4 | ( | ) | [inline] |
RaveVector< T >::operator const T * | ( | ) | const [inline] |
RaveVector< T >::operator T * | ( | ) | [inline] |
RaveVector<T> RaveVector< T >::operator* | ( | const RaveVector< U > & | r | ) | const [inline] |
RaveVector<T> RaveVector< T >::operator* | ( | T | k | ) | const [inline] |
RaveVector<T>& RaveVector< T >::operator*= | ( | const RaveVector< U > & | r | ) | [inline] |
RaveVector<T>& RaveVector< T >::operator*= | ( | const T | k | ) | [inline] |
RaveVector<T> RaveVector< T >::operator+ | ( | const RaveVector< U > & | r | ) | const [inline] |
RaveVector<T>& RaveVector< T >::operator+= | ( | const RaveVector< U > & | r | ) | [inline] |
RaveVector<T> RaveVector< T >::operator- | ( | ) | const [inline] |
RaveVector<T> RaveVector< T >::operator- | ( | const RaveVector< U > & | r | ) | const [inline] |
RaveVector<T>& RaveVector< T >::operator-= | ( | const RaveVector< U > & | r | ) | [inline] |
RaveVector<T>& RaveVector< T >::operator/= | ( | const T | _k | ) | [inline] |
RaveVector<T>& RaveVector< T >::operator= | ( | const RaveVector< U > & | r | ) | [inline] |
T RaveVector< T >::operator[] | ( | int | i | ) | const [inline] |
T& RaveVector< T >::operator[] | ( | int | i | ) | [inline] |
RaveVector<T> RaveVector< T >::operator^ | ( | const RaveVector< U > & | v | ) | const [inline] |
void RaveVector< T >::Set3 | ( | const T * | pvals | ) | [inline] |
void RaveVector< T >::Set3 | ( | T | val1, |
T | val2, | ||
T | val3 | ||
) | [inline] |
void RaveVector< T >::Set4 | ( | const T * | pvals | ) | [inline] |
void RaveVector< T >::Set4 | ( | T | val1, |
T | val2, | ||
T | val3, | ||
T | val4 | ||
) | [inline] |
RaveVector<U> operator* | ( | float | f, |
const RaveVector< U > & | v | ||
) | [friend] |
RaveVector<U> operator* | ( | double | f, |
const RaveVector< U > & | v | ||
) | [friend] |
std::basic_ostream<S>& operator<< | ( | std::basic_ostream< S > & | O, |
const RaveVector< U > & | v | ||
) | [friend] |
std::basic_istream<S>& operator>> | ( | std::basic_istream< S > & | I, |
RaveVector< U > & | v | ||
) | [friend] |
T RaveVector< T >::w |
T RaveVector< T >::x |
T RaveVector< T >::y |
T RaveVector< T >::z |