Panda3D

odeUniversalJoint.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 odeUniversalJoint.h
10 * @author joswilso
11 * @date 2006-12-27
12 */
13
14
15
16 #ifndef ODEUNIVERSALJOINT_H
17 #define ODEUNIVERSALJOINT_H
18
19 #include "pandabase.h"
20 #include "typedObject.h"
21 #include "luse.h"
22
23 #include "ode_includes.h"
24
25 #include "odeJoint.h"
26
27 /**
28 *
29 */
30 class EXPCL_PANDAODE OdeUniversalJoint : public OdeJoint {
31 friend class OdeJoint;
32
33 public:
34 OdeUniversalJoint(dJointID id);
35
36 PUBLISHED:
37 OdeUniversalJoint(OdeWorld &world);
38 OdeUniversalJoint(OdeWorld &world, OdeJointGroup &joint_group);
39 virtual ~OdeUniversalJoint();
40
41 INLINE void set_anchor(dReal x, dReal y, dReal z);
42 INLINE void set_anchor(const LVecBase3f &anchor);
43 INLINE void set_axis1(dReal x, dReal y, dReal z);
44 INLINE void set_axis1(const LVecBase3f &axis);
45 INLINE void set_axis2(dReal x, dReal y, dReal z);
46 INLINE void set_axis2(const LVecBase3f &axis);
47 INLINE void add_torques(dReal torque1, dReal torque2);
48
49 INLINE LVecBase3f get_anchor() const;
50 INLINE LVecBase3f get_anchor2() const;
51 INLINE LVecBase3f get_axis1() const;
52 INLINE LVecBase3f get_axis2() const;
53 INLINE dReal get_angle1() const;
54 INLINE dReal get_angle2() const;
55 INLINE dReal get_angle1_rate() const;
56 INLINE dReal get_angle2_rate() const;
57
58 INLINE void set_param_lo_stop(int axis, dReal val);
59 INLINE void set_param_hi_stop(int axis, dReal val);
60 INLINE void set_param_vel(int axis, dReal val);
61 INLINE void set_param_f_max(int axis, dReal val);
62 INLINE void set_param_fudge_factor(int axis, dReal val);
63 INLINE void set_param_bounce(int axis, dReal val);
64 INLINE void set_param_CFM(int axis, dReal val);
65 INLINE void set_param_stop_ERP(int axis, dReal val);
66 INLINE void set_param_stop_CFM(int axis, dReal val);
67
68 INLINE dReal get_param_lo_stop(int axis) const;
69 INLINE dReal get_param_hi_stop(int axis) const;
70 INLINE dReal get_param_vel(int axis) const;
71 INLINE dReal get_param_f_max(int axis) const;
72 INLINE dReal get_param_fudge_factor(int axis) const;
73 INLINE dReal get_param_bounce(int axis) const;
74 INLINE dReal get_param_CFM(int axis) const;
75 INLINE dReal get_param_stop_ERP(int axis) const;
76 INLINE dReal get_param_stop_CFM(int axis) const;
77
78 public:
79 static TypeHandle get_class_type() {
80 return _type_handle;
81 }
82 static void init_type() {
83 OdeJoint::init_type();
84 register_type(_type_handle, "OdeUniversalJoint",
85 OdeJoint::get_class_type());
86 }
87 virtual TypeHandle get_type() const {
88 return get_class_type();
89 }
90 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
91
92 private:
93 static TypeHandle _type_handle;
94 };
95
96 #include "odeUniversalJoint.I"
97
98 #endif
OdeJointGroup
Definition: odeJointGroup.h:26
OdeJoint
Definition: odeJoint.h:51
OdeUniversalJoint
Definition: odeUniversalJoint.h:30
OdeWorld
Definition: odeWorld.h:33
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.
odeJoint.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
odeUniversalJoint.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
ode_includes.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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
typedObject.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.