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