Panda3D
 All Classes Functions Variables Enumerations
physxPrismaticJoint.h
1 // Filename: physxPrismaticJoint.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 PHYSXPRISMATICJOINT_H
16 #define PHYSXPRISMATICJOINT_H
17 
18 #include "pandabase.h"
19 
20 #include "physxJoint.h"
21 #include "physx_includes.h"
22 
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : PhysxPrismaticJoint
27 // Description : A prismatic joint permits relative translational
28 // movement between two bodies along an axis, but no
29 // relative rotational movement.
30 ////////////////////////////////////////////////////////////////////
31 class EXPCL_PANDAPHYSX PhysxPrismaticJoint : public PhysxJoint {
32 
33 PUBLISHED:
34  INLINE PhysxPrismaticJoint();
35  INLINE ~PhysxPrismaticJoint();
36 
37  void save_to_desc(PhysxPrismaticJointDesc &jointDesc) const;
38  void load_from_desc(const PhysxPrismaticJointDesc &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  NxPrismaticJoint *_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, "PhysxPrismaticJoint",
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 "physxPrismaticJoint.I"
73 
74 #endif // PHYSXPRISMATICJOINT_H
Descriptor class for prismatic joint.
Abstract base class for the different types of joints.
Definition: physxJoint.h:35
A prismatic joint permits relative translational movement between two bodies along an axis...
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85