Public Member Functions | Public Attributes | Friends
RaveVector< T > Class Template Reference

#include <math.h>

List of all members.

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< Toperator* (const RaveVector< U > &r) const
RaveVector< Toperator* (T k) const
template<class U >
RaveVector< T > & operator*= (const RaveVector< U > &r)
RaveVector< T > & operator*= (const T k)
template<class U >
RaveVector< Toperator+ (const RaveVector< U > &r) const
template<class U >
RaveVector< T > & operator+= (const RaveVector< U > &r)
RaveVector< Toperator- () const
template<class U >
RaveVector< Toperator- (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
Toperator[] (int i)
template<class U >
RaveVector< Toperator^ (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)

Detailed Description

template<class T>
class RaveVector< T >

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

Definition at line 242 of file math.h.


Constructor & Destructor Documentation

template<class T>
RaveVector< T >::RaveVector ( ) [inline]

Definition at line 247 of file math.h.

template<class T>
RaveVector< T >::RaveVector ( T  x,
T  y,
T  z 
) [inline]

Definition at line 249 of file math.h.

template<class T>
RaveVector< T >::RaveVector ( T  x,
T  y,
T  z,
T  w 
) [inline]

Definition at line 250 of file math.h.

template<class T>
template<class U >
RaveVector< T >::RaveVector ( const RaveVector< U > &  vec) [inline]

Definition at line 251 of file math.h.

template<class T>
template<class U >
RaveVector< T >::RaveVector ( const U *  pf) [inline]

note, it only copes 3 values!

Definition at line 254 of file math.h.


Member Function Documentation

template<class T>
RaveVector<T>& RaveVector< T >::Cross ( const RaveVector< T > &  v) [inline]

3 dim cross product, w is not touched this = this x v

Definition at line 295 of file math.h.

template<class T>
RaveVector<T>& RaveVector< T >::Cross ( const RaveVector< T > &  u,
const RaveVector< T > &  v 
) [inline]

this = u x v

Definition at line 298 of file math.h.

template<class T>
template<class U >
T RaveVector< T >::dot ( const RaveVector< U > &  v) const [inline]

Definition at line 267 of file math.h.

template<class T>
T RaveVector< T >::lengthsqr2 ( ) const [inline]

Definition at line 285 of file math.h.

template<class T>
T RaveVector< T >::lengthsqr3 ( ) const [inline]

Definition at line 286 of file math.h.

template<class T>
T RaveVector< T >::lengthsqr4 ( ) const [inline]

Definition at line 287 of file math.h.

template<class T>
RaveVector<T>& RaveVector< T >::normalize ( ) [inline]

Definition at line 268 of file math.h.

template<class T>
RaveVector<T>& RaveVector< T >::normalize3 ( ) [inline]

Definition at line 277 of file math.h.

template<class T>
RaveVector<T>& RaveVector< T >::normalize4 ( ) [inline]

Definition at line 270 of file math.h.

template<class T>
RaveVector< T >::operator const T * ( ) const [inline]

Definition at line 261 of file math.h.

template<class T>
RaveVector< T >::operator T * ( ) [inline]

Definition at line 260 of file math.h.

template<class T>
template<class U >
RaveVector<T> RaveVector< T >::operator* ( const RaveVector< U > &  r) const [inline]

Definition at line 310 of file math.h.

template<class T>
RaveVector<T> RaveVector< T >::operator* ( T  k) const [inline]

Definition at line 311 of file math.h.

template<class T>
template<class U >
RaveVector<T>& RaveVector< T >::operator*= ( const RaveVector< U > &  r) [inline]

Definition at line 315 of file math.h.

template<class T>
RaveVector<T>& RaveVector< T >::operator*= ( const T  k) [inline]

Definition at line 317 of file math.h.

template<class T>
template<class U >
RaveVector<T> RaveVector< T >::operator+ ( const RaveVector< U > &  r) const [inline]

Definition at line 308 of file math.h.

template<class T>
template<class U >
RaveVector<T>& RaveVector< T >::operator+= ( const RaveVector< U > &  r) [inline]

Definition at line 313 of file math.h.

template<class T>
RaveVector<T> RaveVector< T >::operator- ( ) const [inline]

Definition at line 307 of file math.h.

template<class T>
template<class U >
RaveVector<T> RaveVector< T >::operator- ( const RaveVector< U > &  r) const [inline]

Definition at line 309 of file math.h.

template<class T>
template<class U >
RaveVector<T>& RaveVector< T >::operator-= ( const RaveVector< U > &  r) [inline]

Definition at line 314 of file math.h.

template<class T>
RaveVector<T>& RaveVector< T >::operator/= ( const T  _k) [inline]

Definition at line 318 of file math.h.

template<class T>
template<class U >
RaveVector<T>& RaveVector< T >::operator= ( const RaveVector< U > &  r) [inline]

Definition at line 264 of file math.h.

template<class T>
T RaveVector< T >::operator[] ( int  i) const [inline]

Definition at line 256 of file math.h.

template<class T>
T& RaveVector< T >::operator[] ( int  i) [inline]

Definition at line 257 of file math.h.

template<class T>
template<class U >
RaveVector<T> RaveVector< T >::operator^ ( const RaveVector< U > &  v) const [inline]

cross product operator

Definition at line 327 of file math.h.

template<class T>
void RaveVector< T >::Set3 ( const T pvals) [inline]

Definition at line 289 of file math.h.

template<class T>
void RaveVector< T >::Set3 ( T  val1,
T  val2,
T  val3 
) [inline]

Definition at line 290 of file math.h.

template<class T>
void RaveVector< T >::Set4 ( const T pvals) [inline]

Definition at line 291 of file math.h.

template<class T>
void RaveVector< T >::Set4 ( T  val1,
T  val2,
T  val3,
T  val4 
) [inline]

Definition at line 292 of file math.h.


Friends And Related Function Documentation

template<class T>
template<class U >
RaveVector<U> operator* ( float  f,
const RaveVector< U > &  v 
) [friend]
template<class T>
template<class U >
RaveVector<U> operator* ( double  f,
const RaveVector< U > &  v 
) [friend]
template<class T>
template<class S , class U >
std::basic_ostream<S>& operator<< ( std::basic_ostream< S > &  O,
const RaveVector< U > &  v 
) [friend]
template<class T>
template<class S , class U >
std::basic_istream<S>& operator>> ( std::basic_istream< S > &  I,
RaveVector< U > &  v 
) [friend]

Member Data Documentation

template<class T>
T RaveVector< T >::w

Definition at line 245 of file math.h.

template<class T>
T RaveVector< T >::x

Definition at line 245 of file math.h.

template<class T>
T RaveVector< T >::y

Definition at line 245 of file math.h.

template<class T>
T RaveVector< T >::z

Definition at line 245 of file math.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends Defines


checkerboard_detector
Author(s): Rosen Diankov (rdiankov@cs.cmu.edu)
autogenerated on Sat Mar 23 2013 18:37:21