17 #ifndef CARCONTROLLER_H
18 #define CARCONTROLLER_H
19 #include <OgreSceneNode.h>
60 typedef std::shared_ptr<CarController>
shared;
69 void realize( std::vector<Ogre::SceneNode*> wheels_nodes);
82 virtual void update(
float deltaT);
88 void update_lap(std::vector<Ogre::Vector3> checkpoints);
93 bool equals(
float sut,
float target,
float delta) ;
void stop_turning()
Definition: carcontroller.cpp:116
const int upIndex
Definition: carcontroller.h:39
Definition: carcontroller.h:26
float steering_clamp_
Definition: carcontroller.h:32
void control_speed()
Definition: carcontroller.cpp:122
int nitro_
Definition: carcontroller.h:62
float f_max_braking_
Definition: carcontroller.h:30
void turn_wheels(Direction direction)
Definition: carcontroller.cpp:97
Direction
Definition: carcontroller.h:24
float suspension_stiffness_
Definition: carcontroller.h:46
float gvehicle_steering_
Definition: carcontroller.h:43
float str_to_float(std::string string)
Definition: carcontroller.cpp:140
float f_engine_
Definition: carcontroller.h:64
float wheel_friction_
Definition: carcontroller.h:47
float wheel_width_
Definition: carcontroller.h:45
virtual void update(float deltaT)
Definition: carcontroller.cpp:135
void realize(std::vector< Ogre::SceneNode * > wheels_nodes)
Definition: carcontroller.cpp:46
bool accelerating_
Definition: carcontroller.h:65
const btVector3 car_dimensions_
Definition: carcontroller.h:53
float f_braking_
Definition: carcontroller.h:64
CarController()
Definition: carcontroller.cpp:4
float steering_increment_
Definition: carcontroller.h:31
void update_lap(std::vector< Ogre::Vector3 > checkpoints)
bool inverted_
Definition: carcontroller.h:58
const btVector3 wheel_axle_cs_
Definition: carcontroller.h:56
void accelerate()
Definition: carcontroller.cpp:51
float roll_influence_
Definition: carcontroller.h:50
const btScalar suspension_rest_length_
Definition: carcontroller.h:54
virtual ~CarController()
Definition: carcontroller.cpp:13
float mass_
Definition: carcontroller.h:42
void stop_accelerating()
Definition: carcontroller.cpp:61
float connection_height_
Definition: carcontroller.h:51
std::shared_ptr< CarController > shared
Definition: carcontroller.h:60
bool turning_
Definition: carcontroller.h:65
float wheel_radius_
Definition: carcontroller.h:44
bool equals(float sut, float target, float delta)
float suspension_compression_
Definition: carcontroller.h:49
float acceleration_
Definition: carcontroller.h:28
float f_max_engine_
Definition: carcontroller.h:27
void load_parameters(std::string file)
Definition: carcontroller.cpp:18
void brake()
Definition: carcontroller.cpp:68
void turn(Direction direction)
Definition: carcontroller.cpp:82
void reset_wheels()
Definition: carcontroller.cpp:108
float steering_
Definition: carcontroller.h:64
const int rightIndex
Definition: carcontroller.h:38
std::vector< Ogre::SceneNode * > wheels_nodes_
Definition: carcontroller.h:34
float deceleration_
Definition: carcontroller.h:29
const int forwardIndex
Definition: carcontroller.h:40
void stop_braking()
Definition: carcontroller.cpp:76
void use_nitro()
Definition: carcontroller.cpp:127
bool braking_
Definition: carcontroller.h:65
float suspension_damping_
Definition: carcontroller.h:48
const btVector3 wheel_direction_cs0_
Definition: carcontroller.h:55