TORCS  1.3.10
The Open Racing Car Simulator
Loading...
Searching...
No Matches
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)
Vector & operator+= (const Vector &v)
Vector & operator-= (const Vector &v)
Vector & operator*= (Scalar s)
Vector & operator/= (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)
Scalar & operator[] (int i)
const Scalar & operator[] (int i) const
Scalar * getValue ()
const Scalar * getValue () 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.

Here is the call graph for this function:

◆ Vector() [3/4]

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

Definition at line 36 of file Vector.h.

Here is the call graph for this function:

◆ Vector() [4/4]

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

Definition at line 37 of file Vector.h.

Here is the call graph for this function:

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 ( )
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.

Here is the call graph for this function:

◆ operator+=()

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

Definition at line 78 of file Vector.h.

Here is the call graph for this function:

◆ operator-=()

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

Definition at line 83 of file Vector.h.

Here is the call graph for this function:

◆ 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:
  • C:/Users/berni/Development/torcs_git/torcs-code/torcs/torcs/src/modules/simu/simuv2/SOLID-2.0/include/3D/Vector.h