First draft of btMultiBody serialization, including optional names for base, link and joints (see ImportURDFDemo/ImportURDFSetup.cpp how this is done)

Bump up version number to 2.84 because of new serialization data.
This commit is contained in:
erwincoumans
2015-07-09 17:36:00 -07:00
parent 285ac286fa
commit f6f76901fd
20 changed files with 1435 additions and 517 deletions

View File

@@ -5,6 +5,7 @@
#include "BulletDynamics/Featherstone/btMultiBodyJointFeedback.h"
#include "../CommonInterfaces/CommonMultiBodyBase.h"
#include "../Utils/b3ResourcePath.h"
static btScalar radius(0.2);
@@ -366,6 +367,16 @@ void TestJointTorqueSetup::initPhysics()
}
}
btSerializer* s = new btDefaultSerializer;
m_dynamicsWorld->serialize(s);
b3ResourcePath p;
char resourcePath[1024];
if (p.findResourcePath("multibody.bullet",resourcePath,1024))
{
FILE* f = fopen(resourcePath,"wb");
fwrite(s->getBufferPointer(),s->getCurrentBufferSize(),1,f);
fclose(f);
}
}
void TestJointTorqueSetup::stepSimulation(float deltaTime)