Panda3D
 All Classes Functions Variables Enumerations
physxPulleyJointDesc.h
1 // Filename: physxPulleyJointDesc.h
2 // Created by: enn0x (28Sep09)
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 PHYSXPULLEYJOINTDESC_H
16 #define PHYSXPULLEYJOINTDESC_H
17 
18 #include "pandabase.h"
19 
20 #include "physxJointDesc.h"
21 #include "physx_includes.h"
22 
23 class PhysxMotorDesc;
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : PhysxPulleyJointDesc
27 // Description : Descriptor class for distance joint. See
28 // PhysxPulleyJoint.
29 ////////////////////////////////////////////////////////////////////
30 class EXPCL_PANDAPHYSX PhysxPulleyJointDesc : public PhysxJointDesc {
31 
32 PUBLISHED:
33  INLINE PhysxPulleyJointDesc();
34  INLINE ~PhysxPulleyJointDesc();
35 
36  INLINE void set_to_default();
37  INLINE bool is_valid() const;
38 
39  void set_distance(float distance);
40  void set_stiffness(float stiffness);
41  void set_ratio(float ration);
42  void set_pulley(unsigned int idx, const LPoint3f pos);
43  void set_motor(const PhysxMotorDesc &motor);
44  void set_flag(PhysxPulleyJointFlag flag, bool value);
45 
46  float get_distance() const;
47  float get_stiffness() const;
48  float get_ratio() const;
49  bool get_flag(PhysxPulleyJointFlag flag) const;
50  LPoint3f get_pulley(unsigned int idx) const;
51  PhysxMotorDesc get_motor() const;
52 
53 public:
54  NxJointDesc *ptr() const { return (NxJointDesc *)&_desc; };
55  NxPulleyJointDesc _desc;
56 };
57 
58 #include "physxPulleyJointDesc.I"
59 
60 #endif // PHYSXPULLEYJOINTDESC_H
Descriptor class for distance joint.
Describes a joint motor.
Abstract base class for joint descriptors.
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
Definition: lpoint3.h:99