TORCS  1.3.10
The Open Racing Car Simulator
Loading...
Searching...
No Matches
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
T 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
T len (void) const
void normalize (void)
T dist (const v2t< T > &p) const
T cosalpha (const v2t< T > &p2, const v2t< T > &center) const
v2t< T > rotate (const v2t< T > &c, T arc) const
T 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 40 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,
T eps )
inline

Definition at line 175 of file v2_t.h.

Here is the call graph for this function:

◆ 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.

Here is the call graph for this function:

◆ dist()

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

Definition at line 240 of file v2_t.h.

Here is the call graph for this function:

◆ fakeCrossProduct()

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

Definition at line 255 of file v2_t.h.

Here is the call graph for this function:

◆ 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.

Here is the call graph for this function:

◆ operator!=()

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

Definition at line 168 of file v2_t.h.

Here is the call graph for this function:

◆ 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.

Here is the call graph for this function:

◆ 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.

Here is the call graph for this function:

◆ operator*=()

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

Definition at line 122 of file v2_t.h.

Here is the call graph for this function:

◆ operator+()

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

Definition at line 138 of file v2_t.h.

Here is the call graph for this function:

◆ operator+=()

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

Definition at line 106 of file v2_t.h.

Here is the call graph for this function:

◆ operator-() [1/2]

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

Definition at line 152 of file v2_t.h.

Here is the call graph for this function:

◆ operator-() [2/2]

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

Definition at line 145 of file v2_t.h.

Here is the call graph for this function:

◆ operator-=()

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

Definition at line 114 of file v2_t.h.

Here is the call graph for this function:

◆ operator/()

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

Definition at line 208 of file v2_t.h.

Here is the call graph for this function:

◆ operator/=()

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

Definition at line 130 of file v2_t.h.

Here is the call graph for this function:

◆ 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.

Here is the call graph for this function:

◆ 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.

Here is the call graph for this function:

◆ operator==()

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

Definition at line 158 of file v2_t.h.

Here is the call graph for this function:

◆ rotate()

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

Definition at line 224 of file v2_t.h.

Here is the call graph for this function:

◆ 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

◆ [union]

union { ... } v2t< T >

◆ 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:
  • C:/Users/berni/Development/torcs_git/torcs-code/torcs/torcs/src/libs/math/v2_t.h