random_racer::BuggyCar Class Reference

#include <BuggyCar.h>

Inheritance diagram for random_racer::BuggyCar:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 BuggyCar (VRS::SO< VRS::SceneThing >)
 ~BuggyCar ()
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

double m_springLengthFront
double m_springLengthRear
double m_springPowerFront
double m_springPowerRear
double m_springSpeedFront
double m_springSpeedRear
double m_wheelRad
double m_wheelWidth
double m_wheelMass
double m_bodyMass
double m_helperMass
double m_carMaxSpeed
double m_carPower
double m_suspensionSoftness
double m_steeringRadius
double m_wheelMu
double m_wheelSlip1
double m_wheelSlip2
VRS::Vector m_wheelOffsetFL
VRS::Vector m_wheelOffsetFR
VRS::Vector m_wheelOffsetRL
VRS::Vector m_wheelOffsetRR
VRS::Vector m_axisOffsetFL
VRS::Vector m_axisOffsetFR
VRS::Vector m_axisOffsetRL
VRS::Vector m_axisOffsetRR
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::Vector m_suspensionSoftnessOffsetFL
VRS::Vector m_suspensionSoftnessOffsetFR
VRS::Vector m_suspensionSoftnessOffsetRL
VRS::Vector m_suspensionSoftnessOffsetRR
VRS::SO< vrsode::PhysicsBodym_hook
VRS::SO< vrsode::PhysicsJointSliderm_hookJoint
VRS::SO< VRS::SceneThing > m_rootNode
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_springFL
VRS::SO< vrsode::PhysicsBodym_springFR
VRS::SO< vrsode::PhysicsBodym_springRL
VRS::SO< vrsode::PhysicsBodym_springRR
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_suspensionSoftnessFL
VRS::SO< vrsode::PhysicsJointHingem_suspensionSoftnessFR
VRS::SO< vrsode::PhysicsJointHingem_suspensionSoftnessRL
VRS::SO< vrsode::PhysicsJointHingem_suspensionSoftnessRR
VRS::SO< vrsode::PhysicsJointHingem_steerControlFL
VRS::SO< vrsode::PhysicsJointHingem_steerControlFR
VRS::SO< vrsode::PhysicsJointSliderm_springSliderFL
VRS::SO< vrsode::PhysicsJointSliderm_springSliderFR
VRS::SO< vrsode::PhysicsJointSliderm_springSliderRL
VRS::SO< vrsode::PhysicsJointSliderm_springSliderRR

Detailed Description

Definition at line 26 of file BuggyCar.h.


Constructor & Destructor Documentation

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

Definition at line 26 of file BuggyCar.cpp.

References vrsode::CS_None, random_racer::ResourceManager::get(), m_axisFL, m_axisFR, m_axisOffsetFL, m_axisOffsetFR, m_axisOffsetRL, m_axisOffsetRR, m_axisRL, m_axisRR, m_bodyMass, m_carMaxSpeed, m_carPower, m_chassis, m_chassisOffset, m_helperMass, m_hook, m_hookJoint, m_rootNode, m_springFL, m_springFR, m_springLengthFront, m_springLengthRear, m_springPowerFront, m_springPowerRear, m_springRL, m_springRR, m_springSliderFL, m_springSliderFR, m_springSliderRL, m_springSliderRR, m_springSpeedFront, m_springSpeedRear, m_steerControlFL, m_steerControlFR, m_steerFL, m_steerFR, m_steeringRadius, m_steerOffsetFL, m_steerOffsetFR, m_suspensionFL, m_suspensionFR, m_suspensionOffsetFL, m_suspensionOffsetFR, m_suspensionOffsetRL, m_suspensionOffsetRR, m_suspensionRL, m_suspensionRR, m_suspensionSoftness, m_suspensionSoftnessFL, m_suspensionSoftnessFR, m_suspensionSoftnessOffsetFL, m_suspensionSoftnessOffsetFR, m_suspensionSoftnessOffsetRL, m_suspensionSoftnessOffsetRR, m_suspensionSoftnessRL, m_suspensionSoftnessRR, m_wheelFL, m_wheelFR, m_wheelMass, m_wheelMu, m_wheelOffsetFL, m_wheelOffsetFR, m_wheelOffsetRL, m_wheelOffsetRR, m_wheelRad, m_wheelRL, m_wheelRR, m_wheelSlip1, m_wheelSlip2, and m_wheelWidth.

