Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/external/bullet/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h @ 8393

Last change on this file since 8393 was 8393, checked in by rgrieder, 13 years ago

Updated Bullet from v2.77 to v2.78.
(I'm not going to make a branch for that since the update from 2.74 to 2.77 hasn't been tested that much either).

You will HAVE to do a complete RECOMPILE! I tested with MSVC and MinGW and they both threw linker errors at me.

  • Property svn:eol-style set to native
File size: 3.4 KB
Line 
1/*
2Bullet Continuous Collision Detection and Physics Library
3Copyright (c) 2003-2006 Erwin Coumans  http://continuousphysics.com/Bullet/
4
5This software is provided 'as-is', without any express or implied warranty.
6In no event will the authors be held liable for any damages arising from the use of this software.
7Permission is granted to anyone to use this software for any purpose,
8including commercial applications, and to alter it and redistribute it freely,
9subject to the following restrictions:
10
111. 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.
122. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
133. This notice may not be removed or altered from any source distribution.
14*/
15
16#ifndef BT_SOLVE_2LINEAR_CONSTRAINT_H
17#define BT_SOLVE_2LINEAR_CONSTRAINT_H
18
19#include "LinearMath/btMatrix3x3.h"
20#include "LinearMath/btVector3.h"
21
22
23class btRigidBody;
24
25
26
27/// constraint class used for lateral tyre friction.
28class   btSolve2LinearConstraint
29{
30        btScalar        m_tau;
31        btScalar        m_damping;
32
33public:
34
35        btSolve2LinearConstraint(btScalar tau,btScalar damping)
36        {
37                m_tau = tau;
38                m_damping = damping;
39        }
40        //
41        // solve unilateral constraint (equality, direct method)
42        //
43        void resolveUnilateralPairConstraint(           
44                                                                                                                   btRigidBody* body0,
45                btRigidBody* body1,
46
47                const btMatrix3x3& world2A,
48                                                const btMatrix3x3& world2B,
49                                               
50                                                const btVector3& invInertiaADiag,
51                                                const btScalar invMassA,
52                                                const btVector3& linvelA,const btVector3& angvelA,
53                                                const btVector3& rel_posA1,
54                                                const btVector3& invInertiaBDiag,
55                                                const btScalar invMassB,
56                                                const btVector3& linvelB,const btVector3& angvelB,
57                                                const btVector3& rel_posA2,
58
59                                          btScalar depthA, const btVector3& normalA, 
60                                          const btVector3& rel_posB1,const btVector3& rel_posB2,
61                                          btScalar depthB, const btVector3& normalB, 
62                                          btScalar& imp0,btScalar& imp1);
63
64
65        //
66        // solving 2x2 lcp problem (inequality, direct solution )
67        //
68        void resolveBilateralPairConstraint(
69                        btRigidBody* body0,
70                                                btRigidBody* body1,
71                const btMatrix3x3& world2A,
72                                                const btMatrix3x3& world2B,
73                                               
74                                                const btVector3& invInertiaADiag,
75                                                const btScalar invMassA,
76                                                const btVector3& linvelA,const btVector3& angvelA,
77                                                const btVector3& rel_posA1,
78                                                const btVector3& invInertiaBDiag,
79                                                const btScalar invMassB,
80                                                const btVector3& linvelB,const btVector3& angvelB,
81                                                const btVector3& rel_posA2,
82
83                                          btScalar depthA, const btVector3& normalA, 
84                                          const btVector3& rel_posB1,const btVector3& rel_posB2,
85                                          btScalar depthB, const btVector3& normalB, 
86                                          btScalar& imp0,btScalar& imp1);
87
88/*
89        void resolveAngularConstraint(  const btMatrix3x3& invInertiaAWS,
90                                                const btScalar invMassA,
91                                                const btVector3& linvelA,const btVector3& angvelA,
92                                                const btVector3& rel_posA1,
93                                                const btMatrix3x3& invInertiaBWS,
94                                                const btScalar invMassB,
95                                                const btVector3& linvelB,const btVector3& angvelB,
96                                                const btVector3& rel_posA2,
97
98                                          btScalar depthA, const btVector3& normalA,
99                                          const btVector3& rel_posB1,const btVector3& rel_posB2,
100                                          btScalar depthB, const btVector3& normalB,
101                                          btScalar& imp0,btScalar& imp1);
102
103*/
104
105};
106
107#endif //BT_SOLVE_2LINEAR_CONSTRAINT_H
Note: See TracBrowser for help on using the repository browser.