Panda3D
odeAMotorJoint.h
1 #ifndef ODEAMOTORJOINT_H
2 #define ODEAMOTORJOINT_H
3 
4 #include "pandabase.h"
5 #include "typedObject.h"
6 #include "luse.h"
7 
8 #include "ode_includes.h"
9 
10 #include "odeJoint.h"
11 
12 ////////////////////////////////////////////////////////////////////
13 // Class : OdeAMotorJoint
14 // Description :
15 ////////////////////////////////////////////////////////////////////
16 class EXPCL_PANDAODE OdeAMotorJoint : public OdeJoint {
17  friend class OdeJoint;
18 
19 public:
20  OdeAMotorJoint(dJointID id);
21 
22 PUBLISHED:
23  OdeAMotorJoint(OdeWorld &world);
24  OdeAMotorJoint(OdeWorld &world, OdeJointGroup &joint_group);
25  virtual ~OdeAMotorJoint();
26 
27  INLINE void set_num_axes(int num);
28  INLINE void set_axis(int anum, int rel, dReal x, dReal y, dReal z);
29  INLINE void set_axis(int anum, int rel, const LVecBase3f &axis);
30  INLINE void set_angle(int anum, dReal angle);
31  INLINE void set_mode(int mode);
32  INLINE void add_torques(dReal torque1, dReal torque2, dReal torque3);
33 
34  INLINE int get_num_axes() const;
35  INLINE LVecBase3f get_axis(int anum) const;
36  MAKE_SEQ(get_axes, get_num_axes, get_axis);
37  INLINE int get_axis_rel(int anum) const;
38  INLINE dReal get_angle(int anum) const;
39  INLINE dReal get_angle_rate(int anum) const;
40  INLINE int get_mode() const;
41 
42  INLINE void set_param_lo_stop(int axis, dReal val);
43  INLINE void set_param_hi_stop(int axis, dReal val);
44  INLINE void set_param_vel(int axis, dReal val);
45  INLINE void set_param_f_max(int axis, dReal val);
46  INLINE void set_param_fudge_factor(int axis, dReal val);
47  INLINE void set_param_bounce(int axis, dReal val);
48  INLINE void set_param_CFM(int axis, dReal val);
49  INLINE void set_param_stop_ERP(int axis, dReal val);
50  INLINE void set_param_stop_CFM(int axis, dReal val);
51 
52  INLINE dReal get_param_lo_stop(int axis) const;
53  INLINE dReal get_param_hi_stop(int axis) const;
54  INLINE dReal get_param_vel(int axis) const;
55  INLINE dReal get_param_f_max(int axis) const;
56  INLINE dReal get_param_fudge_factor(int axis) const;
57  INLINE dReal get_param_bounce(int axis) const;
58  INLINE dReal get_param_CFM(int axis) const;
59  INLINE dReal get_param_stop_ERP(int axis) const;
60  INLINE dReal get_param_stop_CFM(int axis) const;
61 
62 
63 public:
64  static TypeHandle get_class_type() {
65  return _type_handle;
66  }
67  static void init_type() {
68  OdeJoint::init_type();
69  register_type(_type_handle, "OdeAMotorJoint",
70  OdeJoint::get_class_type());
71  }
72  virtual TypeHandle get_type() const {
73  return get_class_type();
74  }
75  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
76 
77 private:
78  static TypeHandle _type_handle;
79 };
80 
81 #include "odeAMotorJoint.I"
82 
83 #endif
This is the base class for all three-component vectors and points.
Definition: lvecBase3.h:105
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85