Panda3D
physxSphericalJointDesc.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 physxSphericalJointDesc.h
10  * @author enn0x
11  * @date 2009-09-28
12  */
13 
14 #ifndef PHYSXSPHERICALJOINTDESC_H
15 #define PHYSXSPHERICALJOINTDESC_H
16 
17 #include "pandabase.h"
18 
19 #include "physxJointDesc.h"
20 #include "physx_includes.h"
21 
22 class PhysxSpringDesc;
24 
25 /**
26  * Descriptor class for distance joint. See PhysxSphericalJoint.
27  */
28 class EXPCL_PANDAPHYSX PhysxSphericalJointDesc : public PhysxJointDesc {
29 
30 PUBLISHED:
31  INLINE PhysxSphericalJointDesc();
32  INLINE ~PhysxSphericalJointDesc();
33 
34  INLINE void set_to_default();
35  INLINE bool is_valid() const;
36 
37  void set_projection_distance(float distance);
38  void set_flag(PhysxSphericalJointFlag flag, bool value);
39  void set_swing_axis(const LVector3f &axis);
40  void set_twist_spring(const PhysxSpringDesc &spring);
41  void set_swing_spring(const PhysxSpringDesc &spring);
42  void set_joint_spring(const PhysxSpringDesc &spring);
43  void set_twist_limit_low(const PhysxJointLimitDesc &low);
44  void set_twist_limit_high(const PhysxJointLimitDesc &high);
45  void set_swing_limit(const PhysxJointLimitDesc &limit);
46  void set_projection_mode(PhysxProjectionMode mode);
47 
48  float get_projection_distance() const;
49  bool get_flag(PhysxSphericalJointFlag flag) const;
50  LVector3f get_swing_axis() const;
51  PhysxSpringDesc get_twist_spring() const;
52  PhysxSpringDesc get_swing_spring() const;
53  PhysxSpringDesc get_joint_spring() const;
54  PhysxJointLimitDesc get_twist_limit_low() const;
55  PhysxJointLimitDesc get_twist_limit_high() const;
56  PhysxJointLimitDesc get_swing_limit() const;
57  PhysxProjectionMode get_projection_mode() const;
58 
59 public:
60  NxJointDesc *ptr() const { return (NxJointDesc *)&_desc; };
61  NxSphericalJointDesc _desc;
62 };
63 
65 
66 #endif // PHYSXSPHERICALJOINTDESC_H
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Abstract base class for joint descriptors.
Describes a joint spring.
Descriptor class for distance joint.
Describes a joint limit.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.