Panda3D
 All Classes Functions Variables Enumerations
physxSphericalJointDesc.h
1 // Filename: physxSphericalJointDesc.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 PHYSXSPHERICALJOINTDESC_H
16 #define PHYSXSPHERICALJOINTDESC_H
17 
18 #include "pandabase.h"
19 
20 #include "physxJointDesc.h"
21 #include "physx_includes.h"
22 
23 class PhysxSpringDesc;
25 
26 ////////////////////////////////////////////////////////////////////
27 // Class : PhysxSphericalJointDesc
28 // Description : Descriptor class for distance joint. See
29 // PhysxSphericalJoint.
30 ////////////////////////////////////////////////////////////////////
31 class EXPCL_PANDAPHYSX PhysxSphericalJointDesc : public PhysxJointDesc {
32 
33 PUBLISHED:
34  INLINE PhysxSphericalJointDesc();
35  INLINE ~PhysxSphericalJointDesc();
36 
37  INLINE void set_to_default();
38  INLINE bool is_valid() const;
39 
40  void set_projection_distance(float distance);
41  void set_flag(PhysxSphericalJointFlag flag, bool value);
42  void set_swing_axis(const LVector3f &axis);
43  void set_twist_spring(const PhysxSpringDesc &spring);
44  void set_swing_spring(const PhysxSpringDesc &spring);
45  void set_joint_spring(const PhysxSpringDesc &spring);
46  void set_twist_limit_low(const PhysxJointLimitDesc &low);
47  void set_twist_limit_high(const PhysxJointLimitDesc &high);
48  void set_swing_limit(const PhysxJointLimitDesc &limit);
49  void set_projection_mode(PhysxProjectionMode mode);
50 
51  float get_projection_distance() const;
52  bool get_flag(PhysxSphericalJointFlag flag) const;
53  LVector3f get_swing_axis() const;
54  PhysxSpringDesc get_twist_spring() const;
55  PhysxSpringDesc get_swing_spring() const;
56  PhysxSpringDesc get_joint_spring() const;
57  PhysxJointLimitDesc get_twist_limit_low() const;
58  PhysxJointLimitDesc get_twist_limit_high() const;
59  PhysxJointLimitDesc get_swing_limit() const;
60  PhysxProjectionMode get_projection_mode() const;
61 
62 public:
63  NxJointDesc *ptr() const { return (NxJointDesc *)&_desc; };
64  NxSphericalJointDesc _desc;
65 };
66 
67 #include "physxSphericalJointDesc.I"
68 
69 #endif // PHYSXSPHERICALJOINTDESC_H
This is a three-component vector distance (as opposed to a three-component point, which represents a ...
Definition: lvector3.h:100
Abstract base class for joint descriptors.
Describes a joint spring.
Descriptor class for distance joint.
Describes a joint limit.