Blender V2.61 - r43446

btSolve2LinearConstraint.h

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 #ifndef SOLVE_2LINEAR_CONSTRAINT_H
00017 #define SOLVE_2LINEAR_CONSTRAINT_H
00018 
00019 #include "LinearMath/btMatrix3x3.h"
00020 #include "LinearMath/btVector3.h"
00021 
00022 
00023 class btRigidBody;
00024 
00025 
00026 
00028 class   btSolve2LinearConstraint
00029 {
00030     btScalar    m_tau;
00031     btScalar    m_damping;
00032 
00033 public:
00034 
00035     btSolve2LinearConstraint(btScalar tau,btScalar damping)
00036     {
00037         m_tau = tau;
00038         m_damping = damping;
00039     }
00040     //
00041     // solve unilateral constraint (equality, direct method)
00042     //
00043     void resolveUnilateralPairConstraint(       
00044                                                            btRigidBody* body0,
00045         btRigidBody* body1,
00046 
00047         const btMatrix3x3& world2A,
00048                         const btMatrix3x3& world2B,
00049                         
00050                         const btVector3& invInertiaADiag,
00051                         const btScalar invMassA,
00052                         const btVector3& linvelA,const btVector3& angvelA,
00053                         const btVector3& rel_posA1,
00054                         const btVector3& invInertiaBDiag,
00055                         const btScalar invMassB,
00056                         const btVector3& linvelB,const btVector3& angvelB,
00057                         const btVector3& rel_posA2,
00058 
00059                       btScalar depthA, const btVector3& normalA, 
00060                       const btVector3& rel_posB1,const btVector3& rel_posB2,
00061                       btScalar depthB, const btVector3& normalB, 
00062                       btScalar& imp0,btScalar& imp1);
00063 
00064 
00065     //
00066     // solving 2x2 lcp problem (inequality, direct solution )
00067     //
00068     void resolveBilateralPairConstraint(
00069             btRigidBody* body0,
00070                         btRigidBody* body1,
00071         const btMatrix3x3& world2A,
00072                         const btMatrix3x3& world2B,
00073                         
00074                         const btVector3& invInertiaADiag,
00075                         const btScalar invMassA,
00076                         const btVector3& linvelA,const btVector3& angvelA,
00077                         const btVector3& rel_posA1,
00078                         const btVector3& invInertiaBDiag,
00079                         const btScalar invMassB,
00080                         const btVector3& linvelB,const btVector3& angvelB,
00081                         const btVector3& rel_posA2,
00082 
00083                       btScalar depthA, const btVector3& normalA, 
00084                       const btVector3& rel_posB1,const btVector3& rel_posB2,
00085                       btScalar depthB, const btVector3& normalB, 
00086                       btScalar& imp0,btScalar& imp1);
00087 
00088 /*
00089     void resolveAngularConstraint(  const btMatrix3x3& invInertiaAWS,
00090                         const btScalar invMassA,
00091                         const btVector3& linvelA,const btVector3& angvelA,
00092                         const btVector3& rel_posA1,
00093                         const btMatrix3x3& invInertiaBWS,
00094                         const btScalar invMassB,
00095                         const btVector3& linvelB,const btVector3& angvelB,
00096                         const btVector3& rel_posA2,
00097 
00098                       btScalar depthA, const btVector3& normalA, 
00099                       const btVector3& rel_posB1,const btVector3& rel_posB2,
00100                       btScalar depthB, const btVector3& normalB, 
00101                       btScalar& imp0,btScalar& imp1);
00102 
00103 */
00104 
00105 };
00106 
00107 #endif //SOLVE_2LINEAR_CONSTRAINT_H