random_racer::TestCar Class Reference

#include <TestCar.h>

Inheritance diagram for random_racer::TestCar:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 TestCar (VRS::SO< VRS::SceneThing >)
 ~TestCar ()
void accelerate (double)
 accelerate the car.
void steer (double)
 steering.
void handBreak (double)
 break.
void nitro (double)
 activate nitro.
VRS::SO< VRS::SceneThing > sceneThing ()
void attachCamera (VRS::SO< VRS::Camera >)
void setPosition (VRS::Vector)
 set the position of the car.
void setPosition (double, double, double)
 set the position of the car.
VRS::Vector position ()
 returns the position of the car.
VRS::SO< vrsode::CollisionBodycameraHook ()
 Returns a CollisionBody SO to which the car wants the 3rd person camera get attached to.
VRS::SO< vrsode::CollisionBodychassis ()
 return the cars chassis for e.g.

Private Member Functions

void enableAllBodies ()

Private Attributes

bool m_debugNodes
double m_springLengthFront
double m_springLengthRear
double m_springPowerFront
double m_springPowerRear
double m_springSpeedFront
double m_springSpeedRear
double m_wheelSizeFront
double m_wheelSizeRear
double m_wheelMass
double m_bodyMass
double m_wheelMu
double m_carMaxSpeed
double m_carPower
VRS::Vector m_wheelOffsetFL
VRS::Vector m_wheelOffsetFR
VRS::Vector m_wheelOffsetRL
VRS::Vector m_wheelOffsetRR
VRS::Vector m_chassisOffset
VRS::Vector m_suspensionOffsetFL
VRS::Vector m_suspensionOffsetFR
VRS::Vector m_suspensionOffsetRL
VRS::Vector m_suspensionOffsetRR
VRS::Vector m_steerOffsetFL
VRS::Vector m_steerOffsetFR
VRS::SO< VRS::SceneThing > m_rootNode
VRS::SO< vrsode::CollisionSpacem_space
VRS::SO< vrsode::PhysicsBodym_chassis
VRS::SO< vrsode::PhysicsBodym_wheelFL
VRS::SO< vrsode::PhysicsBodym_wheelFR
VRS::SO< vrsode::PhysicsBodym_wheelRL
VRS::SO< vrsode::PhysicsBodym_wheelRR
VRS::SO< vrsode::PhysicsBodym_suspensionFL
VRS::SO< vrsode::PhysicsBodym_suspensionFR
VRS::SO< vrsode::PhysicsBodym_suspensionRL
VRS::SO< vrsode::PhysicsBodym_suspensionRR
VRS::SO< vrsode::PhysicsBodym_steerFL
VRS::SO< vrsode::PhysicsBodym_steerFR
VRS::SO< vrsode::PhysicsJointHingem_axisFL
VRS::SO< vrsode::PhysicsJointHingem_axisFR
VRS::SO< vrsode::PhysicsJointHingem_axisRL
VRS::SO< vrsode::PhysicsJointHingem_axisRR
VRS::SO< vrsode::PhysicsJointHingem_steerControlFL
VRS::SO< vrsode::PhysicsJointHingem_steerControlFR
VRS::SO< vrsode::PhysicsJointSliderm_springFL
VRS::SO< vrsode::PhysicsJointSliderm_springFR
VRS::SO< vrsode::PhysicsJointSliderm_springRL
VRS::SO< vrsode::PhysicsJointSliderm_springRR

Detailed Description

Definition at line 26 of file TestCar.h.


Constructor & Destructor Documentation

random_racer::TestCar::TestCar ( VRS::SO< VRS::SceneThing >   ) 

Definition at line 22 of file TestCar.cpp.

References vrsode::CS_None, m_axisFL, m_axisFR, m_axisRL, m_axisRR, m_bodyMass, m_carMaxSpeed, m_carPower, m_chassis, m_chassisOffset, m_debugNodes, m_rootNode, m_springFL, m_springFR, m_springLengthFront, m_springLengthRear, m_springPowerFront, m_springPowerRear, m_springRL, m_springRR, m_springSpeedFront, m_springSpeedRear, m_steerControlFL, m_steerControlFR, m_steerFL, m_steerFR, m_steerOffsetFL, m_steerOffsetFR, m_suspensionFL, m_suspensionFR, m_suspensionOffsetFL, m_suspensionOffsetFR, m_suspensionOffsetRL, m_suspensionOffsetRR, m_suspensionRL, m_suspensionRR, m_wheelFL, m_wheelFR, m_wheelMass, m_wheelMu, m_wheelOffsetFL, m_wheelOffsetFR, m_wheelOffsetRL, m_wheelOffsetRR, m_wheelRL, m_wheelRR, m_wheelSizeFront, and m_wheelSizeRear.

