Upgrade Bullet to version 2.83.
[blender.git] / extern / bullet2 / src / BulletDynamics / ConstraintSolver / btSequentialImpulseConstraintSolver.h
index 47dbbe3393daad06cf531fc182cff2c62d0e8c12..a602918098377ac052dafee828c47a377fd1c34e 100644 (file)
@@ -27,6 +27,8 @@ class btCollisionObject;
 #include "BulletCollision/NarrowPhaseCollision/btManifoldPoint.h"
 #include "BulletDynamics/ConstraintSolver/btConstraintSolver.h"
 
+typedef btSimdScalar(*btSingleConstraintRowSolver)(btSolverBody&, btSolverBody&, const btSolverConstraint&);
+
 ///The btSequentialImpulseConstraintSolver is a fast SIMD implementation of the Projected Gauss Seidel (iterative LCP) method.
 ATTRIBUTE_ALIGNED16(class) btSequentialImpulseConstraintSolver : public btConstraintSolver
 {
@@ -43,6 +45,10 @@ protected:
        btAlignedObjectArray<btTypedConstraint::btConstraintInfo1> m_tmpConstraintSizesPool;
        int                                                     m_maxOverrideNumSolverIterations;
        int m_fixedBodyId;
+
+       btSingleConstraintRowSolver m_resolveSingleConstraintRowGeneric;
+       btSingleConstraintRowSolver m_resolveSingleConstraintRowLowerLimit;
+
        void setupFrictionConstraint(   btSolverConstraint& solverConstraint, const btVector3& normalAxis,int solverBodyIdA,int  solverBodyIdB,
                                                                        btManifoldPoint& cp,const btVector3& rel_pos1,const btVector3& rel_pos2,
                                                                        btCollisionObject* colObj0,btCollisionObject* colObj1, btScalar relaxation, 
@@ -112,9 +118,7 @@ public:
        virtual ~btSequentialImpulseConstraintSolver();
 
        virtual btScalar solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& info, btIDebugDraw* debugDrawer,btDispatcher* dispatcher);
-       
-
-       
+               
        ///clear internal cached data and reset random seed
        virtual void    reset();
        
@@ -136,6 +140,33 @@ public:
        {
                return BT_SEQUENTIAL_IMPULSE_SOLVER;
        }
+
+       btSingleConstraintRowSolver     getActiveConstraintRowSolverGeneric()
+       {
+               return m_resolveSingleConstraintRowGeneric;
+       }
+       void setConstraintRowSolverGeneric(btSingleConstraintRowSolver rowSolver)
+       {
+               m_resolveSingleConstraintRowGeneric = rowSolver;
+       }
+       btSingleConstraintRowSolver     getActiveConstraintRowSolverLowerLimit()
+       {
+               return m_resolveSingleConstraintRowLowerLimit;
+       }
+       void setConstraintRowSolverLowerLimit(btSingleConstraintRowSolver rowSolver)
+       {
+               m_resolveSingleConstraintRowLowerLimit = rowSolver;
+       }
+
+       ///Various implementations of solving a single constraint row using a generic equality constraint, using scalar reference, SSE2 or SSE4
+       btSingleConstraintRowSolver     getScalarConstraintRowSolverGeneric();
+       btSingleConstraintRowSolver     getSSE2ConstraintRowSolverGeneric();
+       btSingleConstraintRowSolver     getSSE4_1ConstraintRowSolverGeneric();
+
+       ///Various implementations of solving a single constraint row using an inequality (lower limit) constraint, using scalar reference, SSE2 or SSE4
+       btSingleConstraintRowSolver     getScalarConstraintRowSolverLowerLimit();
+       btSingleConstraintRowSolver     getSSE2ConstraintRowSolverLowerLimit();
+       btSingleConstraintRowSolver     getSSE4_1ConstraintRowSolverLowerLimit();
 };