Panda3D
physxMotorDesc.h
1 // Filename: physxMotorDesc.h
2 // Created by: enn0x (28Sep09)
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 PHYSXMOTORDESC_H
16 #define PHYSXMOTORDESC_H
17 
18 #include "pandabase.h"
19 
20 #include "physx_includes.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : PhysxMotorDesc
24 // Description : Describes a joint motor. Some joints can be
25 // motorized, this allows them to apply a force to
26 // cause attached actors to move. Joints which can be
27 // motorized:
28 // - PhysxPulleyJoint
29 // - PhysxRevoluteJoint
30 ////////////////////////////////////////////////////////////////////
31 class EXPCL_PANDAPHYSX PhysxMotorDesc {
32 
33 PUBLISHED:
34  INLINE PhysxMotorDesc();
35  INLINE PhysxMotorDesc(float velTarget, float maxForce=0, bool freeSpin=0);
36  INLINE ~PhysxMotorDesc();
37 
38  void set_vel_target(float velTarget);
39  void set_max_force(float maxForce);
40  void set_free_spin(bool freeSpin);
41 
42  float get_vel_target() const;
43  float get_max_force() const;
44  bool get_free_spin() const;
45 
46 public:
47  NxMotorDesc _desc;
48 };
49 
50 #include "physxMotorDesc.I"
51 
52 #endif // PHYSXMOTORDESC_H
Describes a joint motor.