random_racer::TestCar::~TestCar (  ) 

Definition at line 307 of file TestCar.cpp.


Member Function Documentation

void random_racer::TestCar::enableAllBodies (  )  [private]

Definition at line 393 of file TestCar.cpp.

References m_chassis, m_steerFL, m_steerFR, m_suspensionFL, m_suspensionFR, m_suspensionRL, m_suspensionRR, m_wheelFL, m_wheelFR, m_wheelRL, and m_wheelRR.

Referenced by accelerate(), handBreak(), nitro(), and steer().

Here is the caller graph for this function:

void random_racer::TestCar::accelerate ( double   )  [virtual]

accelerate the car.

0 for no acceleration. 1 for maximum acceleration.

Implements random_racer::Car.

Definition at line 313 of file TestCar.cpp.

References enableAllBodies(), m_axisRL, m_axisRR, m_carMaxSpeed, and m_carPower.

Here is the call graph for this function:

void random_racer::TestCar::steer ( double   )  [virtual]

steering.

Parameters:
p_amount the amount of steering. (-1 for full left, 1 for full right)

Implements random_racer::Car.

Definition at line 334 of file TestCar.cpp.

References enableAllBodies(), m_steerControlFL, and m_steerControlFR.

Here is the call graph for this function:

void random_racer::TestCar::handBreak ( double   )  [virtual]

break.

Parameters:
p_amount the break strength. (from 0 to 1)

Implements random_racer::Car.

Definition at line 353 of file TestCar.cpp.

References enableAllBodies(), m_axisFL, m_axisFR, m_axisRL, and m_axisRR.

Here is the call graph for this function:

void random_racer::TestCar::nitro ( double   )  [virtual]

activate nitro.

acceleration boost.

Implements random_racer::Car.

Definition at line 344 of file TestCar.cpp.

References enableAllBodies(), and m_chassis.

Here is the call graph for this function:

VRS::SO< VRS::SceneThing > random_racer::TestCar::sceneThing (  ) 

Definition at line 381 of file TestCar.cpp.

References m_chassis.

void random_racer::TestCar::attachCamera ( VRS::SO< VRS::Camera >   ) 

Definition at line 387 of file TestCar.cpp.

void random_racer::TestCar::setPosition ( VRS::Vector   )  [virtual]

set the position of the car.

may influence the simulation badly, so be careful.

Implements random_racer::Car.

Definition at line 412 of file TestCar.cpp.

References m_chassis, m_chassisOffset, m_steerFL, m_steerFR, m_steerOffsetFL, m_steerOffsetFR, m_suspensionFL, m_suspensionFR, m_suspensionOffsetFL, m_suspensionOffsetFR, m_suspensionOffsetRL, m_suspensionOffsetRR, m_suspensionRL, m_suspensionRR, m_wheelFL, m_wheelFR, m_wheelOffsetFL, m_wheelOffsetFR, m_wheelOffsetRL, m_wheelOffsetRR, m_wheelRL, and m_wheelRR.

Referenced by setPosition().

Here is the caller graph for this function:

void random_racer::TestCar::setPosition ( double  ,
double  ,
double   
) [virtual]

set the position of the car.

may influence the simulation badly, so be careful.

Implements random_racer::Car.

Definition at line 457 of file TestCar.cpp.

References setPosition().

Here is the call graph for this function:

VRS::Vector random_racer::TestCar::position (  )  [virtual]

returns the position of the car.

Implements random_racer::Car.

Definition at line 463 of file TestCar.cpp.

References m_chassis.

VRS::SO<vrsode::CollisionBody> random_racer::TestCar::cameraHook (  )  [inline, virtual]

Returns a CollisionBody SO to which the car wants the 3rd person camera get attached to.

Implements random_racer::Car.

Definition at line 133 of file TestCar.h.

References m_chassis.

VRS::SO<vrsode::CollisionBody> random_racer::TestCar::chassis (  )  [inline, virtual]

return the cars chassis for e.g.

