Panda3D
odeBallJoint.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 odeBallJoint.h
10  * @author joswilso
11  * @date 2006-12-27
12  */
13 
14 
15 #ifndef ODEBALLJOINT_H
16 #define ODEBALLJOINT_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 OdeBallJoint : public OdeJoint {
30  friend class OdeJoint;
31 
32 public:
33  OdeBallJoint(dJointID id);
34 
35 PUBLISHED:
36  OdeBallJoint(OdeWorld &world);
37  OdeBallJoint(OdeWorld &world, OdeJointGroup &joint_group);
38  virtual ~OdeBallJoint();
39 
40  INLINE void set_anchor(dReal x, dReal y, dReal z);
41  INLINE void set_anchor(const LVecBase3f &anchor);
42  INLINE void set_anchor2(dReal x, dReal y, dReal z);
43  INLINE void set_anchor2(const LVecBase3f &anchor);
44 
45  INLINE LVecBase3f get_anchor() const;
46  INLINE LVecBase3f get_anchor2() const;
47 
48 public:
49  static TypeHandle get_class_type() {
50  return _type_handle;
51  }
52  static void init_type() {
53  OdeJoint::init_type();
54  register_type(_type_handle, "OdeBallJoint",
55  OdeJoint::get_class_type());
56  }
57  virtual TypeHandle get_type() const {
58  return get_class_type();
59  }
60  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
61 
62 private:
63  static TypeHandle _type_handle;
64 };
65 
66 #include "odeBallJoint.I"
67 
68 #endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
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
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81