Here is the call graph for this function:

random_racer::BuggyCar::~BuggyCar (  ) 

Definition at line 466 of file BuggyCar.cpp.


Member Function Documentation

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

Definition at line 553 of file BuggyCar.cpp.

References m_chassis, m_springFL, m_springFR, m_springRL, m_springRR, 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(), and steer().

Here is the caller graph for this function:

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

accelerate the car.

0 for no acceleration. 1 for maximum acceleration.

Implements random_racer::Car.

Definition at line 472 of file BuggyCar.cpp.

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

Here is the call graph for this function:

void random_racer::BuggyCar::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 493 of file BuggyCar.cpp.

References enableAllBodies(), m_steerControlFL, m_steerControlFR, and m_steeringRadius.

Here is the call graph for this function:

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

break.

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

Implements random_racer::Car.

Definition at line 513 of file BuggyCar.cpp.

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

Here is the call graph for this function:

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

activate nitro.

acceleration boost.

Implements random_racer::Car.

Definition at line 503 of file BuggyCar.cpp.

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

Definition at line 541 of file BuggyCar.cpp.

References m_chassis.

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

Definition at line 547 of file BuggyCar.cpp.

void random_racer::BuggyCar::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 577 of file BuggyCar.cpp.

References m_chassis, m_chassisOffset, m_springFL, m_springFR, m_springRL, m_springRR, 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.

void random_racer::BuggyCar::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 628 of file BuggyCar.cpp.

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

returns the position of the car.

Implements random_racer::Car.

Definition at line 634 of file BuggyCar.cpp.

References m_chassis.

VRS::SO<vrsode::CollisionBody> random_racer::BuggyCar::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 162 of file BuggyCar.h.

References m_hook.

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

return the cars chassis for e.g.

car_reset command

Implements random_racer::Car.

Definition at line 167 of file BuggyCar.h.

References m_chassis.


Member Data Documentation

double random_racer::BuggyCar::m_springLengthFront [private]

Definition at line 28 of file BuggyCar.h.

Referenced by BuggyCar().

double random_racer::BuggyCar::m_springLengthRear [private]

Definition at line 29 of file BuggyCar.h.

Referenced by BuggyCar().

double random_racer::BuggyCar::m_springPowerFront [private]

Definition at line 30 of file BuggyCar.h.

Referenced by BuggyCar().

double random_racer::BuggyCar::m_springPowerRear [private]

Definition at line 31 of file BuggyCar.h.

Referenced by BuggyCar().

double random_racer::BuggyCar::m_springSpeedFront [private]

Definition at line 32 of file BuggyCar.h.

Referenced by BuggyCar().

double random_racer::BuggyCar::m_springSpeedRear [private]

Definition at line 33 of file BuggyCar.h.

Referenced by BuggyCar().

double random_racer::BuggyCar::m_wheelRad [private]

Definition at line 35 of file BuggyCar.h.

Referenced by BuggyCar().

double random_racer::BuggyCar::m_wheelWidth [private]

Definition at line 36 of file BuggyCar.h.

Referenced by BuggyCar().

double random_racer::BuggyCar::m_wheelMass [private]

Definition at line 38 of file BuggyCar.h.

Referenced by BuggyCar().

double random_racer::BuggyCar::m_bodyMass [private]

Definition at line 39 of file BuggyCar.h.

Referenced by BuggyCar().

double random_racer::BuggyCar::m_helperMass [private]

