Bullet Collision Detection & Physics Library
btMLCPSolver.h
Go to the documentation of this file.
1/*
2Bullet Continuous Collision Detection and Physics Library
3Copyright (c) 2003-2013 Erwin Coumans http://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*/
16
17#ifndef BT_MLCP_SOLVER_H
18#define BT_MLCP_SOLVER_H
19
23
25{
26protected:
32
38
43
54
57
58 virtual void createMLCP(const btContactSolverInfo& infoGlobal);
60
61 //return true is it solves the problem successfully
62 virtual bool solveMLCP(const btContactSolverInfo& infoGlobal);
63
64public:
66 virtual ~btMLCPSolver();
67
69 {
70 m_solver = solver;
71 }
72
73 int getNumFallbacks() const
74 {
75 return m_fallback;
76 }
78 {
80 }
81
83 {
84 return BT_MLCP_SOLVER;
85 }
86};
87
88#endif //BT_MLCP_SOLVER_H
btConstraintSolverType
btConstraintSolver provides solver interface
@ BT_MLCP_SOLVER
#define btMatrixXu
Definition btMatrixX.h:529
#define btVectorXu
Definition btMatrixX.h:528
const T & btMax(const T &a, const T &b)
Definition btMinMax.h:27
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition btScalar.h:314
The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods It...
btCollisionObject can be used to manage collision detection objects.
The btIDebugDraw interface class allows hooking up a debug renderer to visually debug simulations.
original version written by Erwin Coumans, October 2013
original version written by Erwin Coumans, October 2013
btMatrixXu m_scratchTmp
btVectorXu m_b
btVectorXu m_bSplit1
btMatrixXu m_scratchJTranspose
virtual ~btMLCPSolver()
btMatrixXu m_scratchMInv
btAlignedObjectArray< int > m_limitDependencies
btMatrixXu m_scratchJ
btVectorXu m_x
virtual void createMLCP(const btContactSolverInfo &infoGlobal)
btMatrixXu m_scratchJ3
The following scratch variables are not stateful – contents are cleared prior to each use.
btVectorXu m_xSplit
virtual bool solveMLCP(const btContactSolverInfo &infoGlobal)
btVectorXu m_bSplit
when using 'split impulse' we solve two separate (M)LCPs
virtual btScalar solveGroupCacheFriendlySetup(btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer)
btVectorXu m_hi
btMatrixXu m_A
btAlignedObjectArray< int > m_scratchOfs
btMatrixXu m_scratchJInvM3
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)
int getNumFallbacks() const
btAlignedObjectArray< btSolverConstraint * > m_allConstraintPtrArray
btMLCPSolverInterface * m_solver
void setNumFallbacks(int num)
btVectorXu m_xSplit2
btVectorXu m_lo
virtual btConstraintSolverType getSolverType() const
void setMLCPSolver(btMLCPSolverInterface *solver)
btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping...
The btSequentialImpulseConstraintSolver is a fast SIMD implementation of the Projected Gauss Seidel (...
TypedConstraint is the baseclass for Bullet constraints and vehicles.