car_reset command

Implements random_racer::Car.

Definition at line 138 of file TestCar.h.

References m_chassis.


Member Data Documentation

bool random_racer::TestCar::m_debugNodes [private]

Definition at line 28 of file TestCar.h.

Referenced by TestCar().

double random_racer::TestCar::m_springLengthFront [private]

Definition at line 30 of file TestCar.h.

Referenced by TestCar().

double random_racer::TestCar::m_springLengthRear [private]

Definition at line 31 of file TestCar.h.

Referenced by TestCar().

double random_racer::TestCar::m_springPowerFront [private]

Definition at line 32 of file TestCar.h.

Referenced by TestCar().

double random_racer::TestCar::m_springPowerRear [private]

Definition at line 33 of file TestCar.h.

Referenced by TestCar().

double random_racer::TestCar::m_springSpeedFront [private]

Definition at line 34 of file TestCar.h.

Referenced by TestCar().

double random_racer::TestCar::m_springSpeedRear [private]

Definition at line 35 of file TestCar.h.

Referenced by TestCar().

double random_racer::TestCar::m_wheelSizeFront [private]

Definition at line 37 of file TestCar.h.

Referenced by TestCar().

double random_racer::TestCar::m_wheelSizeRear [private]

Definition at line 38 of file TestCar.h.

Referenced by TestCar().

double random_racer::TestCar::m_wheelMass [private]

Definition at line 40 of file TestCar.h.

Referenced by TestCar().

double random_racer::TestCar::m_bodyMass [private]

Definition at line 41 of file TestCar.h.

Referenced by TestCar().

double random_racer::TestCar::m_wheelMu [private]

Definition at line 43 of file TestCar.h.

Referenced by TestCar().

double random_racer::TestCar::m_carMaxSpeed [private]

Definition at line 45 of file TestCar.h.

Referenced by accelerate(), and TestCar().

double random_racer::TestCar::m_carPower [private]

Definition at line 46 of file TestCar.h.

Referenced by accelerate(), and TestCar().

VRS::Vector random_racer::TestCar::m_wheelOffsetFL [private]

Definition at line 48 of file TestCar.h.

Referenced by setPosition(), and TestCar().

VRS::Vector random_racer::TestCar::m_wheelOffsetFR [private]

Definition at line 49 of file TestCar.h.

Referenced by setPosition(), and TestCar().

VRS::Vector random_racer::TestCar::m_wheelOffsetRL [private]

Definition at line 50 of file TestCar.h.

Referenced by setPosition(), and TestCar().

VRS::Vector random_racer::TestCar::m_wheelOffsetRR [private]

Definition at line 51 of file TestCar.h.

Referenced by setPosition(), and TestCar().

VRS::Vector random_racer::TestCar::m_chassisOffset [private]

Definition at line 52 of file TestCar.h.

Referenced by setPosition(), and TestCar().

VRS::Vector random_racer::TestCar::m_suspensionOffsetFL [private]

Definition at line 53 of file TestCar.h.

Referenced by setPosition(), and TestCar().

VRS::Vector random_racer::TestCar::m_suspensionOffsetFR [private]

Definition at line 54 of file TestCar.h.

Referenced by setPosition(), and TestCar().

VRS::Vector random_racer::TestCar::m_suspensionOffsetRL [private]

Definition at line 55 of file TestCar.h.

Referenced by setPosition(), and TestCar().

VRS::Vector random_racer::TestCar::m_suspensionOffsetRR [private]

Definition at line 56 of file TestCar.h.

Referenced by setPosition(), and TestCar().

VRS::Vector random_racer::TestCar::m_steerOffsetFL [private]

Definition at line 57 of file TestCar.h.

Referenced by setPosition(), and TestCar().

VRS::Vector random_racer::TestCar::m_steerOffsetFR [private]

Definition at line 58 of file TestCar.h.

Referenced by setPosition(), and TestCar().

VRS::SO<VRS::SceneThing> random_racer::TestCar::m_rootNode [private]

Definition at line 60 of file TestCar.h.

Referenced by TestCar().

VRS::SO<vrsode::CollisionSpace> random_racer::TestCar::m_space [private]

Definition at line 61 of file TestCar.h.

VRS::SO<vrsode::PhysicsBody> random_racer::TestCar::m_chassis [private]

Definition at line 62 of file TestCar.h.

