Panda3D
 All Classes Functions Variables Enumerations
odeHinge2Joint.h
1 #ifndef ODEHINGE2JOINT_H
2 #define ODEHINGE2JOINT_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 : OdeHinge2Joint
14 // Description :
15 ////////////////////////////////////////////////////////////////////
16 class EXPCL_PANDAODE OdeHinge2Joint : public OdeJoint {
17  friend class OdeJoint;
18 
19 public:
20  OdeHinge2Joint(dJointID id);
21 
22 PUBLISHED:
23  OdeHinge2Joint(OdeWorld &world, OdeJointGroup &joint_group);
24  OdeHinge2Joint(OdeWorld &world);
25  virtual ~OdeHinge2Joint();
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_angle1_rate() const;
41  INLINE dReal get_angle2_rate() const;
42 
43  INLINE void set_param_lo_stop(int axis, dReal val);
44  INLINE void set_param_hi_stop(int axis, dReal val);
45  INLINE void set_param_vel(int axis, dReal val);
46  INLINE void set_param_f_max(int axis, dReal val);
47  INLINE void set_param_fudge_factor(int axis, dReal val);
48  INLINE void set_param_bounce(int axis, dReal val);
49  INLINE void set_param_CFM(int axis, dReal val);
50  INLINE void set_param_stop_ERP(int axis, dReal val);
51  INLINE void set_param_stop_CFM(int axis, dReal val);
52  INLINE void set_param_suspension_ERP(int axis, dReal val);
53  INLINE void set_param_suspension_CFM(int axis, dReal val);
54 
55  INLINE dReal get_param_lo_stop(int axis) const;
56  INLINE dReal get_param_hi_stop(int axis) const;
57  INLINE dReal get_param_vel(int axis) const;
58  INLINE dReal get_param_f_max(int axis) const;
59  INLINE dReal get_param_fudge_factor(int axis) const;
60  INLINE dReal get_param_bounce(int axis) const;
61  INLINE dReal get_param_CFM(int axis) const;
62  INLINE dReal get_param_stop_ERP(int axis) const;
63  INLINE dReal get_param_stop_CFM(int axis) const;
64  INLINE dReal get_param_suspension_ERP(int axis) const;
65  INLINE dReal get_param_suspension_CFM(int axis) const;
66 
67 public:
68  static TypeHandle get_class_type() {
69  return _type_handle;
70  }
71  static void init_type() {
72  OdeJoint::init_type();
73  register_type(_type_handle, "OdeHinge2Joint",
74  OdeJoint::get_class_type());
75  }
76  virtual TypeHandle get_type() const {
77  return get_class_type();
78  }
79  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
80 
81 private:
82  static TypeHandle _type_handle;
83 };
84 
85 #include "odeHinge2Joint.I"
86 
87 #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