TORCS  1.3.9
The Open Racing Car Simulator
Vector Class Reference

#include <Vector.h>

Inheritance diagram for Vector:
Collaboration diagram for Vector:

Public Member Functions

 Vector ()
 
 Vector (const float v[3])
 
 Vector (const double v[3])
 
 Vector (Scalar x, Scalar y, Scalar z)
 
Vectoroperator+= (const Vector &v)
 
Vectoroperator-= (const Vector &v)
 
Vectoroperator*= (Scalar s)
 
Vectoroperator/= (Scalar s)
 
Scalar length2 () const
 
Scalar length () const
 
bool approxZero () const
 
void normalize ()
 
Vector normalized () const
 
int closestAxis () const
 
- Public Member Functions inherited from Tuple3
 Tuple3 ()
 
 Tuple3 (const float v[3])
 
 Tuple3 (const double v[3])
 
 Tuple3 (Scalar x, Scalar y, Scalar z)
 
Scalaroperator[] (int i)
 
const Scalaroperator[] (int i) const
 
ScalargetValue ()
 
const ScalargetValue () const
 
void setValue (const float v[3])
 
void setValue (const double v[3])
 
void setValue (Scalar x, Scalar y, Scalar z)
 

Static Public Member Functions

static Vector random ()
 

Additional Inherited Members

- Protected Attributes inherited from Tuple3
Scalar comp [3]
 

Detailed Description

Definition at line 32 of file Vector.h.

Constructor & Destructor Documentation

◆ Vector() [1/4]

Vector::Vector ( )
inline

Definition at line 34 of file Vector.h.

◆ Vector() [2/4]

Vector::Vector ( const float  v[3])
inline

Definition at line 35 of file Vector.h.

◆ Vector() [3/4]

Vector::Vector ( const double  v[3])
inline

Definition at line 36 of file Vector.h.

◆ Vector() [4/4]

Vector::Vector ( Scalar  x,
Scalar  y,
Scalar  z 
)
inline

Definition at line 37 of file Vector.h.

Member Function Documentation

◆ approxZero()

bool Vector::approxZero ( ) const
inline

Definition at line 128 of file Vector.h.

Here is the call graph for this function:

◆ closestAxis()

int Vector::closestAxis ( ) const
inline

Definition at line 133 of file Vector.h.

◆ length()

Scalar Vector::length ( ) const
inline

Definition at line 126 of file Vector.h.

Here is the call graph for this function:

◆ length2()

Scalar Vector::length2 ( ) const
inline

Definition at line 125 of file Vector.h.

Here is the call graph for this function:

◆ normalize()

void Vector::normalize ( void  )
inline

Definition at line 130 of file Vector.h.

Here is the call graph for this function:

◆ normalized()

Vector Vector::normalized ( ) const
inline

Definition at line 131 of file Vector.h.

Here is the call graph for this function:

◆ operator*=()

Vector & Vector::operator*= ( Scalar  s)
inline

Definition at line 88 of file Vector.h.

◆ operator+=()

Vector & Vector::operator+= ( const Vector v)
inline

Definition at line 78 of file Vector.h.

◆ operator-=()

Vector & Vector::operator-= ( const Vector v)
inline

Definition at line 83 of file Vector.h.

◆ operator/=()

Vector & Vector::operator/= ( Scalar  s)
inline

Definition at line 93 of file Vector.h.

Here is the call graph for this function:

◆ random()

Vector Vector::random ( )
inlinestatic

Definition at line 139 of file Vector.h.

Here is the call graph for this function:

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