Tinman  1.0
Public Types | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
CarController Class Reference

#include <carcontroller.h>

Public Types

typedef std::shared_ptr< CarControllershared
 

Public Member Functions

 CarController ()
 
virtual ~CarController ()
 
void realize (std::vector< Ogre::SceneNode * > wheels_nodes)
 
void accelerate ()
 
void stop_accelerating ()
 
void brake ()
 
void stop_braking ()
 
void turn (Direction direction)
 
void stop_turning ()
 
void control_speed ()
 
virtual void update (float deltaT)
 
void use_nitro ()
 

Public Attributes

const int rightIndex = 0
 
const int upIndex = 1
 
const int forwardIndex = 2
 
float mass_
 
float gvehicle_steering_
 
float wheel_radius_
 
float wheel_width_
 
float suspension_stiffness_
 
float wheel_friction_
 
float suspension_damping_
 
float suspension_compression_
 
float roll_influence_
 
float connection_height_
 
const btVector3 car_dimensions_ = btVector3(1, 0.5f, 2)
 
const btScalar suspension_rest_length_ = btScalar(0.5)
 
const btVector3 wheel_direction_cs0_ = btVector3(0,-1,0)
 
const btVector3 wheel_axle_cs_ = btVector3(-1,0,0)
 
bool inverted_
 
int nitro_
 
float f_engine_
 
float f_braking_
 
float steering_
 
bool accelerating_
 
bool braking_
 
bool turning_
 

Private Member Functions

void load_parameters (std::string file)
 
void update_lap (std::vector< Ogre::Vector3 > checkpoints)
 
void turn_wheels (Direction direction)
 
void reset_wheels ()
 
bool equals (float sut, float target, float delta)
 
float str_to_float (std::string string)
 

Private Attributes

float f_max_engine_
 
float acceleration_
 
float deceleration_
 
float f_max_braking_
 
float steering_increment_
 
float steering_clamp_
 
std::vector< Ogre::SceneNode * > wheels_nodes_
 

Member Typedef Documentation

typedef std::shared_ptr<CarController> CarController::shared

Constructor & Destructor Documentation

CarController::CarController ( )
CarController::~CarController ( )
virtual

Member Function Documentation

void CarController::accelerate ( )
void CarController::brake ( )
void CarController::control_speed ( )
bool CarController::equals ( float  sut,
float  target,
float  delta 
)
private
void CarController::load_parameters ( std::string  file)
private
void CarController::realize ( std::vector< Ogre::SceneNode * >  wheels_nodes)
void CarController::reset_wheels ( )
private
void CarController::stop_accelerating ( )
void CarController::stop_braking ( )
void CarController::stop_turning ( )
float CarController::str_to_float ( std::string  string)
private
void CarController::turn ( Direction  direction)
void CarController::turn_wheels ( Direction  direction)
private
void CarController::update ( float  deltaT)
virtual
void CarController::update_lap ( std::vector< Ogre::Vector3 >  checkpoints)
private
void CarController::use_nitro ( )

Member Data Documentation

bool CarController::accelerating_
float CarController::acceleration_
private
bool CarController::braking_
const btVector3 CarController::car_dimensions_ = btVector3(1, 0.5f, 2)
float CarController::connection_height_
float CarController::deceleration_
private
float CarController::f_braking_
float CarController::f_engine_
float CarController::f_max_braking_
private
float CarController::f_max_engine_
private
const int CarController::forwardIndex = 2
float CarController::gvehicle_steering_
bool CarController::inverted_
float CarController::mass_
int CarController::nitro_
const int CarController::rightIndex = 0
float CarController::roll_influence_
float CarController::steering_
float CarController::steering_clamp_
private
float CarController::steering_increment_
private
float CarController::suspension_compression_
float CarController::suspension_damping_
const btScalar CarController::suspension_rest_length_ = btScalar(0.5)
float CarController::suspension_stiffness_
bool CarController::turning_
const int CarController::upIndex = 1
const btVector3 CarController::wheel_axle_cs_ = btVector3(-1,0,0)
const btVector3 CarController::wheel_direction_cs0_ = btVector3(0,-1,0)
float CarController::wheel_friction_
float CarController::wheel_radius_
float CarController::wheel_width_
std::vector<Ogre::SceneNode*> CarController::wheels_nodes_
private

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