Panda3D
bulletRotationalLimitMotor.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file bulletRotationalLimitMotor.h
10  * @author enn0x
11  * @date 2013-03-03
12  */
13 
14 #ifndef __BULLET_ROTATIONAL_LIMIT_MOTOR_H__
15 #define __BULLET_ROTATIONAL_LIMIT_MOTOR_H__
16 
17 #include "pandabase.h"
18 
19 #include "bullet_includes.h"
20 #include "bullet_utils.h"
21 
22 #include "luse.h"
23 
24 /**
25  * Rotation Limit structure for generic joints.
26  */
27 class EXPCL_PANDABULLET BulletRotationalLimitMotor {
28 
29 PUBLISHED:
32 
33  void set_motor_enabled(bool enable);
34  void set_low_limit(PN_stdfloat limit);
35  void set_high_limit(PN_stdfloat limit);
36  void set_target_velocity(PN_stdfloat velocity);
37  void set_max_motor_force(PN_stdfloat force);
38  void set_max_limit_force(PN_stdfloat force);
39  void set_damping(PN_stdfloat damping);
40  void set_softness(PN_stdfloat softness);
41  void set_bounce(PN_stdfloat bounce);
42  void set_normal_cfm(PN_stdfloat cfm);
43  void set_stop_cfm(PN_stdfloat cfm);
44  void set_stop_erp(PN_stdfloat erp);
45 
46  bool is_limited() const;
47  bool get_motor_enabled() const;
48  int get_current_limit() const;
49  PN_stdfloat get_current_error() const;
50  PN_stdfloat get_current_position() const;
51  PN_stdfloat get_accumulated_impulse() const;
52 
53  MAKE_PROPERTY(limited, is_limited);
54  MAKE_PROPERTY(motor_enabled, get_motor_enabled, set_motor_enabled);
55  MAKE_PROPERTY(current_limit, get_current_limit);
56  MAKE_PROPERTY(current_error, get_current_error);
57  MAKE_PROPERTY(current_position, get_current_position);
58  MAKE_PROPERTY(accumulated_impulse, get_accumulated_impulse);
59 
60 public:
61  BulletRotationalLimitMotor(btRotationalLimitMotor &motor);
62 
63 private:
64  btRotationalLimitMotor &_motor;
65 };
66 
68 
69 #endif // __BULLET_ROTATIONAL_LIMIT_MOTOR_H__
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bullet_includes.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bulletRotationalLimitMotor.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bullet_utils.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
luse.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
BulletRotationalLimitMotor
Rotation Limit structure for generic joints.
Definition: bulletRotationalLimitMotor.h:27