Panda3D

physxFixedJoint.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 physxFixedJoint.h
10 * @author enn0x
11 * @date 2009-10-02
12 */
13
14 #ifndef PHYSXFIXEDJOINT_H
15 #define PHYSXFIXEDJOINT_H
16
17 #include "pandabase.h"
18
19 #include "physxJoint.h"
20 #include "physx_includes.h"
21
22 class PhysxFixedJointDesc;
23
24 /**
25 * A fixed joint permits no relative movement between two bodies. ie the
26 * bodies are glued together.
27 */
28 class EXPCL_PANDAPHYSX PhysxFixedJoint : public PhysxJoint {
29
30 PUBLISHED:
31 INLINE PhysxFixedJoint();
32 INLINE ~PhysxFixedJoint();
33
34 void save_to_desc(PhysxFixedJointDesc &jointDesc) const;
35 void load_from_desc(const PhysxFixedJointDesc &jointDesc);
36
37 public:
38 INLINE NxJoint *ptr() const { return (NxJoint *)_ptr; };
39
40 void link(NxJoint *jointPtr);
41 void unlink();
42
43 private:
44 NxFixedJoint *_ptr;
45
46 public:
47 static TypeHandle get_class_type() {
48 return _type_handle;
49 }
50 static void init_type() {
51 PhysxJoint::init_type();
52 register_type(_type_handle, "PhysxFixedJoint",
53 PhysxJoint::get_class_type());
54 }
55 virtual TypeHandle get_type() const {
56 return get_class_type();
57 }
58 virtual TypeHandle force_init_type() {
59 init_type();
60 return get_class_type();
61 }
62
63 private:
64 static TypeHandle _type_handle;
65 };
66
67 #include "physxFixedJoint.I"
68
69 #endif // PHYSXFIXEDJOINT_H
PhysxFixedJointDesc
Descriptor class for fixed joint.
Definition: physxFixedJointDesc.h:26
PhysxFixedJoint
A fixed joint permits no relative movement between two bodies.
Definition: physxFixedJoint.h:28
PhysxJoint
Abstract base class for the different types of joints.
Definition: physxJoint.h:32
TypeHandle
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physxFixedJoint.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physxJoint.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
physx_includes.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