Panda3D
|
00001 // Filename: physxMotorDesc.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 PHYSXMOTORDESC_H 00016 #define PHYSXMOTORDESC_H 00017 00018 #include "pandabase.h" 00019 00020 #include "physx_includes.h" 00021 00022 //////////////////////////////////////////////////////////////////// 00023 // Class : PhysxMotorDesc 00024 // Description : Describes a joint motor. Some joints can be 00025 // motorized, this allows them to apply a force to 00026 // cause attached actors to move. Joints which can be 00027 // motorized: 00028 // - PhysxPulleyJoint 00029 // - PhysxRevoluteJoint 00030 //////////////////////////////////////////////////////////////////// 00031 class PhysxMotorDesc { 00032 00033 PUBLISHED: 00034 INLINE PhysxMotorDesc(); 00035 INLINE PhysxMotorDesc(float velTarget, float maxForce=0, bool freeSpin=0); 00036 INLINE ~PhysxMotorDesc(); 00037 00038 void set_vel_target(float velTarget); 00039 void set_max_force(float maxForce); 00040 void set_free_spin(bool freeSpin); 00041 00042 float get_vel_target() const; 00043 float get_max_force() const; 00044 bool get_free_spin() const; 00045 00046 public: 00047 NxMotorDesc _desc; 00048 }; 00049 00050 #include "physxMotorDesc.I" 00051 00052 #endif // PHYSXMOTORDESC_H