Panda3D
 All Classes Functions Variables Enumerations
bulletRotationalLimitMotor.h
1 // Filename: bulletRotationalLimitMotor.h
2 // Created by: enn0x (03Mar13)
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 __BULLET_ROTATIONAL_LIMIT_MOTOR_H__
16 #define __BULLET_ROTATIONAL_LIMIT_MOTOR_H__
17 
18 #include "pandabase.h"
19 
20 #include "bullet_includes.h"
21 #include "bullet_utils.h"
22 
23 #include "luse.h"
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : BulletRotationalLimitMotor
27 // Description : Rotation Limit structure for generic joints.
28 ////////////////////////////////////////////////////////////////////
29 class EXPCL_PANDABULLET BulletRotationalLimitMotor {
30 
31 PUBLISHED:
34 
35  INLINE void set_motor_enabled(bool enable);
36  INLINE void set_low_limit(PN_stdfloat limit);
37  INLINE void set_high_limit(PN_stdfloat limit);
38  INLINE void set_target_velocity(PN_stdfloat velocity);
39  INLINE void set_max_motor_force(PN_stdfloat force);
40  INLINE void set_max_limit_force(PN_stdfloat force);
41  INLINE void set_damping(PN_stdfloat damping);
42  INLINE void set_softness(PN_stdfloat softness);
43  INLINE void set_bounce(PN_stdfloat bounce);
44  INLINE void set_normal_cfm(PN_stdfloat cfm);
45  INLINE void set_stop_cfm(PN_stdfloat cfm);
46  INLINE void set_stop_erp(PN_stdfloat erp);
47 
48  INLINE bool is_limited() const;
49  INLINE bool get_motor_enabled() const;
50  INLINE int get_current_limit() const;
51  INLINE PN_stdfloat get_current_error() const;
52  INLINE PN_stdfloat get_current_position() const;
53  INLINE PN_stdfloat get_accumulated_impulse() const;
54 
55 public:
56  BulletRotationalLimitMotor(btRotationalLimitMotor &motor);
57 
58 private:
59  btRotationalLimitMotor &_motor;
60 };
61 
62 #include "bulletRotationalLimitMotor.I"
63 
64 #endif // __BULLET_ROTATIONAL_LIMIT_MOTOR_H__
Rotation Limit structure for generic joints.