Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'extern/bullet/BulletDynamics/ConstraintSolver/OdeConstraintSolver.h')
-rw-r--r--extern/bullet/BulletDynamics/ConstraintSolver/OdeConstraintSolver.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/extern/bullet/BulletDynamics/ConstraintSolver/OdeConstraintSolver.h b/extern/bullet/BulletDynamics/ConstraintSolver/OdeConstraintSolver.h
index 354a444caa8..101f24867c5 100644
--- a/extern/bullet/BulletDynamics/ConstraintSolver/OdeConstraintSolver.h
+++ b/extern/bullet/BulletDynamics/ConstraintSolver/OdeConstraintSolver.h
@@ -25,6 +25,9 @@ private:
int m_CurBody;
int m_CurJoint;
+ float m_cfm;
+ float m_erp;
+
int ConvertBody(RigidBody* body,RigidBody** bodies,int& numBodies);
void ConvertConstraint(PersistentManifold* manifold,BU_Joint** joints,int& numJoints,
@@ -32,10 +35,24 @@ private:
public:
+ OdeConstraintSolver();
+
virtual ~OdeConstraintSolver() {}
virtual float SolveGroup(PersistentManifold** manifold,int numManifolds,const ContactSolverInfo& info,IDebugDraw* debugDrawer = 0);
+ ///setConstraintForceMixing, the cfm adds some positive value to the main diagonal
+ ///This can improve convergence (make matrix positive semidefinite), but it can make the simulation look more 'springy'
+ void setConstraintForceMixing(float cfm) {
+ m_cfm = cfm;
+ }
+
+ ///setErrorReductionParamter sets the maximum amount of error reduction
+ ///which limits energy addition during penetration depth recovery
+ void setErrorReductionParamter(float erp)
+ {
+ m_erp = erp;
+ }
};