Added preparation for GPU hardware accelerated solvers for BulletSoftBody (OpenCL and DirectCompute backends will follow)
Added assert to check for positive masses in btCompoundShape::calculatePrincipalAxisTransform, see Issue 399 Fixes for LLVM/GCC compilation issue in btSequentialImpulseConstraintSolver (Untested) fix for Linux 64bit compilation Issue 409
This commit is contained in:
@@ -219,9 +219,13 @@ void btCompoundShape::calculatePrincipalAxisTransform(btScalar* masses, btTransf
|
||||
|
||||
for (k = 0; k < n; k++)
|
||||
{
|
||||
btAssert(masses[k]>0);
|
||||
center += m_children[k].m_transform.getOrigin() * masses[k];
|
||||
totalMass += masses[k];
|
||||
}
|
||||
|
||||
btAssert(totalMass>0);
|
||||
|
||||
center /= totalMass;
|
||||
principal.setOrigin(center);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user