Panda3D
 All Classes Functions Variables Enumerations
bulletTranslationalLimitMotor.h
1 // Filename: bulletTranslationalLimitMotor.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_TRANSLATIONAL_LIMIT_MOTOR_H__
16 #define __BULLET_TRANSLATIONAL_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 : BulletTranslationalLimitMotor
27 // Description : Rotation Limit structure for generic joints.
28 ////////////////////////////////////////////////////////////////////
29 class EXPCL_PANDABULLET BulletTranslationalLimitMotor {
30 
31 PUBLISHED:
34 
35  INLINE void set_motor_enabled(int axis, bool enable);
36  INLINE void set_low_limit(const LVecBase3 &limit);
37  INLINE void set_high_limit(const LVecBase3 & limit);
38  INLINE void set_target_velocity(const LVecBase3&velocity);
39  INLINE void set_max_motor_force(const LVecBase3 &force);
40  INLINE void set_damping(PN_stdfloat damping);
41  INLINE void set_softness(PN_stdfloat softness);
42  INLINE void set_restitution(PN_stdfloat restitution);
43  INLINE void set_normal_cfm(const LVecBase3 &cfm);
44  INLINE void set_stop_erp(const LVecBase3 &erp);
45  INLINE void set_stop_cfm(const LVecBase3 &cfm);
46 
47  INLINE bool is_limited(int axis) const;
48  INLINE bool get_motor_enabled(int axis) const;
49  INLINE int get_current_limit(int axis) const;
50  INLINE LVector3 get_current_error() const;
51  INLINE LPoint3 get_current_diff() const;
52  INLINE LVector3 get_accumulated_impulse() const;
53 
54 public:
55  BulletTranslationalLimitMotor(btTranslationalLimitMotor &motor);
56 
57 private:
58  btTranslationalLimitMotor &_motor;
59 };
60 
61 #include "bulletTranslationalLimitMotor.I"
62 
63 #endif // __BULLET_TRANSLATIONAL_LIMIT_MOTOR_H__
This is the base class for all three-component vectors and points.
Definition: lvecBase3.h:105
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
Definition: lvector3.h:100
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
Definition: lpoint3.h:99
Rotation Limit structure for generic joints.