Panda3D
 All Classes Functions Variables Enumerations
odeHingeJoint.h
1 #ifndef ODEHINGEJOINT_H
2 #define ODEHINGEJOINT_H
3 
4 #include "pandabase.h"
5 #include "luse.h"
6 
7 #include "ode_includes.h"
8 
9 #include "odeJoint.h"
10 
11 ////////////////////////////////////////////////////////////////////
12 // Class : OdeHingeJoint
13 // Description :
14 ////////////////////////////////////////////////////////////////////
15 class EXPCL_PANDAODE OdeHingeJoint : public OdeJoint {
16  friend class OdeJoint;
17 
18 public:
19  OdeHingeJoint(dJointID id);
20 
21 PUBLISHED:
22  OdeHingeJoint(OdeWorld &world);
23  OdeHingeJoint(OdeWorld &world, OdeJointGroup &joint_group);
24  virtual ~OdeHingeJoint();
25 
26  INLINE void set_anchor(dReal x, dReal y, dReal z);
27  INLINE void set_anchor(const LVecBase3f &anchor);
28  INLINE void set_anchor_delta(dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az);
29  INLINE void set_anchor_delta(const LVecBase3f &anchor, const LVecBase3f &vec);
30  INLINE void set_axis(dReal x, dReal y, dReal z);
31  INLINE void set_axis(const LVecBase3f &axis);
32  INLINE void add_torque(dReal torque);
33 
34  INLINE LVecBase3f get_anchor() const;
35  INLINE LVecBase3f get_anchor2() const;
36  INLINE LVecBase3f get_axis() const;
37  INLINE dReal get_angle() const;
38  INLINE dReal get_angle_rate() const;
39 
40  INLINE void set_param_lo_stop(dReal val);
41  INLINE void set_param_hi_stop(dReal val);
42  INLINE void set_param_vel(dReal val);
43  INLINE void set_param_f_max(dReal val);
44  INLINE void set_param_fudge_factor(dReal val);
45  INLINE void set_param_bounce(dReal val);
46  INLINE void set_param_CFM(dReal val);
47  INLINE void set_param_stop_ERP(dReal val);
48  INLINE void set_param_stop_CFM(dReal val);
49 
50  INLINE dReal get_param_lo_stop() const;
51  INLINE dReal get_param_hi_stop() const;
52  INLINE dReal get_param_vel() const;
53  INLINE dReal get_param_f_max() const;
54  INLINE dReal get_param_fudge_factor() const;
55  INLINE dReal get_param_bounce() const;
56  INLINE dReal get_param_CFM() const;
57  INLINE dReal get_param_stop_ERP() const;
58  INLINE dReal get_param_stop_CFM() const;
59 
60 public:
61  static TypeHandle get_class_type() {
62  return _type_handle;
63  }
64  static void init_type() {
65  OdeJoint::init_type();
66  register_type(_type_handle, "OdeHingeJoint",
67  OdeJoint::get_class_type());
68  }
69  virtual TypeHandle get_type() const {
70  return get_class_type();
71  }
72  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
73 
74 private:
75  static TypeHandle _type_handle;
76 };
77 
78 #include "odeHingeJoint.I"
79 
80 #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