Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/presentation/src/bullet/BulletDynamics/ConstraintSolver/btContactSolverInfo.h @ 2549

Last change on this file since 2549 was 2459, checked in by rgrieder, 16 years ago

Merged physics_merge back to presentation branch.

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