Bullet Collision Detection & Physics Library: btSolve2LinearConstraint.h Source File

Bullet Collision Detection & Physics Library

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

btSolve2LinearConstraint.h
Go to the documentation of this file.
1/*
2Bullet Continuous Collision Detection and Physics Library
3Copyright (c) 2003-2006 Erwin Coumans https://bulletphysics.org
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
22class btRigidBody;
23
25 class btSolve2LinearConstraint
26{
27 btScalar m_tau;
28 btScalar m_damping;
29
30public:
31 btSolve2LinearConstraint(btScalar tau, btScalar damping)
32 {
33 m_tau = tau;
34 m_damping = damping;
35 }
36 //
37 // solve unilateral constraint (equality, direct method)
38 //
39 void resolveUnilateralPairConstraint(
40 btRigidBody* body0,
41 btRigidBody* body1,
42
43 const btMatrix3x3& world2A,
44 const btMatrix3x3& world2B,
45
46 const btVector3& invInertiaADiag,
47 const btScalar invMassA,
48 const btVector3& linvelA, const btVector3& angvelA,
49 const btVector3& rel_posA1,
50 const btVector3& invInertiaBDiag,
51 const btScalar invMassB,
52 const btVector3& linvelB, const btVector3& angvelB,
53 const btVector3& rel_posA2,
54
55 btScalar depthA, const btVector3& normalA,
56 const btVector3& rel_posB1, const btVector3& rel_posB2,
57 btScalar depthB, const btVector3& normalB,
58 btScalar& imp0, btScalar& imp1);
59
60 //
61 // solving 2x2 lcp problem (inequality, direct solution )
62 //
63 void resolveBilateralPairConstraint(
64 btRigidBody* body0,
65 btRigidBody* body1,
66 const btMatrix3x3& world2A,
67 const btMatrix3x3& world2B,
68
69 const btVector3& invInertiaADiag,
70 const btScalar invMassA,
71 const btVector3& linvelA, const btVector3& angvelA,
72 const btVector3& rel_posA1,
73 const btVector3& invInertiaBDiag,
74 const btScalar invMassB,
75 const btVector3& linvelB, const btVector3& angvelB,
76 const btVector3& rel_posA2,
77
78 btScalar depthA, const btVector3& normalA,
79 const btVector3& rel_posB1, const btVector3& rel_posB2,
80 btScalar depthB, const btVector3& normalB,
81 btScalar& imp0, btScalar& imp1);
82
83 /*
84 void resolveAngularConstraint( const btMatrix3x3& invInertiaAWS,
85 const btScalar invMassA,
86 const btVector3& linvelA,const btVector3& angvelA,
87 const btVector3& rel_posA1,
88 const btMatrix3x3& invInertiaBWS,
89 const btScalar invMassB,
90 const btVector3& linvelB,const btVector3& angvelB,
91 const btVector3& rel_posA2,
92
93 btScalar depthA, const btVector3& normalA,
94 const btVector3& rel_posB1,const btVector3& rel_posB2,
95 btScalar depthB, const btVector3& normalB,
96 btScalar& imp0,btScalar& imp1);
97
98*/
99};
100
101#endif //BT_SOLVE_2LINEAR_CONSTRAINT_H
btMatrix3x3.h
btScalar
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition btScalar.h:314
btVector3.h
btMatrix3x3
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
Definition btMatrix3x3.h:50
btRigidBody
The btRigidBody is the main class for rigid body objects.
Definition btRigidBody.h:60
btSolve2LinearConstraint
constraint class used for lateral tyre friction.
Definition btSolve2LinearConstraint.h:26
btSolve2LinearConstraint::resolveBilateralPairConstraint
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)
Definition btSolve2LinearConstraint.cpp:102
btSolve2LinearConstraint::btSolve2LinearConstraint
btSolve2LinearConstraint(btScalar tau, btScalar damping)
Definition btSolve2LinearConstraint.h:31
btSolve2LinearConstraint::m_tau
btScalar m_tau
Definition btSolve2LinearConstraint.h:27
btSolve2LinearConstraint::m_damping
btScalar m_damping
Definition btSolve2LinearConstraint.h:28
btSolve2LinearConstraint::resolveUnilateralPairConstraint
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)
Definition btSolve2LinearConstraint.cpp:22
btVector3
btVector3 can be used to represent 3D points and vectors.
Definition btVector3.h:82