Panda3D
odeUniversalJoint.h
1 #ifndef ODEUNIVERSALJOINT_H
2 #define ODEUNIVERSALJOINT_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 : OdeUniversalJoint
14 // Description :
15 ////////////////////////////////////////////////////////////////////
16 class EXPCL_PANDAODE OdeUniversalJoint : public OdeJoint {
17  friend class OdeJoint;
18 
19 public:
20  OdeUniversalJoint(dJointID id);
21 
22 PUBLISHED:
24  OdeUniversalJoint(OdeWorld &world, OdeJointGroup &joint_group);
25  virtual ~OdeUniversalJoint();
26 
27  INLINE void set_anchor(dReal x, dReal y, dReal z);
28  INLINE void set_anchor(const LVecBase3f &anchor);
29  INLINE void set_axis1(dReal x, dReal y, dReal z);
30  INLINE void set_axis1(const LVecBase3f &axis);
31  INLINE void set_axis2(dReal x, dReal y, dReal z);
32  INLINE void set_axis2(const LVecBase3f &axis);
33  INLINE void add_torques(dReal torque1, dReal torque2);
34 
35  INLINE LVecBase3f get_anchor() const;
36  INLINE LVecBase3f get_anchor2() const;
37  INLINE LVecBase3f get_axis1() const;
38  INLINE LVecBase3f get_axis2() const;
39  INLINE dReal get_angle1() const;
40  INLINE dReal get_angle2() const;
41  INLINE dReal get_angle1_rate() const;
42  INLINE dReal get_angle2_rate() const;
43 
44  INLINE void set_param_lo_stop(int axis, dReal val);
45  INLINE void set_param_hi_stop(int axis, dReal val);
46  INLINE void set_param_vel(int axis, dReal val);
47  INLINE void set_param_f_max(int axis, dReal val);
48  INLINE void set_param_fudge_factor(int axis, dReal val);
49  INLINE void set_param_bounce(int axis, dReal val);
50  INLINE void set_param_CFM(int axis, dReal val);
51  INLINE void set_param_stop_ERP(int axis, dReal val);
52  INLINE void set_param_stop_CFM(int axis, dReal val);
53 
54  INLINE dReal get_param_lo_stop(int axis) const;
55  INLINE dReal get_param_hi_stop(int axis) const;
56  INLINE dReal get_param_vel(int axis) const;
57  INLINE dReal get_param_f_max(int axis) const;
58  INLINE dReal get_param_fudge_factor(int axis) const;
59  INLINE dReal get_param_bounce(int axis) const;
60  INLINE dReal get_param_CFM(int axis) const;
61  INLINE dReal get_param_stop_ERP(int axis) const;
62  INLINE dReal get_param_stop_CFM(int axis) const;
63 
64 public:
65  static TypeHandle get_class_type() {
66  return _type_handle;
67  }
68  static void init_type() {
69  OdeJoint::init_type();
70  register_type(_type_handle, "OdeUniversalJoint",
71  OdeJoint::get_class_type());
72  }
73  virtual TypeHandle get_type() const {
74  return get_class_type();
75  }
76  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
77 
78 private:
79  static TypeHandle _type_handle;
80 };
81 
82 #include "odeUniversalJoint.I"
83 
84 #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