Blender  V3.3
btNNCGConstraintSolver.h
Go to the documentation of this file.
1 /*
2 Bullet Continuous Collision Detection and Physics Library
3 Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
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 */
15 
16 #ifndef BT_NNCG_CONSTRAINT_SOLVER_H
17 #define BT_NNCG_CONSTRAINT_SOLVER_H
18 
20 
23 {
24 protected:
25  btScalar m_deltafLengthSqrPrev;
26 
27  btAlignedObjectArray<btScalar> m_pNC; // p for None Contact constraints
28  btAlignedObjectArray<btScalar> m_pC; // p for Contact constraints
29  btAlignedObjectArray<btScalar> m_pCF; // p for ContactFriction constraints
30  btAlignedObjectArray<btScalar> m_pCRF; // p for ContactRollingFriction constraints
31 
32  //These are recalculated in every iterations. We just keep these to prevent reallocation in each iteration.
33  btAlignedObjectArray<btScalar> m_deltafNC; // deltaf for NoneContact constraints
34  btAlignedObjectArray<btScalar> m_deltafC; // deltaf for Contact constraints
35  btAlignedObjectArray<btScalar> m_deltafCF; // deltaf for ContactFriction constraints
36  btAlignedObjectArray<btScalar> m_deltafCRF; // deltaf for ContactRollingFriction constraints
37 
38 protected:
41 
43 
44 public:
46 
48 
50  {
51  return BT_NNCG_SOLVER;
52  }
53 
55 };
56 
57 #endif //BT_NNCG_CONSTRAINT_SOLVER_H
btCollisionObject
btConstraintSolverType
btConstraintSolver provides solver interface
@ BT_NNCG_SOLVER
bool m_onlyForNoneContact
BT_DECLARE_ALIGNED_ALLOCATOR()
btAlignedObjectArray< btScalar > m_deltafNC
btAlignedObjectArray< btScalar > m_pCRF
btAlignedObjectArray< btScalar > m_deltafC
btAlignedObjectArray< btScalar > m_deltafCRF
virtual btScalar solveGroupCacheFriendlySetup(btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer)
btNNCGConstraintSolver()
virtual btConstraintSolverType getSolverType() const
virtual btScalar solveGroupCacheFriendlyFinish(btCollisionObject **bodies, int numBodies, const btContactSolverInfo &infoGlobal)
btAlignedObjectArray< btScalar > m_deltafCF
btAlignedObjectArray< btScalar > m_pC
btAlignedObjectArray< btScalar > m_pNC
virtual btScalar solveSingleIteration(int iteration, btCollisionObject **bodies, int numBodies, btPersistentManifold **manifoldPtr, int numManifolds, btTypedConstraint **constraints, int numConstraints, const btContactSolverInfo &infoGlobal, btIDebugDraw *debugDrawer)
btAlignedObjectArray< btScalar > m_pCF
btPersistentManifold()
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Definition: btScalar.h:314
#define ATTRIBUTE_ALIGNED16(a)
Definition: btScalar.h:285
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)