Car.cpp File Reference

Implement the Engine::GameObjects::Car class. More...

#include "Car.h"
#include <GL/gl.h>
#include <btBulletDynamicsCommon.h>
#include <btBulletCollisionCommon.h>
#include <BulletCollision/CollisionShapes/btTriangleShape.h>
#include "../InputDevice.h"
#include "../ResourceHandler.h"
#include <Debug.h>
#include <cmath>
#include <limits>
#include <libtrack/TrackBooster.h>

Go to the source code of this file.

Namespaces

namespace  Engine
namespace  Engine::GameObjects

Typedefs

typedef ResourceHandler< Track::Texture,
int, std::string > 
Engine::GameObjects::TextureStore
typedef ResourceHandler< Track::BulletMesh,
int, Track::BulletMesh::ConstructionInformation
Engine::GameObjects::MeshStore

Functions

void contact_added_callback_obj (btManifoldPoint &cp, const btCollisionObject *colObj, int partId, int index)
bool contact_added_callback (btManifoldPoint &cp, const btCollisionObject *colObj0, int partId0, int index0, const btCollisionObject *colObj1, int partId1, int index1)

Variables

const btVector3 feeler_vectors [Engine::GameObjects::Car::NUM_SENSORS_FEELERS]
const btScalar _force_scale = 1.5
const btScalar _car_stearing_scale [2] = {0.02, 0.03}
 stearing torque scale per car model. High values imply car turns easily.
const btScalar _car_stearing_scale_midair [2] = {0.01, 0.015}
 stearing torque in midair per car model.
const btScalar _car_slide_scale [2] = {1.0, 1.5}
 control over car sliding.
ContactAddedCallback gContactAddedCallback


Detailed Description

Implement the Engine::GameObjects::Car class.

Author:
James Legg

Definition in file Car.cpp.


Function Documentation

bool contact_added_callback ( btManifoldPoint &  cp,
const btCollisionObject *  colObj0,
int  partId0,
int  index0,
const btCollisionObject *  colObj1,
int  partId1,
int  index1 
)

Definition at line 96 of file Car.cpp.

void contact_added_callback_obj ( btManifoldPoint &  cp,
const btCollisionObject *  colObj,
int  partId,
int  index 
)

Definition at line 60 of file Car.cpp.


Variable Documentation

const btScalar _car_slide_scale[2] = {1.0, 1.5}

control over car sliding.

Higher values give strong manual sliding and strong recovery from sliding when cornering.

Definition at line 53 of file Car.cpp.

const btScalar _car_stearing_scale[2] = {0.02, 0.03}

stearing torque scale per car model. High values imply car turns easily.

Definition at line 47 of file Car.cpp.

const btScalar _car_stearing_scale_midair[2] = {0.01, 0.015}

stearing torque in midair per car model.

Definition at line 49 of file Car.cpp.

const btScalar _force_scale = 1.5

Definition at line 44 of file Car.cpp.

const btVector3 feeler_vectors[Engine::GameObjects::Car::NUM_SENSORS_FEELERS]

Initial value:

 {
                btVector3( 0,  1, 0),
                btVector3( 1,  0, 0),
                btVector3(-1,  0, 0),
                btVector3( 1,  1, 0).normalized(),
                btVector3(-1,  1, 0).normalized(),
                btVector3(-0.2, 1, 0).normalized(),
                btVector3( 0.2, 1, 0).normalized(),
                btVector3( 0, -1, 0)}

Definition at line 34 of file Car.cpp.

ContactAddedCallback gContactAddedCallback


Get Racer at SourceForge.net. Fast, secure and Free Open Source software downloads

Generated at Mon Sep 6 00:41:14 2010 by Doxygen version 1.4.7 for Racer version svn335.