btGearConstraint.h

Go to the documentation of this file.
00001 /*
00002 Bullet Continuous Collision Detection and Physics Library
00003 Copyright (c) 2012 Advanced Micro Devices, Inc.  http://bulletphysics.org
00004 
00005 This software is provided 'as-is', without any express or implied warranty.
00006 In no event will the authors be held liable for any damages arising from the use of this software.
00007 Permission is granted to anyone to use this software for any purpose, 
00008 including commercial applications, and to alter it and redistribute it freely, 
00009 subject to the following restrictions:
00010 
00011 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
00012 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
00013 3. This notice may not be removed or altered from any source distribution.
00014 */
00015 
00016 
00017 
00018 #ifndef BT_GEAR_CONSTRAINT_H
00019 #define BT_GEAR_CONSTRAINT_H
00020 
00021 #include "BulletDynamics/ConstraintSolver/btTypedConstraint.h"
00024 class btGearConstraint : public btTypedConstraint
00025 {
00026 protected:
00027         btVector3       m_axisInA;
00028         btVector3       m_axisInB;
00029         bool            m_useFrameA;
00030         btScalar        m_ratio;
00031 
00032 public:
00033         btGearConstraint(btRigidBody& rbA, btRigidBody& rbB, const btVector3& axisInA,const btVector3& axisInB, btScalar ratio=1.f);
00034         virtual ~btGearConstraint ();
00035 
00037         virtual void getInfo1 (btConstraintInfo1* info);
00038 
00040         virtual void getInfo2 (btConstraintInfo2* info);
00041 
00042         virtual void    setParam(int num, btScalar value, int axis = -1) 
00043         {
00044                 btAssert(0);
00045         };
00046 
00048         virtual btScalar getParam(int num, int axis = -1) const 
00049         { 
00050                 btAssert(0);
00051                 return 0.f;
00052         }
00053 
00054 };
00055 
00056 #endif //BT_GEAR_CONSTRAINT_H