Panda3D

physxSphericalJointDesc.h

00001 // Filename: physxSphericalJointDesc.h
00002 // Created by:  enn0x (28Sep09)
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 PHYSXSPHERICALJOINTDESC_H
00016 #define PHYSXSPHERICALJOINTDESC_H
00017 
00018 #include "pandabase.h"
00019 
00020 #include "physxJointDesc.h"
00021 #include "physx_includes.h"
00022 
00023 class PhysxSpringDesc;
00024 class PhysxJointLimitDesc;
00025 
00026 ////////////////////////////////////////////////////////////////////
00027 //       Class : PhysxSphericalJointDesc
00028 // Description : Descriptor class for distance joint. See
00029 //               PhysxSphericalJoint.
00030 ////////////////////////////////////////////////////////////////////
00031 class EXPCL_PANDAPHYSX PhysxSphericalJointDesc : public PhysxJointDesc {
00032 
00033 PUBLISHED:
00034   INLINE PhysxSphericalJointDesc();
00035   INLINE ~PhysxSphericalJointDesc();
00036 
00037   INLINE void set_to_default();
00038   INLINE bool is_valid() const;
00039 
00040   void set_projection_distance(float distance);
00041   void set_flag(PhysxSphericalJointFlag flag, bool value);
00042   void set_swing_axis(const LVector3f &axis);
00043   void set_twist_spring(const PhysxSpringDesc &spring);
00044   void set_swing_spring(const PhysxSpringDesc &spring);
00045   void set_joint_spring(const PhysxSpringDesc &spring);
00046   void set_twist_limit_low(const PhysxJointLimitDesc &low);
00047   void set_twist_limit_high(const PhysxJointLimitDesc &high);
00048   void set_swing_limit(const PhysxJointLimitDesc &limit);
00049   void set_projection_mode(PhysxProjectionMode mode);
00050 
00051   float get_projection_distance() const;
00052   bool get_flag(PhysxSphericalJointFlag flag) const;
00053   LVector3f get_swing_axis() const;
00054   PhysxSpringDesc get_twist_spring() const;
00055   PhysxSpringDesc get_swing_spring() const;
00056   PhysxSpringDesc get_joint_spring() const;
00057   PhysxJointLimitDesc get_twist_limit_low() const;
00058   PhysxJointLimitDesc get_twist_limit_high() const;
00059   PhysxJointLimitDesc get_swing_limit() const;
00060   PhysxProjectionMode get_projection_mode() const;
00061 
00062 public:
00063   NxJointDesc *ptr() const { return (NxJointDesc *)&_desc; };
00064   NxSphericalJointDesc _desc;
00065 };
00066 
00067 #include "physxSphericalJointDesc.I"
00068 
00069 #endif // PHYSXSPHERICALJOINTDESC_H
 All Classes Functions Variables Enumerations