Panda3D
physxWheelShapeDesc.h
1 // Filename: physxWheelShapeDesc.h
2 // Created by: enn0x (09Nov09)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef PHYSXWHEELSHAPEDESC_H
16 #define PHYSXWHEELSHAPEDESC_H
17 
18 #include "pandabase.h"
19 
20 #include "physxShapeDesc.h"
21 #include "physx_includes.h"
22 
23 class PhysxSpringDesc;
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : PhysxWheelShapeDesc
27 // Description : Descriptor class for PhysxWheelShape.
28 ////////////////////////////////////////////////////////////////////
29 class EXPCL_PANDAPHYSX PhysxWheelShapeDesc : public PhysxShapeDesc {
30 
31 PUBLISHED:
32  INLINE PhysxWheelShapeDesc();
33  INLINE ~PhysxWheelShapeDesc();
34 
35  void set_to_default();
36  INLINE bool is_valid() const;
37 
38  void set_radius(float radius);
39  void set_suspension_travel(float suspensionTravel);
40  void set_inverse_wheel_mass(float inverseWheelMass);
41  void set_motor_torque(float motorTorque);
42  void set_brake_torque(float brakeTorque);
43  void set_steer_angle(float steerAngle);
44  void set_wheel_flag(PhysxWheelShapeFlag flag, bool value);
45  void set_suspension(const PhysxSpringDesc &spring);
46 
47  float get_radius() const;
48  float get_suspension_travel() const;
49  float get_inverse_wheel_mass() const;
50  float get_motor_torque() const;
51  float get_brake_torque() const;
52  float get_steer_angle() const;
53  bool get_wheel_flag(PhysxWheelShapeFlag flag) const;
54  PhysxSpringDesc get_suspension() const;
55 
56 public:
57  NxShapeDesc *ptr() const { return (NxShapeDesc *)&_desc; };
58  NxWheelShapeDesc _desc;
59 };
60 
61 #include "physxWheelShapeDesc.I"
62 
63 #endif // PHYSXWHEELSHAPEDESC_H
Describes a joint spring.
Descriptor class for PhysxWheelShape.
Abstract base class for shape descriptors.