Blender  V3.3
btMLCPSolver.h
Go to the documentation of this file.
1 /*
2 Bullet Continuous Collision Detection and Physics Library
3 Copyright (c) 2003-2013 Erwin Coumans http://bulletphysics.org
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 */
16 
17 #ifndef BT_MLCP_SOLVER_H
18 #define BT_MLCP_SOLVER_H
19 
21 #include "LinearMath/btMatrixX.h"
23 
25 {
26 protected:
32 
38 
43 
54 
57 
58  virtual void createMLCP(const btContactSolverInfo& infoGlobal);
59  virtual void createMLCPFast(const btContactSolverInfo& infoGlobal);
60 
61  //return true is it solves the problem successfully
62  virtual bool solveMLCP(const btContactSolverInfo& infoGlobal);
63 
64 public:
66  virtual ~btMLCPSolver();
67 
69  {
70  m_solver = solver;
71  }
72 
73  int getNumFallbacks() const
74  {
75  return m_fallback;
76  }
77  void setNumFallbacks(int num)
78  {
79  m_fallback = num;
80  }
81 
83  {
84  return BT_MLCP_SOLVER;
85  }
86 };
87 
88 #endif //BT_MLCP_SOLVER_H
btCollisionObject
btConstraintSolverType
btConstraintSolver provides solver interface
@ BT_MLCP_SOLVER
#define btMatrixXu
Definition: btMatrixX.h:529
#define btVectorXu
Definition: btMatrixX.h:528
btPersistentManifold()
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:314
btSequentialImpulseConstraintSolverMt int btPersistentManifold int btTypedConstraint ** constraints
btSequentialImpulseConstraintSolverMt int btPersistentManifold ** manifoldPtr
btSequentialImpulseConstraintSolverMt int btPersistentManifold int btTypedConstraint int numConstraints
btSequentialImpulseConstraintSolverMt int numBodies
btSequentialImpulseConstraintSolverMt int btPersistentManifold int btTypedConstraint int const btContactSolverInfo & infoGlobal
btSequentialImpulseConstraintSolverMt int btPersistentManifold int numManifolds
btTypedConstraint(btTypedConstraintType type, btRigidBody &rbA)
original version written by Erwin Coumans, October 2013
original version written by Erwin Coumans, October 2013
Definition: btMLCPSolver.h:25
btMatrixXu m_scratchTmp
Definition: btMLCPSolver.h:53
btVectorXu m_b
Definition: btMLCPSolver.h:28
btVectorXu m_bSplit1
Definition: btMLCPSolver.h:36
btMatrixXu m_scratchJTranspose
Definition: btMLCPSolver.h:52
virtual ~btMLCPSolver()
btMatrixXu m_scratchMInv
Definition: btMLCPSolver.h:50
btAlignedObjectArray< int > m_limitDependencies
Definition: btMLCPSolver.h:39
btMatrixXu m_scratchJ
Definition: btMLCPSolver.h:51
btVectorXu m_x
Definition: btMLCPSolver.h:29
virtual void createMLCP(const btContactSolverInfo &infoGlobal)
btMatrixXu m_scratchJ3
Definition: btMLCPSolver.h:47
btVectorXu m_xSplit
Definition: btMLCPSolver.h:35
virtual bool solveMLCP(const btContactSolverInfo &infoGlobal)
btVectorXu m_bSplit
when using 'split impulse' we solve two separate (M)LCPs
Definition: btMLCPSolver.h:34
virtual btScalar solveGroupCacheFriendlySetup(btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer)
btVectorXu m_hi
Definition: btMLCPSolver.h:31
btMatrixXu m_A
Definition: btMLCPSolver.h:27
btAlignedObjectArray< int > m_scratchOfs
Definition: btMLCPSolver.h:49
btMatrixXu m_scratchJInvM3
Definition: btMLCPSolver.h:48
virtual void createMLCPFast(const btContactSolverInfo &infoGlobal)
virtual btScalar solveGroupCacheFriendlyIterations(btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer)
btMLCPSolver(btMLCPSolverInterface *solver)
original version written by Erwin Coumans, October 2013
int getNumFallbacks() const
Definition: btMLCPSolver.h:73
btAlignedObjectArray< btSolverConstraint * > m_allConstraintPtrArray
Definition: btMLCPSolver.h:40
btMLCPSolverInterface * m_solver
Definition: btMLCPSolver.h:41
void setNumFallbacks(int num)
Definition: btMLCPSolver.h:77
btVectorXu m_xSplit2
Definition: btMLCPSolver.h:37
btVectorXu m_lo
Definition: btMLCPSolver.h:30
virtual btConstraintSolverType getSolverType() const
Definition: btMLCPSolver.h:82
void setMLCPSolver(btMLCPSolverInterface *solver)
Definition: btMLCPSolver.h:68