Panda3D
physxCylindricalJoint.h
1 // Filename: physxCylindricalJoint.h
2 // Created by: enn0x (02Oct09)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef PHYSXCYLINDRICALJOINT_H
16 #define PHYSXCYLINDRICALJOINT_H
17 
18 #include "pandabase.h"
19 
20 #include "physxJoint.h"
21 #include "physx_includes.h"
22 
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : PhysxCylindricalJoint
27 // Description : Cylindrical Joints permit relative translational
28 // movement between two bodies along an axis, and also
29 // relative rotation along the axis.
30 ////////////////////////////////////////////////////////////////////
31 class EXPCL_PANDAPHYSX PhysxCylindricalJoint : public PhysxJoint {
32 
33 PUBLISHED:
34  INLINE PhysxCylindricalJoint();
35  INLINE ~PhysxCylindricalJoint();
36 
37  void save_to_desc(PhysxCylindricalJointDesc &jointDesc) const;
38  void load_from_desc(const PhysxCylindricalJointDesc &jointDesc);
39 
40 ////////////////////////////////////////////////////////////////////
41 public:
42  INLINE NxJoint *ptr() const { return (NxJoint *)_ptr; };
43 
44  void link(NxJoint *jointPtr);
45  void unlink();
46 
47 private:
48  NxCylindricalJoint *_ptr;
49 
50 ////////////////////////////////////////////////////////////////////
51 public:
52  static TypeHandle get_class_type() {
53  return _type_handle;
54  }
55  static void init_type() {
56  PhysxJoint::init_type();
57  register_type(_type_handle, "PhysxCylindricalJoint",
58  PhysxJoint::get_class_type());
59  }
60  virtual TypeHandle get_type() const {
61  return get_class_type();
62  }
63  virtual TypeHandle force_init_type() {
64  init_type();
65  return get_class_type();
66  }
67 
68 private:
69  static TypeHandle _type_handle;
70 };
71 
72 #include "physxCylindricalJoint.I"
73 
74 #endif // PHYSXCYLINDRICALJOINT_H
Cylindrical Joints permit relative translational movement between two bodies along an axis...
Abstract base class for the different types of joints.
Definition: physxJoint.h:35
Descriptor class for sliding joint.
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85