00001 /*************************************************************************** 00002 00003 This source file is part of OGREBULLET 00004 (Object-oriented Graphics Rendering Engine Bullet Wrapper) 00005 For the latest info, see http://www.ogre3d.org/phpBB2addons/viewforum.php?f=10 00006 00007 Copyright (c) 2007 tuan.kuranes@gmail.com (Use it Freely, even Statically, but have to contribute any changes) 00008 00009 00010 00011 Permission is hereby granted, free of charge, to any person obtaining a copy 00012 of this software and associated documentation files (the "Software"), to deal 00013 in the Software without restriction, including without limitation the rights 00014 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 00015 copies of the Software, and to permit persons to whom the Software is 00016 furnished to do so, subject to the following conditions: 00017 00018 The above copyright notice and this permission notice shall be included in 00019 all copies or substantial portions of the Software. 00020 00021 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00022 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00023 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00024 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00025 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 00026 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 00027 THE SOFTWARE. 00028 ----------------------------------------------------------------------------- 00029 */ 00030 #ifndef _OGREBULLETDYNAMICS_SixDofConstraint_H 00031 #define _OGREBULLETDYNAMICS_SixDofConstraint_H 00032 00033 #include "OgreBulletDynamicsPreRequisites.h" 00034 00035 #include "OgreBulletDynamicsConstraint.h" 00036 00037 00038 namespace OgreBulletDynamics 00039 { 00040 // ------------------------------------------------------------------------- 00041 // SixDofConstraint class 00042 class SixDofConstraint : public TypedConstraint 00043 { 00044 public: 00045 SixDofConstraint(RigidBody * rbA, RigidBody * rbB, 00046 const Ogre::Vector3& FrameInAVector, const Ogre::Quaternion& FrameInAOrientation, 00047 const Ogre::Vector3& FrameInBVector, const Ogre::Quaternion& FrameInBOrientation); 00048 00049 void setLinearLowerLimit(const Ogre::Vector3& linearLower); 00050 void setLinearUpperLimit(const Ogre::Vector3& linearUpper); 00051 void setAngularLowerLimit(const Ogre::Vector3& angularLower); 00052 void setAngularUpperLimit(const Ogre::Vector3& angularUpper); 00053 00054 void setLimit(const int axis, const Ogre::Real lo, const Ogre::Real hi); 00056 00062 bool isLimited(int limitIndex); 00063 00064 virtual ~SixDofConstraint(); 00065 00066 }; 00067 } 00068 #endif //_OGREBULLETDYNAMICS_SixDofConstraint_H 00069
1.7.1