Bullet Collision Detection & Physics Library
Classes | Macros | Functions | Variables
btParallelConstraintSolver.cpp File Reference
#include "btParallelConstraintSolver.h"
#include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h"
#include "BulletCollision/BroadphaseCollision/btDispatcher.h"
#include "LinearMath/btPoolAllocator.h"
#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
#include "BulletMultiThreaded/vectormath2bullet.h"
#include "LinearMath/btQuickprof.h"
#include "BulletMultiThreaded/btThreadSupportInterface.h"
#include "vectormath/vmInclude.h"
#include "HeapManager.h"
#include "PlatformDefinitions.h"
#include "LinearMath/btScalar.h"
#include "TrbStateVec.h"
Include dependency graph for btParallelConstraintSolver.cpp:

Go to the source code of this file.

Classes

struct  btParallelSolverMemoryCache
 

Macros

#define TMP_BUFF_BYTES   (15*1024*1024)
 
#define PFX_CONTACT_SLOP   0.001f
 

Functions

void resolveSingleConstraintRowGeneric (PfxSolverBody &body1, PfxSolverBody &body2, const btSolverConstraint &c)
 
static void pfxSolveLinearConstraintRow (btConstraintRow &constraint, vmVector3 &deltaLinearVelocityA, vmVector3 &deltaAngularVelocityA, float massInvA, const vmMatrix3 &inertiaInvA, const vmVector3 &rA, vmVector3 &deltaLinearVelocityB, vmVector3 &deltaAngularVelocityB, float massInvB, const vmMatrix3 &inertiaInvB, const vmVector3 &rB)
 
void btSolveContactConstraint (btConstraintRow &constraintResponse, btConstraintRow &constraintFriction1, btConstraintRow &constraintFriction2, const vmVector3 &contactPointA, const vmVector3 &contactPointB, PfxSolverBody &solverBodyA, PfxSolverBody &solverBodyB, float friction)
 
void CustomSolveConstraintsTaskParallel (const PfxParallelGroup *contactParallelGroup, const PfxParallelBatch *contactParallelBatches, PfxConstraintPair *contactPairs, uint32_t numContactPairs, btPersistentManifold *offsetContactManifolds, btConstraintRow *offsetContactConstraintRows, const PfxParallelGroup *jointParallelGroup, const PfxParallelBatch *jointParallelBatches, PfxConstraintPair *jointPairs, uint32_t numJointPairs, btSolverConstraint *offsetSolverConstraints, TrbState *offsetRigStates, PfxSolverBody *offsetSolverBodies, uint32_t numRigidBodies, int iteration, unsigned int taskId, unsigned int numTasks, btBarrier *barrier)
 
void CustomPostSolverTask (TrbState *states, PfxSolverBody *solverBodies, uint32_t numRigidBodies)
 
void * SolverlsMemoryFunc ()
 
static void pfxGetPlaneSpace (const vmVector3 &n, vmVector3 &p, vmVector3 &q)
 
void btSetupContactConstraint (btConstraintRow &constraintResponse, btConstraintRow &constraintFriction1, btConstraintRow &constraintFriction2, float penetrationDepth, float restitution, float friction, const vmVector3 &contactNormal, const vmVector3 &contactPointA, const vmVector3 &contactPointB, const TrbState &stateA, const TrbState &stateB, PfxSolverBody &solverBodyA, PfxSolverBody &solverBodyB, const vmVector3 &linVelA, const vmVector3 &angVelA, const vmVector3 &linVelB, const vmVector3 &angVelB, float separateBias, float timeStep)
 
void CustomSetupContactConstraintsTask (PfxConstraintPair *contactPairs, uint32_t numContactPairs, btPersistentManifold *offsetContactManifolds, btConstraintRow *offsetContactConstraintRows, TrbState *offsetRigStates, PfxSolverBody *offsetSolverBodies, uint32_t numRigidBodies, float separateBias, float timeStep)
 
void CustomWritebackContactConstraintsTask (PfxConstraintPair *contactPairs, uint32_t numContactPairs, btPersistentManifold *offsetContactManifolds, btConstraintRow *offsetContactConstraintRows, TrbState *offsetRigStates, PfxSolverBody *offsetSolverBodies, uint32_t numRigidBodies, float separateBias, float timeStep)
 
void SolverThreadFunc (void *userPtr, void *lsMemory)
 
