00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef PHYSXWHEELSHAPE_H
00016 #define PHYSXWHEELSHAPE_H
00017
00018 #include "pandabase.h"
00019
00020 #include "physxShape.h"
00021 #include "physx_includes.h"
00022
00023 class PhysxWheelShapeDesc;
00024 class PhysxSpringDesc;
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069 class EXPCL_PANDAPHYSX PhysxWheelShape : public PhysxShape {
00070
00071 PUBLISHED:
00072 INLINE PhysxWheelShape();
00073 INLINE ~PhysxWheelShape();
00074
00075 void save_to_desc(PhysxWheelShapeDesc &shapeDesc) const;
00076
00077 void set_radius(float radius);
00078 void set_suspension_travel(float travel);
00079 void set_inverse_wheel_mass(float invMass);
00080 void set_motor_torque(float torque);
00081 void set_brake_torque(float torque);
00082 void set_steer_angle(float angle);
00083 void set_steer_angle_rad(float angle);
00084 void set_axle_speed(float speed);
00085 void set_wheel_flag(PhysxWheelShapeFlag flag, bool value);
00086 void set_suspension(const PhysxSpringDesc &spring);
00087
00088 float get_radius() const;
00089 float get_suspension_travel() const;
00090 float get_inverse_wheel_mass() const;
00091 float get_motor_torque() const;
00092 float get_brake_torque() const;
00093 float get_steer_angle() const;
00094 float get_steer_angle_rad() const;
00095 float get_axle_speed() const;
00096 bool get_wheel_flag(PhysxWheelShapeFlag flag) const;
00097
00098
00099 public:
00100 INLINE NxShape *ptr() const { return (NxShape *)_ptr; };
00101
00102 void link(NxShape *shapePtr);
00103 void unlink();
00104
00105 private:
00106 NxWheelShape *_ptr;
00107
00108
00109 public:
00110 static TypeHandle get_class_type() {
00111 return _type_handle;
00112 }
00113 static void init_type() {
00114 PhysxShape::init_type();
00115 register_type(_type_handle, "PhysxWheelShape",
00116 PhysxShape::get_class_type());
00117 }
00118 virtual TypeHandle get_type() const {
00119 return get_class_type();
00120 }
00121 virtual TypeHandle force_init_type() {
00122 init_type();
00123 return get_class_type();
00124 }
00125
00126 private:
00127 static TypeHandle _type_handle;
00128 };
00129
00130 #include "physxWheelShape.I"
00131
00132 #endif // PHYSXWHEELSHAPE_H