Panda3D

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