Panda3D
physxD6JointDesc.h
1 // Filename: physxD6JointDesc.h
2 // Created by: enn0x (01Oct09)
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 PHYSXD6JOINTDESC_H
16 #define PHYSXD6JOINTDESC_H
17 
18 #include "pandabase.h"
19 #include "luse.h"
20 
21 #include "physxJointDesc.h"
22 #include "physx_includes.h"
23 
26 
27 ////////////////////////////////////////////////////////////////////
28 // Class : PhysxD6JointDesc
29 // Description :
30 ////////////////////////////////////////////////////////////////////
31 class EXPCL_PANDAPHYSX PhysxD6JointDesc : public PhysxJointDesc {
32 
33 PUBLISHED:
34  INLINE PhysxD6JointDesc();
35  INLINE ~PhysxD6JointDesc();
36 
37  INLINE void set_to_default();
38  INLINE bool is_valid() const;
39 
40  void set_flag(PhysxD6JointFlag flag, bool value);
41  void set_projection_distance(float distance);
42  void set_projection_angle(float angle);
43  void set_gear_ratio(float ratio);
44  void set_drive_position(const LPoint3f &pos);
45  void set_drive_linear_velocity(const LVector3f &v);
46  void set_drive_angular_velocity(const LVector3f &v);
47  void set_drive_orientation(const LQuaternionf &quat);
48  void set_projection_mode(PhysxProjectionMode mode);
49  void set_x_motion(PhysxD6JointMotion xMotion);
50  void set_y_motion(PhysxD6JointMotion yMotion);
51  void set_z_motion(PhysxD6JointMotion zMotion);
52  void set_swing1_motion(PhysxD6JointMotion xMotion);
53  void set_swing2_motion(PhysxD6JointMotion yMotion);
54  void set_twist_motion(PhysxD6JointMotion zMotion);
55  void set_x_drive(const PhysxJointDriveDesc &drive);
56  void set_y_drive(const PhysxJointDriveDesc &drive);
57  void set_z_drive(const PhysxJointDriveDesc &drive);
58  void set_swing_drive(const PhysxJointDriveDesc &drive);
59  void set_twist_drive(const PhysxJointDriveDesc &drive);
60  void set_slerp_drive(const PhysxJointDriveDesc &drive);
61  void set_linear_limit(const PhysxJointLimitSoftDesc &limit);
62  void set_swing1_limit(const PhysxJointLimitSoftDesc &limit);
63  void set_swing2_limit(const PhysxJointLimitSoftDesc &limit);
64  void set_twist_limit_low(const PhysxJointLimitSoftDesc &limit);
65  void set_twist_limit_high(const PhysxJointLimitSoftDesc &limit);
66 
67  bool get_flag(PhysxD6JointFlag flag) const;
68  float get_projection_distance() const;
69  float get_projection_angle() const;
70  float get_gear_ratio() const;
71  LPoint3f get_drive_position() const;
72  LVector3f get_drive_linear_velocity() const;
73  LVector3f get_drive_angular_velocity() const;
74  LQuaternionf get_drive_orientation() const;
75  PhysxProjectionMode get_projection_mode() const;
76  PhysxD6JointMotion get_x_motion() const;
77  PhysxD6JointMotion get_y_motion() const;
78  PhysxD6JointMotion get_z_motion() const;
79  PhysxD6JointMotion get_swing1_motion() const;
80  PhysxD6JointMotion get_swing2_motion() const;
81  PhysxD6JointMotion get_twist_motion() const;
82  PhysxJointDriveDesc get_x_drive() const;
83  PhysxJointDriveDesc get_y_drive() const;
84  PhysxJointDriveDesc get_z_drive() const;
85  PhysxJointDriveDesc get_swing_drive() const;
86  PhysxJointDriveDesc get_twist_drive() const;
87  PhysxJointDriveDesc get_slerp_drive() const;
88  PhysxJointLimitSoftDesc get_linear_limit() const;
89  PhysxJointLimitSoftDesc get_swing1_limit() const;
90  PhysxJointLimitSoftDesc get_swing2_limit() const;
91  PhysxJointLimitSoftDesc get_twist_limit_low() const;
92  PhysxJointLimitSoftDesc get_twist_limit_high() const;
93 
94 public:
95  NxJointDesc *ptr() const { return (NxJointDesc *)&_desc; };
96  NxD6JointDesc _desc;
97 };
98 
99 #include "physxD6JointDesc.I"
100 
101 #endif // PHYSXD6JOINTDESC_H
Describes a joint limit.
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.
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
Definition: lpoint3.h:99
Used to describe drive properties for a PhysxD6Joint.
This is the base quaternion class.
Definition: lquaternion.h:96