Definition at line 40 of file BuggyCar.h.

Referenced by BuggyCar().

double random_racer::BuggyCar::m_carMaxSpeed [private]

Definition at line 42 of file BuggyCar.h.

Referenced by accelerate(), and BuggyCar().

double random_racer::BuggyCar::m_carPower [private]

Definition at line 43 of file BuggyCar.h.

Referenced by accelerate(), and BuggyCar().

double random_racer::BuggyCar::m_suspensionSoftness [private]

Definition at line 45 of file BuggyCar.h.

Referenced by BuggyCar().

double random_racer::BuggyCar::m_steeringRadius [private]

Definition at line 47 of file BuggyCar.h.

Referenced by BuggyCar(), and steer().

double random_racer::BuggyCar::m_wheelMu [private]

Definition at line 49 of file BuggyCar.h.

Referenced by BuggyCar().

double random_racer::BuggyCar::m_wheelSlip1 [private]

Definition at line 50 of file BuggyCar.h.

Referenced by BuggyCar().

double random_racer::BuggyCar::m_wheelSlip2 [private]

Definition at line 51 of file BuggyCar.h.

Referenced by BuggyCar().

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

Definition at line 53 of file BuggyCar.h.

Referenced by BuggyCar(), and setPosition().

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

Definition at line 54 of file BuggyCar.h.

Referenced by BuggyCar(), and setPosition().

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

Definition at line 55 of file BuggyCar.h.

Referenced by BuggyCar(), and setPosition().

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

Definition at line 56 of file BuggyCar.h.

Referenced by BuggyCar(), and setPosition().

VRS::Vector random_racer::BuggyCar::m_axisOffsetFL [private]

Definition at line 57 of file BuggyCar.h.

Referenced by BuggyCar().

VRS::Vector random_racer::BuggyCar::m_axisOffsetFR [private]

Definition at line 58 of file BuggyCar.h.

Referenced by BuggyCar().

VRS::Vector random_racer::BuggyCar::m_axisOffsetRL [private]

Definition at line 59 of file BuggyCar.h.

Referenced by BuggyCar().

VRS::Vector random_racer::BuggyCar::m_axisOffsetRR [private]

Definition at line 60 of file BuggyCar.h.

Referenced by BuggyCar().

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

Definition at line 61 of file BuggyCar.h.

Referenced by BuggyCar(), and setPosition().

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

Definition at line 63 of file BuggyCar.h.

Referenced by BuggyCar(), and setPosition().

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

Definition at line 64 of file BuggyCar.h.

Referenced by BuggyCar(), and setPosition().

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

Definition at line 65 of file BuggyCar.h.

Referenced by BuggyCar(), and setPosition().

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

Definition at line 66 of file BuggyCar.h.

Referenced by BuggyCar(), and setPosition().

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

Definition at line 68 of file BuggyCar.h.

Referenced by BuggyCar(), and setPosition().

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

Definition at line 69 of file BuggyCar.h.

Referenced by BuggyCar(), and setPosition().

VRS::Vector random_racer::BuggyCar::m_suspensionSoftnessOffsetFL [private]

Definition at line 71 of file BuggyCar.h.

Referenced by BuggyCar().

VRS::Vector random_racer::BuggyCar::m_suspensionSoftnessOffsetFR [private]

Definition at line 72 of file BuggyCar.h.

Referenced by BuggyCar().

VRS::Vector random_racer::BuggyCar::m_suspensionSoftnessOffsetRL [private]

Definition at line 73 of file BuggyCar.h.

Referenced by BuggyCar().

VRS::Vector random_racer::BuggyCar::m_suspensionSoftnessOffsetRR [private]

Definition at line 74 of file BuggyCar.h.

Referenced by BuggyCar().

VRS::SO<vrsode::PhysicsBody> random_racer::BuggyCar::m_hook [private]

Definition at line 77 of file BuggyCar.h.

Referenced by BuggyCar(), and cameraHook().

