Panda3D
odeAMotorJoint.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 odeAMotorJoint.h
10  * @author joswilso
11  * @date 2006-12-27
12  */
13 
14 
15 #ifndef ODEAMOTORJOINT_H
16 #define ODEAMOTORJOINT_H
17 
18 #include "pandabase.h"
19 #include "typedObject.h"
20 #include "luse.h"
21 
22 #include "ode_includes.h"
23 
24 #include "odeJoint.h"
25 
26 /**
27  *
28  */
29 class EXPCL_PANDAODE OdeAMotorJoint : public OdeJoint {
30  friend class OdeJoint;
31 
32 public:
33  OdeAMotorJoint(dJointID id);
34 
35 PUBLISHED:
36  OdeAMotorJoint(OdeWorld &world);
37  OdeAMotorJoint(OdeWorld &world, OdeJointGroup &joint_group);
38  virtual ~OdeAMotorJoint();
39 
40  INLINE void set_num_axes(int num);
41  INLINE void set_axis(int anum, int rel, dReal x, dReal y, dReal z);
42  INLINE void set_axis(int anum, int rel, const LVecBase3f &axis);
43  INLINE void set_angle(int anum, dReal angle);
44  INLINE void set_mode(int mode);
45  INLINE void add_torques(dReal torque1, dReal torque2, dReal torque3);
46 
47  INLINE int get_num_axes() const;
48  INLINE LVecBase3f get_axis(int anum) const;
49  MAKE_SEQ(get_axes, get_num_axes, get_axis);
50  INLINE int get_axis_rel(int anum) const;
51  INLINE dReal get_angle(int anum) const;
52  INLINE dReal get_angle_rate(int anum) const;
53  INLINE int get_mode() const;
54 
55  INLINE void set_param_lo_stop(int axis, dReal val);
56  INLINE void set_param_hi_stop(int axis, dReal val);
57  INLINE void set_param_vel(int axis, dReal val);
58  INLINE void set_param_f_max(int axis, dReal val);
59  INLINE void set_param_fudge_factor(int axis, dReal val);
60  INLINE void set_param_bounce(int axis, dReal val);
61  INLINE void set_param_CFM(int axis, dReal val);
62  INLINE void set_param_stop_ERP(int axis, dReal val);
63  INLINE void set_param_stop_CFM(int axis, dReal val);
64 
65  INLINE dReal get_param_lo_stop(int axis) const;
66  INLINE dReal get_param_hi_stop(int axis) const;
67  INLINE dReal get_param_vel(int axis) const;
68  INLINE dReal get_param_f_max(int axis) const;
69  INLINE dReal get_param_fudge_factor(int axis) const;
70  INLINE dReal get_param_bounce(int axis) const;
71  INLINE dReal get_param_CFM(int axis) const;
72  INLINE dReal get_param_stop_ERP(int axis) const;
73  INLINE dReal get_param_stop_CFM(int axis) const;
74 
75 
76 public:
77  static TypeHandle get_class_type() {
78  return _type_handle;
79  }
80  static void init_type() {
81  OdeJoint::init_type();
82  register_type(_type_handle, "OdeAMotorJoint",
83  OdeJoint::get_class_type());
84  }
85  virtual TypeHandle get_type() const {
86  return get_class_type();
87  }
88  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
89 
90 private:
91  static TypeHandle _type_handle;
92 };
93 
94 #include "odeAMotorJoint.I"
95 
96 #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
OdeAMotorJoint
Definition: odeAMotorJoint.h:29
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
typedObject.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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.
odeAMotorJoint.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
OdeWorld
Definition: odeWorld.h:33