TORCS  1.3.9
The Open Racing Car Simulator
v4t< T > Class Template Reference

#include <v4_t.h>

Public Member Functions

 v4t ()
 
 v4t (const v4t< T > &src)
 
 v4t (const T x, const T y, const T z, const T w)
 
 v4t (const T s)
 
v4t< T > & operator= (const v4t< T > &src)
 
v4t< T > & operator+= (const v4t< T > &src)
 
v4t< T > & operator-= (const v4t< T > &src)
 
v4t< T > & operator*= (const T s)
 
v4t< T > & operator/= (const T s)
 
v4t< T > operator- (void) const
 
v4t< T > operator+ (const v4t< T > &src) const
 
v4t< T > operator- (const v4t< T > &src) const
 
v4t< T > operator* (const T s) const
 
operator* (const v4t< T > &src) const
 
v4t< T > operator/ (const T s) const
 
int operator== (const v4t< T > &src) const
 
int operator!= (const v4t< T > &src) const
 
len (void) const
 
void normalize (void)
 
dist (const v4t< T > &p) const
 
int approxEquals (const v4t< T > &cmp, T eps)
 

Public Attributes

union {
   struct {
      T   x
 
      T   y
 
      T   z
 
      T   w
 
   } 
 
   T   vec [4]
 
}; 
 

Friends

v4t< T > operator* (const T s, const v4t< T > &src)
 

Detailed Description

template<class T>
class v4t< T >

Definition at line 33 of file v4_t.h.

Constructor & Destructor Documentation

◆ v4t() [1/4]

template<class T>
v4t< T >::v4t ( )
inline

Definition at line 47 of file v4_t.h.

◆ v4t() [2/4]

template<class T>
v4t< T >::v4t ( const v4t< T > &  src)
inline

Definition at line 48 of file v4_t.h.

◆ v4t() [3/4]

template<class T>
v4t< T >::v4t ( const T  x,
const T  y,
const T  z,
const T  w 
)
inline

Definition at line 49 of file v4_t.h.

◆ v4t() [4/4]

template<class T>
v4t< T >::v4t ( const T  s)
inline

Definition at line 50 of file v4_t.h.

Member Function Documentation

◆ approxEquals()

template<class T >
int v4t< T >::approxEquals ( const v4t< T > &  cmp,
eps 
)
inline

Definition at line 162 of file v4_t.h.

◆ dist()

template<class T >
T v4t< T >::dist ( const v4t< T > &  p) const
inline

Definition at line 211 of file v4_t.h.

◆ len()

template<class T >
T v4t< T >::len ( void  ) const
inline

Definition at line 204 of file v4_t.h.

◆ normalize()

template<class T >
void v4t< T >::normalize ( void  )
inline

Definition at line 218 of file v4_t.h.

◆ operator!=()

template<class T >
int v4t< T >::operator!= ( const v4t< T > &  src) const
inline

Definition at line 155 of file v4_t.h.

◆ operator*() [1/2]

template<class T >
v4t< T > v4t< T >::operator* ( const T  s) const
inline

Definition at line 184 of file v4_t.h.

◆ operator*() [2/2]

template<class T >
T v4t< T >::operator* ( const v4t< T > &  src) const
inline

Definition at line 177 of file v4_t.h.

◆ operator*=()

template<class T >
v4t< T > & v4t< T >::operator*= ( const T  s)
inline

Definition at line 109 of file v4_t.h.

◆ operator+()

template<class T >
v4t< T > v4t< T >::operator+ ( const v4t< T > &  src) const
inline

Definition at line 125 of file v4_t.h.

◆ operator+=()

template<class T >
v4t< T > & v4t< T >::operator+= ( const v4t< T > &  src)
inline

Definition at line 93 of file v4_t.h.

◆ operator-() [1/2]

template<class T >
v4t< T > v4t< T >::operator- ( void  ) const
inline

Definition at line 132 of file v4_t.h.

◆ operator-() [2/2]

template<class T >
v4t< T > v4t< T >::operator- ( const v4t< T > &  src) const
inline

Definition at line 139 of file v4_t.h.

◆ operator-=()

template<class T >
v4t< T > & v4t< T >::operator-= ( const v4t< T > &  src)
inline

Definition at line 101 of file v4_t.h.

◆ operator/()

template<class T >
v4t< T > v4t< T >::operator/ ( const T  s) const
inline

Definition at line 197 of file v4_t.h.

◆ operator/=()

template<class T >
v4t< T > & v4t< T >::operator/= ( const T  s)
inline

Definition at line 117 of file v4_t.h.

◆ operator=()

template<class T >
v4t< T > & v4t< T >::operator= ( const v4t< T > &  src)
inline

Definition at line 85 of file v4_t.h.

◆ operator==()

template<class T >
int v4t< T >::operator== ( const v4t< T > &  src) const
inline

Definition at line 145 of file v4_t.h.

Friends And Related Function Documentation

◆ operator*

template<class T>
v4t<T> operator* ( const T  s,
const v4t< T > &  src 
)
friend

Definition at line 191 of file v4_t.h.

Member Data Documentation

◆ @9

union { ... }

◆ vec

template<class T>
T v4t< T >::vec[4]

Definition at line 79 of file v4_t.h.

◆ w

template<class T>
T v4t< T >::w

Definition at line 78 of file v4_t.h.

◆ x

template<class T>
T v4t< T >::x

Definition at line 78 of file v4_t.h.

◆ y

template<class T>
T v4t< T >::y

Definition at line 78 of file v4_t.h.

◆ z

template<class T>
T v4t< T >::z

Definition at line 78 of file v4_t.h.


The documentation for this class was generated from the following file: