Panda3D
physxDistanceJointDesc.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 physxDistanceJointDesc.h
10  * @author enn0x
11  * @date 2009-09-28
12  */
13 
14 #ifndef PHYSXDISTANCEJOINTDESC_H
15 #define PHYSXDISTANCEJOINTDESC_H
16 
17 #include "pandabase.h"
18 
19 #include "physxJointDesc.h"
20 #include "physx_includes.h"
21 
22 class PhysxSpringDesc;
23 
24 /**
25  * Descriptor class for distance joint. See PhysxDistanceJoint.
26  */
27 class EXPCL_PANDAPHYSX PhysxDistanceJointDesc : public PhysxJointDesc {
28 
29 PUBLISHED:
30  INLINE PhysxDistanceJointDesc();
31  INLINE ~PhysxDistanceJointDesc();
32 
33  INLINE void set_to_default();
34  INLINE bool is_valid() const;
35 
36  void set_max_distance(float distance);
37  void set_min_distance(float distance);
38  void set_spring(const PhysxSpringDesc &spring);
39  void set_flag(PhysxDistanceJointFlag flag, bool value);
40 
41  float get_max_distance() const;
42  float get_min_distance() const;
43  bool get_flag(PhysxDistanceJointFlag flag) const;
44  PhysxSpringDesc get_spring() const;
45 
46 public:
47  NxJointDesc *ptr() const { return (NxJointDesc *)&_desc; };
48  NxDistanceJointDesc _desc;
49 };
50 
51 #include "physxDistanceJointDesc.I"
52 
53 #endif // PHYSXDISTANCEJOINTDESC_H
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Descriptor class for distance joint.
Abstract base class for joint descriptors.
Describes a joint spring.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.