void CustomSetupContactConstraintsNew (PfxConstraintPair *contactPairs1, uint32_t numContactPairs, btPersistentManifold *offsetContactManifolds, btConstraintRow *offsetContactConstraintRows, TrbState *offsetRigStates, PfxSolverBody *offsetSolverBodies, uint32_t numRigidBodies, float separationBias, float timeStep, class btThreadSupportInterface *threadSupport, btCriticalSection *criticalSection, btConstraintSolverIO *io, uint8_t cmd)
 
void CustomSplitConstraints (PfxConstraintPair *pairs, uint32_t numPairs, PfxParallelGroup &group, PfxParallelBatch *batches, uint32_t numTasks, uint32_t numRigidBodies, void *poolBuff, uint32_t poolBytes)
 
void CustomSolveConstraintsParallel (PfxConstraintPair *contactPairs, uint32_t numContactPairs, PfxConstraintPair *jointPairs, uint32_t numJointPairs, btPersistentManifold *offsetContactManifolds, btConstraintRow *offsetContactConstraintRows, btSolverConstraint *offsetSolverConstraints, TrbState *offsetRigStates, PfxSolverBody *offsetSolverBodies, uint32_t numRigidBodies, struct btConstraintSolverIO *io, class btThreadSupportInterface *threadSupport, int iteration, void *poolBuf, int poolBytes, class btBarrier *barrier)
 
void BPE_customConstraintSolverSequentialNew (unsigned int new_num, PfxBroadphasePair *new_pairs1, btPersistentManifold *offsetContactManifolds, PfxConstraintRow *offsetContactConstraintRows, TrbState *states, int numRigidBodies, struct PfxSolverBody *solverBodies, PfxConstraintPair *jointPairs, unsigned int numJoints, btSolverConstraint *offsetSolverConstraints, float separateBias, float timeStep, int iteration, btThreadSupportInterface *solverThreadSupport, btCriticalSection *criticalSection, struct btConstraintSolverIO *solverIO, btBarrier *barrier)
 
btConstraintSolverIOcreateSolverIO (int numThreads)
 

Variables

unsigned char tmp_buff [(15 *1024 *1024)]
 

Macro Definition Documentation

#define PFX_CONTACT_SLOP   0.001f

Definition at line 330 of file btParallelConstraintSolver.cpp.

#define TMP_BUFF_BYTES   (15*1024*1024)

Definition at line 47 of file btParallelConstraintSolver.cpp.

Function Documentation

void BPE_customConstraintSolverSequentialNew ( unsigned int  new_num,
PfxBroadphasePair new_pairs1,
btPersistentManifold offsetContactManifolds,
PfxConstraintRow offsetContactConstraintRows,
TrbState states,
int  numRigidBodies,
struct PfxSolverBody solverBodies,
PfxConstraintPair jointPairs,
unsigned int  numJoints,
btSolverConstraint offsetSolverConstraints,
float  separateBias,
float  timeStep,
int  iteration,
btThreadSupportInterface solverThreadSupport,
btCriticalSection criticalSection,
struct btConstraintSolverIO solverIO,
btBarrier barrier 
)

Definition at line 1001 of file btParallelConstraintSolver.cpp.

void btSetupContactConstraint ( btConstraintRow constraintResponse,
btConstraintRow constraintFriction1,
btConstraintRow constraintFriction2,
float  penetrationDepth,
float  restitution,
float  friction,
const vmVector3 contactNormal,
const vmVector3 contactPointA,
const vmVector3 contactPointB,
const TrbState stateA,
const TrbState stateB,
PfxSolverBody solverBodyA,
PfxSolverBody solverBodyB,
const vmVector3 linVelA,
const vmVector3 angVelA,
const vmVector3 linVelB,
const vmVector3 angVelB,
float  separateBias,
float  timeStep 
)

Definition at line 332 of file btParallelConstraintSolver.cpp.

void btSolveContactConstraint ( btConstraintRow constraintResponse,
btConstraintRow constraintFriction1,
btConstraintRow constraintFriction2,
const vmVector3 contactPointA,
const vmVector3 contactPointB,
PfxSolverBody solverBodyA,
PfxSolverBody solverBodyB,
float  friction 
)

Definition at line 124 of file btParallelConstraintSolver.cpp.

btConstraintSolverIO* createSolverIO ( int  numThreads)

Definition at line 1139 of file btParallelConstraintSolver.cpp.

void CustomPostSolverTask ( TrbState states,
PfxSolverBody solverBodies,
uint32_t  numRigidBodies 
)

Definition at line 279 of file btParallelConstraintSolver.cpp.

