Panda3D
 All Classes Functions Variables Enumerations
physxPulleyJoint.h
1 // Filename: physxPulleyJoint.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 PHYSXPULLEYJOINT_H
16 #define PHYSXPULLEYJOINT_H
17 
18 #include "pandabase.h"
19 
20 #include "physxJoint.h"
21 #include "physx_includes.h"
22 
23 class PhysxMotorDesc;
25 
26 ////////////////////////////////////////////////////////////////////
27 // Class : PhysxPulleyJoint
28 // Description : A pulley joint simulates a rope between two
29 // objects passing over two pulleys.
30 ////////////////////////////////////////////////////////////////////
31 class EXPCL_PANDAPHYSX PhysxPulleyJoint : public PhysxJoint {
32 
33 PUBLISHED:
34  INLINE PhysxPulleyJoint();
35  INLINE ~PhysxPulleyJoint();
36 
37  void save_to_desc(PhysxPulleyJointDesc &jointDesc) const;
38  void load_from_desc(const PhysxPulleyJointDesc &jointDesc);
39 
40  void set_motor(const PhysxMotorDesc &motor);
41  void set_flag(PhysxPulleyJointFlag flag, bool value);
42 
43  bool get_flag(PhysxPulleyJointFlag flag) const;
44  PhysxMotorDesc get_motor() const;
45 
46 ////////////////////////////////////////////////////////////////////
47 public:
48  INLINE NxJoint *ptr() const { return (NxJoint *)_ptr; };
49 
50  void link(NxJoint *jointPtr);
51  void unlink();
52 
53 private:
54  NxPulleyJoint *_ptr;
55 
56 ////////////////////////////////////////////////////////////////////
57 public:
58  static TypeHandle get_class_type() {
59  return _type_handle;
60  }
61  static void init_type() {
62  PhysxJoint::init_type();
63  register_type(_type_handle, "PhysxPulleyJoint",
64  PhysxJoint::get_class_type());
65  }
66  virtual TypeHandle get_type() const {
67  return get_class_type();
68  }
69  virtual TypeHandle force_init_type() {
70  init_type();
71  return get_class_type();
72  }
73 
74 private:
75  static TypeHandle _type_handle;
76 };
77 
78 #include "physxPulleyJoint.I"
79 
80 #endif // PHYSXPULLEYJOINT_H
Descriptor class for distance joint.
Describes a joint motor.
A pulley joint simulates a rope between two objects passing over two pulleys.
Abstract base class for the different types of joints.
Definition: physxJoint.h:35
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85