30 bool equals(
float sut,
float target,
float delta);
31 bool equals(btVector3 sut, btVector3 target,
float delta);
35 lower_than(
const bool& reverse=
false){ reverse_ = reverse;}
36 bool operator() (
const Tinman::CarInfo& first,
const Tinman::CarInfo& second)
const {
37 return (reverse_)? (first.seqNumber > second.seqNumber):
38 (first.seqNumber < second.seqNumber);
55 Car(std::string nick);
59 Ogre::Vector3 position,
int scale);
62 std::string material,
int checkpoints, Ice::Byte
id);
64 btVector3 position, Ice::Byte
id);
66 void exec(Tinman::Action action);
91 void reset(
int checkpoints, btVector3 position);
138 Ogre::Vector3 position = Ogre::Vector3(0,0,0),
int scale = 1);
btCompoundShape * compound_
Definition: car.h:122
bool stuck_
Definition: car.h:53
void stop_accelerating()
Definition: car.cpp:209
btVector3 get_velocity()
Definition: car.cpp:331
void add_nick_billboard(Scene::shared scene)
Definition: car.cpp:140
const int not_moving_delay_
Definition: car.h:116
void use_nitro()
Definition: car.cpp:351
void update(float delta)
Definition: car.cpp:250
void add_lap()
Definition: car.cpp:356
Direction
Definition: carcontroller.h:24
void add_wheels()
Definition: car.cpp:172
void animation(float delta)
Definition: car.cpp:425
void set_position(btVector3 position)
Definition: car.cpp:452
void init_graphic_bodies(Scene::shared scene, std::string name, std::string, Ogre::Vector3 position=Ogre::Vector3(0, 0, 0), int scale=1)
Definition: car.cpp:94
CarController::shared controller_
Definition: car.h:45
void reset(int checkpoints, btVector3 position)
Definition: car.cpp:365
std::shared_ptr< Physics > shared
Definition: physics.h:33
int get_lap()
Definition: car.cpp:346
void stop_turning()
Definition: car.cpp:240
void update_lap()
Definition: car.cpp:269
void configure_wheels()
Definition: car.cpp:190
std::shared_ptr< Scene > shared
Definition: scene.h:43
bool accelerating_
Definition: car.h:106
void synchronize(Tinman::CarInfo last_update)
Definition: car.cpp:285
void brake()
Definition: car.cpp:215
bool can_collide_
Definition: car.h:114
bool colliding_
Definition: car.h:53
Ice::Byte id_
Definition: car.h:47
std::vector< Ogre::Entity * > wheels_entities_
Definition: car.h:132
bool reverse_
Definition: car.h:33
void turn(Direction direction)
Definition: car.cpp:225
unsigned int sections_covered_
Definition: car.h:105
bool not_moving()
Definition: car.cpp:437
void turn_wheels(Direction direction)
btQuaternion get_orientation()
Definition: car.cpp:336
void exec(Tinman::Action action)
Definition: car.cpp:52
btVehicleRaycaster * vehicle_raycaster_
Definition: car.h:126
btVector3 get_position()
Definition: car.cpp:326
std::shared_ptr< Sound > shared
Definition: sound.h:13
bool has_done_a_lap()
Definition: car.cpp:410
int lap_
Definition: car.h:48
Ogre::SceneNode * chassis_node_
Definition: car.h:49
void init_raycast_car(Physics::shared physics)
Definition: car.cpp:132
const int colliding_delay_
Definition: car.h:117
void add_graphic_wheel(Scene::shared scene, std::string parent, std::string name, int scale=1)
Definition: car.cpp:149
btVector3 initial_position_
Definition: car.h:104
btVector3 get_direction(int factor=1)
Definition: car.cpp:393
void init_physic_bodies(Physics::shared physics, btVector3 position)
Definition: car.cpp:114
Physics::shared physics_
Definition: car.h:101
void add_physic_wheel(bool is_front, btVector3 connection_point, int wheel_index)
Definition: car.cpp:161
std::shared_ptr< Car > shared
Definition: car.h:44
std::vector< Ogre::SceneNode * > wheels_nodes_
Definition: car.h:131
const float invert_direction_delay_
Definition: car.h:115
void turn_left()
Definition: car.cpp:235
Definition: objecttextdisplay.h:5
bool is_on_meta()
Definition: car.cpp:403
void apply_update(bool delete_update)
Definition: car.cpp:304
bool operator()(const Tinman::CarInfo &first, const Tinman::CarInfo &second) const
Definition: car.h:36
bool equals(float sut, float target, float delta)
Definition: car.cpp:313
Tinman::CarInfo last_update_
Definition: car.h:107
std::shared_ptr< CarController > shared
Definition: carcontroller.h:60
btQuaternion last_orientation_
Definition: car.h:135
void set_race_segment_info(Section segment)
Definition: car.cpp:388
btRaycastVehicle * vehicle_
Definition: car.h:127
void invert_direction()
Definition: car.cpp:458
btCollisionShape * wheel_shape_
Definition: car.h:128
void accelerate()
Definition: car.cpp:202
btVector3 last_position_
Definition: car.h:134
btAlignedObjectArray< btCollisionShape * > collision_shapes_
Definition: car.h:123
Section current_segment_
Definition: car.h:51
const btQuaternion initial_rotation_
Definition: car.h:103
std::vector< std::pair< int, bool > > checkpoints_
Definition: car.h:120
int race_position_
Definition: car.h:46
float colliding_time_
Definition: car.h:112
btRigidBody * chassis_body_
Definition: car.h:50
Ogre::Entity * chassis_entity_
Definition: car.h:130
float invert_direction_
Definition: car.h:112
bool is_stuck()
Definition: car.cpp:442
void turn_right()
Definition: car.cpp:230
int get_nitro()
Definition: car.cpp:341
btScalar get_speed()
Definition: car.cpp:415
Car(std::string nick)
Definition: car.cpp:20
Section get_current_section()
Definition: car.cpp:420
bool is_colliding()
Definition: car.cpp:432
void stop_braking()
Definition: car.cpp:220
ObjectTextDisplay * nickname_display_
Definition: car.h:110
void collide_with_car()
Definition: car.cpp:447
btRaycastVehicle::btVehicleTuning tuning_
Definition: car.h:125
void realize(Scene::shared scene, std::string name, std::string material, Ogre::Vector3 position, int scale)
Definition: car.cpp:58
std::priority_queue< Tinman::CarInfo, std::vector< Tinman::CarInfo >, lower_than > sync_buffer_
Definition: car.h:119
Sound::shared sound_
Definition: car.h:100
virtual ~Car()
Definition: car.cpp:43
btVector3 last_velocity_
Definition: car.h:134
lower_than(const bool &reverse=false)
Definition: car.h:35
std::string nick_
Definition: car.h:109
void reset_position()
Definition: car.cpp:382
float not_moving_
Definition: car.h:112
void control_speed()
Definition: car.cpp:245
std::map< Tinman::Action, std::function< void()> > action_hooks
Definition: car.h:102