Constraints can override their own number of solver iterations (either more or less than the default) or leave it default (-1)

Bump version to 2.80
This commit is contained in:
erwin.coumans
2012-03-03 03:07:18 +00:00
parent a5aa2a5ff7
commit 710954d772
16 changed files with 799 additions and 649 deletions

View File

@@ -145,6 +145,10 @@ namespace bParse {
void dumpChunks(bDNA* dna);
int getVersion() const
{
return mVersion;
}
};

View File

@@ -1164,6 +1164,14 @@ bool btBulletWorldImporter::convertAllObjects( bParse::btBulletFile* bulletFile
if (constraint)
{
constraint->setDbgDrawSize(constraintData->m_dbgDrawSize);
///those fields didn't exist and set to zero for pre-280 versions, so do a check here
if (bulletFile2->getVersion()>=280)
{
constraint->setBreakingImpulseThreshold(constraintData->m_breakingImpulseThreshold);
constraint->setEnabled(constraintData->m_isEnabled);
constraint->setOverrideNumSolverIterations(constraintData->m_overrideNumSolverIterations);
}
if (constraintData->m_name)
{
char* newname = duplicateName(constraintData->m_name);