Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/physics/src/bullet/BulletDynamics/ConstraintSolver/btContactSolverInfo.h @ 2056

Last change on this file since 2056 was 1972, checked in by rgrieder, 16 years ago

Downgraded Bullet to latest tagged version: 2.72
That should give us more stability.

  • Property svn:eol-style set to native
File size: 2.2 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 CONTACT_SOLVER_INFO
17#define CONTACT_SOLVER_INFO
18
19enum    btSolverMode
20{
21        SOLVER_RANDMIZE_ORDER = 1,
22        SOLVER_FRICTION_SEPARATE = 2,
23        SOLVER_USE_WARMSTARTING = 4,
24        SOLVER_CACHE_FRIENDLY = 8
25};
26
27struct btContactSolverInfoData
28{
29       
30
31        btScalar        m_tau;
32        btScalar        m_damping;
33        btScalar        m_friction;
34        btScalar        m_timeStep;
35        btScalar        m_restitution;
36        int             m_numIterations;
37        btScalar        m_maxErrorReduction;
38        btScalar        m_sor;
39        btScalar        m_erp;//used as Baumgarte factor
40        btScalar        m_erp2;//used in Split Impulse
41        int                     m_splitImpulse;
42        btScalar        m_splitImpulsePenetrationThreshold;
43        btScalar        m_linearSlop;
44        btScalar        m_warmstartingFactor;
45
46        int                     m_solverMode;
47
48
49};
50
51struct btContactSolverInfo : public btContactSolverInfoData
52{
53
54       
55
56        inline btContactSolverInfo()
57        {
58                m_tau = btScalar(0.6);
59                m_damping = btScalar(1.0);
60                m_friction = btScalar(0.3);
61                m_restitution = btScalar(0.);
62                m_maxErrorReduction = btScalar(20.);
63                m_numIterations = 10;
64                m_erp = btScalar(0.2);
65                m_erp2 = btScalar(0.1);
66                m_sor = btScalar(1.3);
67                m_splitImpulse = false;
68                m_splitImpulsePenetrationThreshold = -0.02f;
69                m_linearSlop = btScalar(0.0);
70                m_warmstartingFactor=btScalar(0.85);
71                m_solverMode = SOLVER_RANDMIZE_ORDER | SOLVER_CACHE_FRIENDLY | SOLVER_USE_WARMSTARTING;
72        }
73};
74
75#endif //CONTACT_SOLVER_INFO
Note: See TracBrowser for help on using the repository browser.