Synchronize changes from branches/GpuClothAMD to trunk
Main improvements are: GPU cloth collision detection against a capsule shape ,OpenCL-OpenGL interoperability (keeping data buffers on GPU), and bug fixes Thanks to Lee Howes
This commit is contained in:
@@ -82,14 +82,15 @@ void btSoftRigidDynamicsWorld::predictUnconstraintMotion(btScalar timeStep)
|
||||
|
||||
void btSoftRigidDynamicsWorld::internalSingleStepSimulation( btScalar timeStep )
|
||||
{
|
||||
|
||||
// Let the solver grab the soft bodies and if necessary optimize for it
|
||||
m_softBodySolver->optimize( getSoftBodyArray() );
|
||||
|
||||
if( !m_softBodySolver->checkInitialized() )
|
||||
{
|
||||
btAssert( "Solver initialization failed\n" );
|
||||
}
|
||||
|
||||
// Let the solver grab the soft bodies and if necessary optimize for it
|
||||
m_softBodySolver->optimize( getSoftBodyArray() );
|
||||
|
||||
btDiscreteDynamicsWorld::internalSingleStepSimulation( timeStep );
|
||||
|
||||
///solve soft bodies constraints
|
||||
@@ -128,6 +129,10 @@ void btSoftRigidDynamicsWorld::addSoftBody(btSoftBody* body,short int collisionF
|
||||
{
|
||||
m_softBodies.push_back(body);
|
||||
|
||||
// Set the soft body solver that will deal with this body
|
||||
// to be the world's solver
|
||||
body->setSoftBodySolver( m_softBodySolver );
|
||||
|
||||
btCollisionWorld::addCollisionObject(body,
|
||||
collisionFilterGroup,
|
||||
collisionFilterMask);
|
||||
|
||||
Reference in New Issue
Block a user