Back to index

supertuxkart  0.5+dfsg1
btTypedConstraint.cpp
Go to the documentation of this file.
00001 /*
00002 Bullet Continuous Collision Detection and Physics Library
00003 Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
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 #include "btTypedConstraint.h"
00018 #include "BulletDynamics/Dynamics/btRigidBody.h"
00019 
00020 static btRigidBody s_fixed(0, 0,0);
00021 
00022 btTypedConstraint::btTypedConstraint(btTypedConstraintType type)
00023 :m_userConstraintType(-1),
00024 m_userConstraintId(-1),
00025 m_constraintType (type),
00026 m_rbA(s_fixed),
00027 m_rbB(s_fixed),
00028 m_appliedImpulse(btScalar(0.))
00029 {
00030        s_fixed.setMassProps(btScalar(0.),btVector3(btScalar(0.),btScalar(0.),btScalar(0.)));
00031 }
00032 btTypedConstraint::btTypedConstraint(btTypedConstraintType type, btRigidBody& rbA)
00033 :m_userConstraintType(-1),
00034 m_userConstraintId(-1),
00035 m_constraintType (type),
00036 m_rbA(rbA),
00037 m_rbB(s_fixed),
00038 m_appliedImpulse(btScalar(0.))
00039 {
00040               s_fixed.setMassProps(btScalar(0.),btVector3(btScalar(0.),btScalar(0.),btScalar(0.)));
00041 
00042 }
00043 
00044 
00045 btTypedConstraint::btTypedConstraint(btTypedConstraintType type, btRigidBody& rbA,btRigidBody& rbB)
00046 :m_userConstraintType(-1),
00047 m_userConstraintId(-1),
00048 m_constraintType (type),
00049 m_rbA(rbA),
00050 m_rbB(rbB),
00051 m_appliedImpulse(btScalar(0.))
00052 {
00053               s_fixed.setMassProps(btScalar(0.),btVector3(btScalar(0.),btScalar(0.),btScalar(0.)));
00054 
00055 }
00056