Panda3D
physxPointInPlaneJoint.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 physxPointInPlaneJoint.h
10  * @author enn0x
11  * @date 2009-10-02
12  */
13 
14 #ifndef PHYSXPOINTINPLANEJOINT_H
15 #define PHYSXPOINTINPLANEJOINT_H
16 
17 #include "pandabase.h"
18 
19 #include "physxJoint.h"
20 #include "physx_includes.h"
21 
23 
24 /**
25  * A point in plane joint constrains a point on one body to only move inside a
26  * plane attached to another body. The starting point of the point is defined
27  * as the anchor point. The plane through this point is specified by its
28  * normal which is the joint axis vector.
29  */
30 class EXPCL_PANDAPHYSX PhysxPointInPlaneJoint : public PhysxJoint {
31 
32 PUBLISHED:
33  INLINE PhysxPointInPlaneJoint();
34  INLINE ~PhysxPointInPlaneJoint();
35 
36  void save_to_desc(PhysxPointInPlaneJointDesc &jointDesc) const;
37  void load_from_desc(const PhysxPointInPlaneJointDesc &jointDesc);
38 
39 public:
40  INLINE NxJoint *ptr() const { return (NxJoint *)_ptr; };
41 
42  void link(NxJoint *jointPtr);
43  void unlink();
44 
45 private:
46  NxPointInPlaneJoint *_ptr;
47 
48 public:
49  static TypeHandle get_class_type() {
50  return _type_handle;
51  }
52  static void init_type() {
53  PhysxJoint::init_type();
54  register_type(_type_handle, "PhysxPointInPlaneJoint",
55  PhysxJoint::get_class_type());
56  }
57  virtual TypeHandle get_type() const {
58  return get_class_type();
59  }
60  virtual TypeHandle force_init_type() {
61  init_type();
62  return get_class_type();
63  }
64 
65 private:
66  static TypeHandle _type_handle;
67 };
68 
69 #include "physxPointInPlaneJoint.I"
70 
71 #endif // PHYSXPOINTINPLANEJOINT_H
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
Abstract base class for the different types of joints.
Definition: physxJoint.h:32
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Descriptor class for point-in-plane joint.
A point in plane joint constrains a point on one body to only move inside a plane attached to another...
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81