Panda3D
|
00001 // Filename: physxD6JointDesc.h 00002 // Created by: enn0x (01Oct09) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef PHYSXD6JOINTDESC_H 00016 #define PHYSXD6JOINTDESC_H 00017 00018 #include "pandabase.h" 00019 #include "lvector3.h" 00020 #include "lpoint3.h" 00021 #include "lquaternion.h" 00022 00023 #include "physxJointDesc.h" 00024 #include "physx_includes.h" 00025 00026 class PhysxJointDriveDesc; 00027 class PhysxJointLimitSoftDesc; 00028 00029 //////////////////////////////////////////////////////////////////// 00030 // Class : PhysxD6JointDesc 00031 // Description : 00032 //////////////////////////////////////////////////////////////////// 00033 class EXPCL_PANDAPHYSX PhysxD6JointDesc : public PhysxJointDesc { 00034 00035 PUBLISHED: 00036 INLINE PhysxD6JointDesc(); 00037 INLINE ~PhysxD6JointDesc(); 00038 00039 INLINE void set_to_default(); 00040 INLINE bool is_valid() const; 00041 00042 void set_flag(PhysxD6JointFlag flag, bool value); 00043 void set_projection_distance(float distance); 00044 void set_projection_angle(float angle); 00045 void set_gear_ratio(float ratio); 00046 void set_drive_position(const LPoint3f &pos); 00047 void set_drive_linear_velocity(const LVector3f &v); 00048 void set_drive_angular_velocity(const LVector3f &v); 00049 void set_drive_orientation(const LQuaternionf &quat); 00050 void set_projection_mode(PhysxProjectionMode mode); 00051 void set_x_motion(PhysxD6JointMotion xMotion); 00052 void set_y_motion(PhysxD6JointMotion yMotion); 00053 void set_z_motion(PhysxD6JointMotion zMotion); 00054 void set_swing1_motion(PhysxD6JointMotion xMotion); 00055 void set_swing2_motion(PhysxD6JointMotion yMotion); 00056 void set_twist_motion(PhysxD6JointMotion zMotion); 00057 void set_x_drive(const PhysxJointDriveDesc &drive); 00058 void set_y_drive(const PhysxJointDriveDesc &drive); 00059 void set_z_drive(const PhysxJointDriveDesc &drive); 00060 void set_swing_drive(const PhysxJointDriveDesc &drive); 00061 void set_twist_drive(const PhysxJointDriveDesc &drive); 00062 void set_slerp_drive(const PhysxJointDriveDesc &drive); 00063 void set_linear_limit(const PhysxJointLimitSoftDesc &limit); 00064 void set_swing1_limit(const PhysxJointLimitSoftDesc &limit); 00065 void set_swing2_limit(const PhysxJointLimitSoftDesc &limit); 00066 void set_twist_limit_low(const PhysxJointLimitSoftDesc &limit); 00067 void set_twist_limit_high(const PhysxJointLimitSoftDesc &limit); 00068 00069 bool get_flag(PhysxD6JointFlag flag) const; 00070 float get_projection_distance() const; 00071 float get_projection_angle() const; 00072 float get_gear_ratio() const; 00073 LPoint3f get_drive_position() const; 00074 LVector3f get_drive_linear_velocity() const; 00075 LVector3f get_drive_angular_velocity() const; 00076 LQuaternionf get_drive_orientation() const; 00077 PhysxProjectionMode get_projection_mode() const; 00078 PhysxD6JointMotion get_x_motion() const; 00079 PhysxD6JointMotion get_y_motion() const; 00080 PhysxD6JointMotion get_z_motion() const; 00081 PhysxD6JointMotion get_swing1_motion() const; 00082 PhysxD6JointMotion get_swing2_motion() const; 00083 PhysxD6JointMotion get_twist_motion() const; 00084 PhysxJointDriveDesc get_x_drive() const; 00085 PhysxJointDriveDesc get_y_drive() const; 00086 PhysxJointDriveDesc get_z_drive() const; 00087 PhysxJointDriveDesc get_swing_drive() const; 00088 PhysxJointDriveDesc get_twist_drive() const; 00089 PhysxJointDriveDesc get_slerp_drive() const; 00090 PhysxJointLimitSoftDesc get_linear_limit() const; 00091 PhysxJointLimitSoftDesc get_swing1_limit() const; 00092 PhysxJointLimitSoftDesc get_swing2_limit() const; 00093 PhysxJointLimitSoftDesc get_twist_limit_low() const; 00094 PhysxJointLimitSoftDesc get_twist_limit_high() const; 00095 00096 public: 00097 NxJointDesc *ptr() const { return (NxJointDesc *)&_desc; }; 00098 NxD6JointDesc _desc; 00099 }; 00100 00101 #include "physxD6JointDesc.I" 00102 00103 #endif // PHYSXD6JOINTDESC_H