Panda3D
physxRevoluteJointDesc.h
1 // Filename: physxRevoluteJointDesc.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 PHYSXREVOLUTEJOINTDESC_H
16 #define PHYSXREVOLUTEJOINTDESC_H
17 
18 #include "pandabase.h"
19 
20 #include "physxJointDesc.h"
21 #include "physx_includes.h"
22 
23 class PhysxSpringDesc;
24 class PhysxMotorDesc;
26 
27 ////////////////////////////////////////////////////////////////////
28 // Class : PhysxRevoluteJointDesc
29 // Description : Descriptor class for distance joint. See
30 // PhysxRevoluteJoint.
31 ////////////////////////////////////////////////////////////////////
32 class EXPCL_PANDAPHYSX PhysxRevoluteJointDesc : public PhysxJointDesc {
33 
34 PUBLISHED:
35  INLINE PhysxRevoluteJointDesc();
36  INLINE ~PhysxRevoluteJointDesc();
37 
38  INLINE void set_to_default();
39  INLINE bool is_valid() const;
40 
41  void set_projection_distance(float distance);
42  void set_projection_angle(float angle);
43  void set_spring(const PhysxSpringDesc &spring);
44  void set_flag(PhysxRevoluteJointFlag flag, bool value);
45  void set_motor(const PhysxMotorDesc &motor);
46  void set_limit_low(const PhysxJointLimitDesc &low);
47  void set_limit_high(const PhysxJointLimitDesc &high);
48  void set_projection_mode(PhysxProjectionMode mode);
49 
50  float get_projection_distance() const;
51  float get_projection_angle() const;
52  bool get_flag(PhysxRevoluteJointFlag flag) const;
53  PhysxSpringDesc get_spring() const;
54  PhysxMotorDesc get_motor() const;
55  PhysxJointLimitDesc get_limit_low() const;
56  PhysxJointLimitDesc get_limit_high() const;
57  PhysxProjectionMode get_projection_mode() const;
58 
59 public:
60  NxJointDesc *ptr() const { return (NxJointDesc *)&_desc; };
61  NxRevoluteJointDesc _desc;
62 };
63 
64 #include "physxRevoluteJointDesc.I"
65 
66 #endif // PHYSXREVOLUTEJOINTDESC_H
Descriptor class for distance joint.
Describes a joint motor.
Abstract base class for joint descriptors.
Describes a joint spring.
Describes a joint limit.