Panda3D
odeHingeJoint.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file odeHingeJoint.h
10  * @author joswilso
11  * @date 2006-12-27
12  */
13 
14 
15 #ifndef ODEHINGEJOINT_H
16 #define ODEHINGEJOINT_H
17 
18 #include "pandabase.h"
19 #include "luse.h"
20 
21 #include "ode_includes.h"
22 
23 #include "odeJoint.h"
24 
25 /**
26  *
27  */
28 class EXPCL_PANDAODE OdeHingeJoint : public OdeJoint {
29  friend class OdeJoint;
30 
31 public:
32  OdeHingeJoint(dJointID id);
33 
34 PUBLISHED:
35  OdeHingeJoint(OdeWorld &world);
36  OdeHingeJoint(OdeWorld &world, OdeJointGroup &joint_group);
37  virtual ~OdeHingeJoint();
38 
39  INLINE void set_anchor(dReal x, dReal y, dReal z);
40  INLINE void set_anchor(const LVecBase3f &anchor);
41  INLINE void set_anchor_delta(dReal x, dReal y, dReal z, dReal ax, dReal ay, dReal az);
42  INLINE void set_anchor_delta(const LVecBase3f &anchor, const LVecBase3f &vec);
43  INLINE void set_axis(dReal x, dReal y, dReal z);
44  INLINE void set_axis(const LVecBase3f &axis);
45  INLINE void add_torque(dReal torque);
46 
47  INLINE LVecBase3f get_anchor() const;
48  INLINE LVecBase3f get_anchor2() const;
49  INLINE LVecBase3f get_axis() const;
50  INLINE dReal get_angle() const;
51  INLINE dReal get_angle_rate() const;
52 
53  INLINE void set_param_lo_stop(dReal val);
54  INLINE void set_param_hi_stop(dReal val);
55  INLINE void set_param_vel(dReal val);
56  INLINE void set_param_f_max(dReal val);
57  INLINE void set_param_fudge_factor(dReal val);
58  INLINE void set_param_bounce(dReal val);
59  INLINE void set_param_CFM(dReal val);
60  INLINE void set_param_stop_ERP(dReal val);
61  INLINE void set_param_stop_CFM(dReal val);
62 
63  INLINE dReal get_param_lo_stop() const;
64  INLINE dReal get_param_hi_stop() const;
65  INLINE dReal get_param_vel() const;
66  INLINE dReal get_param_f_max() const;
67  INLINE dReal get_param_fudge_factor() const;
68  INLINE dReal get_param_bounce() const;
69  INLINE dReal get_param_CFM() const;
70  INLINE dReal get_param_stop_ERP() const;
71  INLINE dReal get_param_stop_CFM() const;
72 
73 public:
74  static TypeHandle get_class_type() {
75  return _type_handle;
76  }
77  static void init_type() {
78  OdeJoint::init_type();
79  register_type(_type_handle, "OdeHingeJoint",
80  OdeJoint::get_class_type());
81  }
82  virtual TypeHandle get_type() const {
83  return get_class_type();
84  }
85  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
86 
87 private:
88  static TypeHandle _type_handle;
89 };
90 
91 #include "odeHingeJoint.I"
92 
93 #endif
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
OdeJointGroup
Definition: odeJointGroup.h:26
register_type
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
Definition: register_type.I:22
OdeJoint
Definition: odeJoint.h:51
odeHingeJoint.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
luse.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
ode_includes.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
odeJoint.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
OdeWorld
Definition: odeWorld.h:33
OdeHingeJoint
Definition: odeHingeJoint.h:28