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

#include <v2_t.h>

Public Member Functions

 v2t ()
 
 v2t (const v2t< T > &src)
 
 v2t (const T x, const T y)
 
 v2t (const T s)
 
v2t< T > & operator= (const v2t< T > &src)
 
v2t< T > & operator= (const v3t< T > &src)
 
v2t< T > & operator+= (const v2t< T > &src)
 
v2t< T > & operator-= (const v2t< T > &src)
 
v2t< T > & operator*= (const T s)
 
v2t< T > & operator/= (const T s)
 
v2t< T > operator- (void) const
 
v2t< T > operator+ (const v2t< T > &src) const
 
v2t< T > operator- (const v2t< T > &src) const
 
v2t< T > operator* (const T s) const
 
operator* (const v2t< T > &src) const
 
v2t< T > operator/ (const T s) const
 
int operator== (const v2t< T > &src) const
 
int operator!= (const v2t< T > &src) const
 
len (void) const
 
void normalize (void)
 
dist (const v2t< T > &p) const
 
cosalpha (const v2t< T > &p2, const v2t< T > &center) const
 
v2t< T > rotate (const v2t< T > &c, T arc) const
 
fakeCrossProduct (const v2t< T > *b) const
 
int approxEquals (const v2t< T > &cmp, T eps)
 

Public Attributes

union {
   struct {
      T   x
 
      T   y
 
   } 
 
   T   vec [2]
 
}; 
 

Friends

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

Detailed Description

template<class T>
class v2t< T >

Definition at line 35 of file v2_t.h.

Constructor & Destructor Documentation

◆ v2t() [1/4]

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

Definition at line 48 of file v2_t.h.

◆ v2t() [2/4]

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

Definition at line 49 of file v2_t.h.

◆ v2t() [3/4]

template<class T>
v2t< T >::v2t ( const T  x,
const T  y 
)
inline

Definition at line 50 of file v2_t.h.

◆ v2t() [4/4]

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

Definition at line 51 of file v2_t.h.

Member Function Documentation

◆ approxEquals()

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

Definition at line 175 of file v2_t.h.

◆ cosalpha()

template<class T>
T v2t< T >::cosalpha ( const v2t< T > &  p2,
const v2t< T > &  center 
) const
inline

Definition at line 215 of file v2_t.h.

◆ dist()

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

Definition at line 240 of file v2_t.h.

◆ fakeCrossProduct()

template<class T>
T v2t< T >::fakeCrossProduct ( const v2t< T > *  b) const
inline

Definition at line 255 of file v2_t.h.

◆ len()

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

Definition at line 233 of file v2_t.h.

◆ normalize()

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

Definition at line 247 of file v2_t.h.

◆ operator!=()

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

Definition at line 168 of file v2_t.h.

◆ operator*() [1/2]

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

Definition at line 195 of file v2_t.h.

◆ operator*() [2/2]

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

Definition at line 188 of file v2_t.h.

◆ operator*=()

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

Definition at line 122 of file v2_t.h.

◆ operator+()

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

Definition at line 138 of file v2_t.h.

◆ operator+=()

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

Definition at line 106 of file v2_t.h.

◆ operator-() [1/2]

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

Definition at line 145 of file v2_t.h.

◆ operator-() [2/2]

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

Definition at line 152 of file v2_t.h.

◆ operator-=()

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

Definition at line 114 of file v2_t.h.

◆ operator/()

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

Definition at line 208 of file v2_t.h.

◆ operator/=()

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

Definition at line 130 of file v2_t.h.

◆ operator=() [1/2]

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

Definition at line 90 of file v2_t.h.

◆ operator=() [2/2]

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

Definition at line 98 of file v2_t.h.

◆ operator==()

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

Definition at line 158 of file v2_t.h.

◆ rotate()

template<class T>
v2t< T > v2t< T >::rotate ( const v2t< T > &  c,
arc 
) const
inline

Definition at line 224 of file v2_t.h.

Friends And Related Function Documentation

◆ operator*

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

Definition at line 202 of file v2_t.h.

Member Data Documentation

◆ @1

union { ... }

◆ vec

template<class T>
T v2t< T >::vec[2]

Definition at line 84 of file v2_t.h.

◆ x

template<class T>
T v2t< T >::x

Definition at line 83 of file v2_t.h.

◆ y

template<class T>
T v2t< T >::y

Definition at line 83 of file v2_t.h.


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