Panda3D
physxDistanceJointDesc.h
1 // Filename: physxDistanceJointDesc.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 PHYSXDISTANCEJOINTDESC_H
16 #define PHYSXDISTANCEJOINTDESC_H
17 
18 #include "pandabase.h"
19 
20 #include "physxJointDesc.h"
21 #include "physx_includes.h"
22 
23 class PhysxSpringDesc;
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : PhysxDistanceJointDesc
27 // Description : Descriptor class for distance joint. See
28 // PhysxDistanceJoint.
29 ////////////////////////////////////////////////////////////////////
30 class EXPCL_PANDAPHYSX PhysxDistanceJointDesc : public PhysxJointDesc {
31 
32 PUBLISHED:
33  INLINE PhysxDistanceJointDesc();
34  INLINE ~PhysxDistanceJointDesc();
35 
36  INLINE void set_to_default();
37  INLINE bool is_valid() const;
38 
39  void set_max_distance(float distance);
40  void set_min_distance(float distance);
41  void set_spring(const PhysxSpringDesc &spring);
42  void set_flag(PhysxDistanceJointFlag flag, bool value);
43 
44  float get_max_distance() const;
45  float get_min_distance() const;
46  bool get_flag(PhysxDistanceJointFlag flag) const;
47  PhysxSpringDesc get_spring() const;
48 
49 public:
50  NxJointDesc *ptr() const { return (NxJointDesc *)&_desc; };
51  NxDistanceJointDesc _desc;
52 };
53 
54 #include "physxDistanceJointDesc.I"
55 
56 #endif // PHYSXDISTANCEJOINTDESC_H
Descriptor class for distance joint.
Abstract base class for joint descriptors.
Describes a joint spring.