Panda3D

physxPulleyJointDesc.h

00001 // Filename: physxPulleyJointDesc.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 PHYSXPULLEYJOINTDESC_H
00016 #define PHYSXPULLEYJOINTDESC_H
00017 
00018 #include "pandabase.h"
00019 
00020 #include "physxJointDesc.h"
00021 #include "physx_includes.h"
00022 
00023 class PhysxMotorDesc;
00024 
00025 ////////////////////////////////////////////////////////////////////
00026 //       Class : PhysxPulleyJointDesc
00027 // Description : Descriptor class for distance joint. See
00028 //               PhysxPulleyJoint.
00029 ////////////////////////////////////////////////////////////////////
00030 class EXPCL_PANDAPHYSX PhysxPulleyJointDesc : public PhysxJointDesc {
00031 
00032 PUBLISHED:
00033   INLINE PhysxPulleyJointDesc();
00034   INLINE ~PhysxPulleyJointDesc();
00035 
00036   INLINE void set_to_default();
00037   INLINE bool is_valid() const;
00038 
00039   void set_distance(float distance);
00040   void set_stiffness(float stiffness);
00041   void set_ratio(float ration);
00042   void set_pulley(unsigned int idx, const LPoint3f pos);
00043   void set_motor(const PhysxMotorDesc &motor);
00044   void set_flag(PhysxPulleyJointFlag flag, bool value);
00045 
00046   float get_distance() const;
00047   float get_stiffness() const;
00048   float get_ratio() const;
00049   bool get_flag(PhysxPulleyJointFlag flag) const;
00050   LPoint3f get_pulley(unsigned int idx) const;
00051   PhysxMotorDesc get_motor() const;
00052 
00053 public:
00054   NxJointDesc *ptr() const { return (NxJointDesc *)&_desc; };
00055   NxPulleyJointDesc _desc;
00056 };
00057 
00058 #include "physxPulleyJointDesc.I"
00059 
00060 #endif // PHYSXPULLEYJOINTDESC_H
 All Classes Functions Variables Enumerations