Panda3D

physxD6JointDesc.h

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 "luse.h"
00020 
00021 #include "physxJointDesc.h"
00022 #include "physx_includes.h"
00023 
00024 class PhysxJointDriveDesc;
00025 class PhysxJointLimitSoftDesc;
00026 
00027 ////////////////////////////////////////////////////////////////////
00028 //       Class : PhysxD6JointDesc
00029 // Description : 
00030 ////////////////////////////////////////////////////////////////////
00031 class EXPCL_PANDAPHYSX PhysxD6JointDesc : public PhysxJointDesc {
00032 
00033 PUBLISHED:
00034   INLINE PhysxD6JointDesc();
00035   INLINE ~PhysxD6JointDesc();
00036 
00037   INLINE void set_to_default();
00038   INLINE bool is_valid() const;
00039 
00040   void set_flag(PhysxD6JointFlag flag, bool value);
00041   void set_projection_distance(float distance);
00042   void set_projection_angle(float angle);
00043   void set_gear_ratio(float ratio);
00044   void set_drive_position(const LPoint3f &pos);
00045   void set_drive_linear_velocity(const LVector3f &v);
00046   void set_drive_angular_velocity(const LVector3f &v);
00047   void set_drive_orientation(const LQuaternionf &quat);
00048   void set_projection_mode(PhysxProjectionMode mode);
00049   void set_x_motion(PhysxD6JointMotion xMotion);
00050   void set_y_motion(PhysxD6JointMotion yMotion);
00051   void set_z_motion(PhysxD6JointMotion zMotion);
00052   void set_swing1_motion(PhysxD6JointMotion xMotion);
00053   void set_swing2_motion(PhysxD6JointMotion yMotion);
00054   void set_twist_motion(PhysxD6JointMotion zMotion);
00055   void set_x_drive(const PhysxJointDriveDesc &drive);
00056   void set_y_drive(const PhysxJointDriveDesc &drive);
00057   void set_z_drive(const PhysxJointDriveDesc &drive);
00058   void set_swing_drive(const PhysxJointDriveDesc &drive);
00059   void set_twist_drive(const PhysxJointDriveDesc &drive);
00060   void set_slerp_drive(const PhysxJointDriveDesc &drive);
00061   void set_linear_limit(const PhysxJointLimitSoftDesc &limit);
00062   void set_swing1_limit(const PhysxJointLimitSoftDesc &limit);
00063   void set_swing2_limit(const PhysxJointLimitSoftDesc &limit);
00064   void set_twist_limit_low(const PhysxJointLimitSoftDesc &limit);
00065   void set_twist_limit_high(const PhysxJointLimitSoftDesc &limit);
00066 
00067   bool get_flag(PhysxD6JointFlag flag) const;
00068   float get_projection_distance() const;
00069   float get_projection_angle() const;
00070   float get_gear_ratio() const;
00071   LPoint3f get_drive_position() const;
00072   LVector3f get_drive_linear_velocity() const;
00073   LVector3f get_drive_angular_velocity() const;
00074   LQuaternionf get_drive_orientation() const;
00075   PhysxProjectionMode get_projection_mode() const;
00076   PhysxD6JointMotion get_x_motion() const;
00077   PhysxD6JointMotion get_y_motion() const;
00078   PhysxD6JointMotion get_z_motion() const;
00079   PhysxD6JointMotion get_swing1_motion() const;
00080   PhysxD6JointMotion get_swing2_motion() const;
00081   PhysxD6JointMotion get_twist_motion() const;
00082   PhysxJointDriveDesc get_x_drive() const;
00083   PhysxJointDriveDesc get_y_drive() const;
00084   PhysxJointDriveDesc get_z_drive() const;
00085   PhysxJointDriveDesc get_swing_drive() const;
00086   PhysxJointDriveDesc get_twist_drive() const;
00087   PhysxJointDriveDesc get_slerp_drive() const;
00088   PhysxJointLimitSoftDesc get_linear_limit() const;
00089   PhysxJointLimitSoftDesc get_swing1_limit() const;
00090   PhysxJointLimitSoftDesc get_swing2_limit() const;
00091   PhysxJointLimitSoftDesc get_twist_limit_low() const;
00092   PhysxJointLimitSoftDesc get_twist_limit_high() const;
00093 
00094 public:
00095   NxJointDesc *ptr() const { return (NxJointDesc *)&_desc; };
00096   NxD6JointDesc _desc;
00097 };
00098 
00099 #include "physxD6JointDesc.I"
00100 
00101 #endif // PHYSXD6JOINTDESC_H
 All Classes Functions Variables Enumerations