void CustomSetupContactConstraintsNew ( PfxConstraintPair contactPairs1,
uint32_t  numContactPairs,
btPersistentManifold offsetContactManifolds,
btConstraintRow offsetContactConstraintRows,
TrbState offsetRigStates,
PfxSolverBody offsetSolverBodies,
uint32_t  numRigidBodies,
float  separationBias,
float  timeStep,
class btThreadSupportInterface threadSupport,
btCriticalSection criticalSection,
btConstraintSolverIO io,
uint8_t  cmd 
)

Definition at line 680 of file btParallelConstraintSolver.cpp.

void CustomSetupContactConstraintsTask ( PfxConstraintPair contactPairs,
uint32_t  numContactPairs,
btPersistentManifold offsetContactManifolds,
btConstraintRow offsetContactConstraintRows,
TrbState offsetRigStates,
PfxSolverBody offsetSolverBodies,
uint32_t  numRigidBodies,
float  separateBias,
float  timeStep 
)

Definition at line 424 of file btParallelConstraintSolver.cpp.

void CustomSolveConstraintsParallel ( PfxConstraintPair contactPairs,
uint32_t  numContactPairs,
PfxConstraintPair jointPairs,
uint32_t  numJointPairs,
btPersistentManifold offsetContactManifolds,
btConstraintRow offsetContactConstraintRows,
btSolverConstraint offsetSolverConstraints,
TrbState offsetRigStates,
PfxSolverBody offsetSolverBodies,
uint32_t  numRigidBodies,
struct btConstraintSolverIO io,
class btThreadSupportInterface threadSupport,
int  iteration,
void *  poolBuf,
int  poolBytes,
class btBarrier barrier 
)

Definition at line 860 of file btParallelConstraintSolver.cpp.

void CustomSolveConstraintsTaskParallel ( const PfxParallelGroup contactParallelGroup,
const PfxParallelBatch contactParallelBatches,
PfxConstraintPair contactPairs,
uint32_t  numContactPairs,
btPersistentManifold offsetContactManifolds,
btConstraintRow offsetContactConstraintRows,
const PfxParallelGroup jointParallelGroup,
const PfxParallelBatch jointParallelBatches,
PfxConstraintPair jointPairs,
uint32_t  numJointPairs,
btSolverConstraint offsetSolverConstraints,
TrbState offsetRigStates,
PfxSolverBody offsetSolverBodies,
uint32_t  numRigidBodies,
int  iteration,
unsigned int  taskId,
unsigned int  numTasks,
btBarrier barrier 
)

Definition at line 158 of file btParallelConstraintSolver.cpp.

void CustomSplitConstraints ( PfxConstraintPair pairs,
uint32_t  numPairs,
PfxParallelGroup group,
PfxParallelBatch batches,
uint32_t  numTasks,
uint32_t  numRigidBodies,
void *  poolBuff,
uint32_t  poolBytes 
)

Definition at line 752 of file btParallelConstraintSolver.cpp.

void CustomWritebackContactConstraintsTask ( PfxConstraintPair contactPairs,
uint32_t  numContactPairs,
btPersistentManifold offsetContactManifolds,
btConstraintRow offsetContactConstraintRows,
TrbState offsetRigStates,
PfxSolverBody offsetSolverBodies,
uint32_t  numRigidBodies,
float  separateBias,
float  timeStep 
)

Definition at line 519 of file btParallelConstraintSolver.cpp.

static void pfxGetPlaneSpace ( const vmVector3 n,
vmVector3 p,
vmVector3 q 
)
inlinestatic

Definition at line 300 of file btParallelConstraintSolver.cpp.

static void pfxSolveLinearConstraintRow ( btConstraintRow constraint,
vmVector3 deltaLinearVelocityA,
vmVector3 deltaAngularVelocityA,
float  massInvA,
const vmMatrix3 inertiaInvA,
const vmVector3 rA,
vmVector3 deltaLinearVelocityB,
vmVector3 deltaAngularVelocityB,
float  massInvB,
const vmMatrix3 inertiaInvB,
const vmVector3 rB 
)
inlinestatic

Definition at line 103 of file btParallelConstraintSolver.cpp.

void resolveSingleConstraintRowGeneric ( PfxSolverBody body1,
PfxSolverBody body2,
const btSolverConstraint c 
)
inline

Definition at line 53 of file btParallelConstraintSolver.cpp.

void* SolverlsMemoryFunc ( )

Definition at line 292 of file btParallelConstraintSolver.cpp.

void SolverThreadFunc ( void *  userPtr,
void *  lsMemory 
)

Definition at line 548 of file btParallelConstraintSolver.cpp.

Variable Documentation

unsigned char tmp_buff[(15 *1024 *1024)]

Definition at line 48 of file btParallelConstraintSolver.cpp.