Referenced by cameraHook(), chassis(), enableAllBodies(), nitro(), position(), sceneThing(), setPosition(), and TestCar().

VRS::SO<vrsode::PhysicsBody> random_racer::TestCar::m_wheelFL [private]

Definition at line 64 of file TestCar.h.

Referenced by enableAllBodies(), setPosition(), and TestCar().

VRS::SO<vrsode::PhysicsBody> random_racer::TestCar::m_wheelFR [private]

Definition at line 65 of file TestCar.h.

Referenced by enableAllBodies(), setPosition(), and TestCar().

VRS::SO<vrsode::PhysicsBody> random_racer::TestCar::m_wheelRL [private]

Definition at line 66 of file TestCar.h.

Referenced by enableAllBodies(), setPosition(), and TestCar().

VRS::SO<vrsode::PhysicsBody> random_racer::TestCar::m_wheelRR [private]

Definition at line 67 of file TestCar.h.

Referenced by enableAllBodies(), setPosition(), and TestCar().

VRS::SO<vrsode::PhysicsBody> random_racer::TestCar::m_suspensionFL [private]

Definition at line 69 of file TestCar.h.

Referenced by enableAllBodies(), setPosition(), and TestCar().

VRS::SO<vrsode::PhysicsBody> random_racer::TestCar::m_suspensionFR [private]

Definition at line 70 of file TestCar.h.

Referenced by enableAllBodies(), setPosition(), and TestCar().

VRS::SO<vrsode::PhysicsBody> random_racer::TestCar::m_suspensionRL [private]

Definition at line 71 of file TestCar.h.

Referenced by enableAllBodies(), setPosition(), and TestCar().

VRS::SO<vrsode::PhysicsBody> random_racer::TestCar::m_suspensionRR [private]

Definition at line 72 of file TestCar.h.

Referenced by enableAllBodies(), setPosition(), and TestCar().

VRS::SO<vrsode::PhysicsBody> random_racer::TestCar::m_steerFL [private]

Definition at line 74 of file TestCar.h.

Referenced by enableAllBodies(), setPosition(), and TestCar().

VRS::SO<vrsode::PhysicsBody> random_racer::TestCar::m_steerFR [private]

Definition at line 75 of file TestCar.h.

Referenced by enableAllBodies(), setPosition(), and TestCar().

VRS::SO<vrsode::PhysicsJointHinge> random_racer::TestCar::m_axisFL [private]

Definition at line 77 of file TestCar.h.

Referenced by handBreak(), and TestCar().

VRS::SO<vrsode::PhysicsJointHinge> random_racer::TestCar::m_axisFR [private]

Definition at line 78 of file TestCar.h.

Referenced by handBreak(), and TestCar().

VRS::SO<vrsode::PhysicsJointHinge> random_racer::TestCar::m_axisRL [private]

Definition at line 79 of file TestCar.h.

Referenced by accelerate(), handBreak(), and TestCar().

VRS::SO<vrsode::PhysicsJointHinge> random_racer::TestCar::m_axisRR [private]

Definition at line 80 of file TestCar.h.

Referenced by accelerate(), handBreak(), and TestCar().

VRS::SO<vrsode::PhysicsJointHinge> random_racer::TestCar::m_steerControlFL [private]

Definition at line 82 of file TestCar.h.

Referenced by steer(), and TestCar().

VRS::SO<vrsode::PhysicsJointHinge> random_racer::TestCar::m_steerControlFR [private]

Definition at line 83 of file TestCar.h.

Referenced by steer(), and TestCar().

VRS::SO<vrsode::PhysicsJointSlider> random_racer::TestCar::m_springFL [private]

Definition at line 85 of file TestCar.h.

Referenced by TestCar().

VRS::SO<vrsode::PhysicsJointSlider> random_racer::TestCar::m_springFR [private]

Definition at line 86 of file TestCar.h.

Referenced by TestCar().

VRS::SO<vrsode::PhysicsJointSlider> random_racer::TestCar::m_springRL [private]

Definition at line 87 of file TestCar.h.

Referenced by TestCar().

VRS::SO<vrsode::PhysicsJointSlider> random_racer::TestCar::m_springRR [private]

Definition at line 88 of file TestCar.h.

Referenced by TestCar().


The documentation for this class was generated from the following files:
Generated on Fri May 11 21:02:13 2007 for Random Racer by  doxygen 1.5.1