VRS::SO<vrsode::PhysicsJointSlider> random_racer::BuggyCar::m_hookJoint [private]

Definition at line 78 of file BuggyCar.h.

Referenced by BuggyCar().

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

Definition at line 80 of file BuggyCar.h.

Referenced by BuggyCar().

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

Definition at line 81 of file BuggyCar.h.

Referenced by BuggyCar(), chassis(), enableAllBodies(), position(), sceneThing(), and setPosition().

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

Definition at line 83 of file BuggyCar.h.

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

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

Definition at line 84 of file BuggyCar.h.

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

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

Definition at line 85 of file BuggyCar.h.

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

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

Definition at line 86 of file BuggyCar.h.

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

VRS::SO<vrsode::PhysicsBody> random_racer::BuggyCar::m_springFL [private]

Definition at line 88 of file BuggyCar.h.

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

VRS::SO<vrsode::PhysicsBody> random_racer::BuggyCar::m_springFR [private]

Definition at line 89 of file BuggyCar.h.

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

VRS::SO<vrsode::PhysicsBody> random_racer::BuggyCar::m_springRL [private]

Definition at line 90 of file BuggyCar.h.

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

VRS::SO<vrsode::PhysicsBody> random_racer::BuggyCar::m_springRR [private]

Definition at line 91 of file BuggyCar.h.

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

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

Definition at line 93 of file BuggyCar.h.

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

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

Definition at line 94 of file BuggyCar.h.

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

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

Definition at line 95 of file BuggyCar.h.

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

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

Definition at line 96 of file BuggyCar.h.

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

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

Definition at line 98 of file BuggyCar.h.

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

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

Definition at line 99 of file BuggyCar.h.

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

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

Definition at line 101 of file BuggyCar.h.

Referenced by BuggyCar(), and handBreak().

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

Definition at line 102 of file BuggyCar.h.

Referenced by BuggyCar(), and handBreak().

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

Definition at line 103 of file BuggyCar.h.

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

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

Definition at line 104 of file BuggyCar.h.

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

VRS::SO<vrsode::PhysicsJointHinge> random_racer::BuggyCar::m_suspensionSoftnessFL [private]

Definition at line 106 of file BuggyCar.h.

Referenced by BuggyCar().

VRS::SO<vrsode::PhysicsJointHinge> random_racer::BuggyCar::m_suspensionSoftnessFR [private]

Definition at line 107 of file BuggyCar.h.

Referenced by BuggyCar().

VRS::SO<vrsode::PhysicsJointHinge> random_racer::BuggyCar::m_suspensionSoftnessRL [private]

Definition at line 108 of file BuggyCar.h.

Referenced by BuggyCar().

VRS::SO<vrsode::PhysicsJointHinge> random_racer::BuggyCar::m_suspensionSoftnessRR [private]

Definition at line 109 of file BuggyCar.h.

Referenced by BuggyCar().

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

Definition at line 111 of file BuggyCar.h.

Referenced by BuggyCar(), and steer().

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

Definition at line 112 of file BuggyCar.h.

Referenced by BuggyCar(), and steer().

VRS::SO<vrsode::PhysicsJointSlider> random_racer::BuggyCar::m_springSliderFL [private]

Definition at line 114 of file BuggyCar.h.

Referenced by BuggyCar().

VRS::SO<vrsode::PhysicsJointSlider> random_racer::BuggyCar::m_springSliderFR [private]

Definition at line 115 of file BuggyCar.h.

Referenced by BuggyCar().

VRS::SO<vrsode::PhysicsJointSlider> random_racer::BuggyCar::m_springSliderRL [private]

Definition at line 116 of file BuggyCar.h.

Referenced by BuggyCar().

VRS::SO<vrsode::PhysicsJointSlider> random_racer::BuggyCar::m_springSliderRR [private]

Definition at line 117 of file BuggyCar.h.

Referenced by BuggyCar().


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