15 #ifndef __BULLET_VEHICLE_H__ 16 #define __BULLET_VEHICLE_H__ 18 #include "pandabase.h" 20 #include "bullet_includes.h" 21 #include "bullet_utils.h" 23 #include "typedReferenceCount.h" 37 INLINE
void set_suspension_stiffness(PN_stdfloat value);
38 INLINE
void set_suspension_compression(PN_stdfloat value);
39 INLINE
void set_suspension_damping(PN_stdfloat value);
40 INLINE
void set_max_suspension_travel_cm(PN_stdfloat value);
41 INLINE
void set_friction_slip(PN_stdfloat value);
42 INLINE
void set_max_suspension_force(PN_stdfloat value);
44 INLINE PN_stdfloat get_suspension_stiffness()
const;
45 INLINE PN_stdfloat get_suspension_compression()
const;
46 INLINE PN_stdfloat get_suspension_damping()
const;
47 INLINE PN_stdfloat get_max_suspension_travel_cm()
const;
48 INLINE PN_stdfloat get_friction_slip()
const;
49 INLINE PN_stdfloat get_max_suspension_force()
const;
52 btRaycastVehicle::btVehicleTuning _;
71 void set_coordinate_system(BulletUpAxis up);
72 void set_steering_value(PN_stdfloat steering,
int idx);
73 void set_brake(PN_stdfloat brake,
int idx);
74 void set_pitch_control(PN_stdfloat pitch);
77 PN_stdfloat get_current_speed_km_hour()
const;
78 PN_stdfloat get_steering_value(
int idx)
const;
81 void reset_suspension();
82 void apply_engine_force(PN_stdfloat force,
int idx);
87 INLINE
int get_num_wheels()
const;
89 MAKE_SEQ(get_wheels, get_num_wheels, get_wheel);
95 INLINE btRaycastVehicle *get_vehicle()
const;
100 btRaycastVehicle *_vehicle;
101 btVehicleRaycaster *_raycaster;
105 static btVector3 get_axis(
int idx);
112 static void init_type() {
113 TypedReferenceCount::init_type();
114 register_type(_type_handle,
"BulletVehicle",
115 TypedReferenceCount::get_class_type());
118 return get_class_type();
122 return get_class_type();
129 #include "bulletVehicle.I" 131 #endif // __BULLET_VEHICLE_H__ A base class for things which need to inherit from both TypedObject and from ReferenceCount.
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
Simulates a raycast vehicle which casts a ray per wheel at the ground as a cheap replacement for comp...
TypeHandle is the identifier used to differentiate C++ class types.
One wheel of a BulletVehicle.