Bullet Collision Detection & Physics Library
btSolve2LinearConstraint.h
Go to the documentation of this file.
1 /*
2 Bullet Continuous Collision Detection and Physics Library
3 Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
4 
5 This software is provided 'as-is', without any express or implied warranty.
6 In no event will the authors be held liable for any damages arising from the use of this software.
7 Permission is granted to anyone to use this software for any purpose,
8 including commercial applications, and to alter it and redistribute it freely,
9 subject to the following restrictions:
10 
11 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.
12 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
13 3. 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 
23 class btRigidBody;
24 
25 
26 
29 {
32 
33 public:
34 
36  {
37  m_tau = tau;
38  m_damping = damping;
39  }
40  //
41  // solve unilateral constraint (equality, direct method)
42  //
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  //
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
btSolve2LinearConstraint(btScalar tau, btScalar damping)
The btRigidBody is the main class for rigid body objects.
Definition: btRigidBody.h:59
btVector3 can be used to represent 3D points and vectors.
Definition: btVector3.h:83
constraint class used for lateral tyre friction.
void resolveUnilateralPairConstraint(btRigidBody *body0, btRigidBody *body1, const btMatrix3x3 &world2A, const btMatrix3x3 &world2B, const btVector3 &invInertiaADiag, const btScalar invMassA, const btVector3 &linvelA, const btVector3 &angvelA, const btVector3 &rel_posA1, const btVector3 &invInertiaBDiag, const btScalar invMassB, const btVector3 &linvelB, const btVector3 &angvelB, const btVector3 &rel_posA2, btScalar depthA, const btVector3 &normalA, const btVector3 &rel_posB1, const btVector3 &rel_posB2, btScalar depthB, const btVector3 &normalB, btScalar &imp0, btScalar &imp1)
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
Definition: btMatrix3x3.h:48
void resolveBilateralPairConstraint(btRigidBody *body0, btRigidBody *body1, const btMatrix3x3 &world2A, const btMatrix3x3 &world2B, const btVector3 &invInertiaADiag, const btScalar invMassA, const btVector3 &linvelA, const btVector3 &angvelA, const btVector3 &rel_posA1, const btVector3 &invInertiaBDiag, const btScalar invMassB, const btVector3 &linvelB, const btVector3 &angvelB, const btVector3 &rel_posA2, btScalar depthA, const btVector3 &normalA, const btVector3 &rel_posB1, const btVector3 &rel_posB2, btScalar depthB, const btVector3 &normalB, btScalar &imp0, btScalar &imp1)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:266