add rudimentary command logging for shared memory physics server

This commit is contained in:
erwin coumans
2015-10-30 10:30:48 -07:00
parent 819c4f1951
commit c68c215ead
8 changed files with 146 additions and 4 deletions

View File

@@ -33,6 +33,13 @@ public:
{
m_physicsServer.enableCommandLogging(true,"BulletPhysicsCommandLog.bin");
}
void replayFromLogFile()
{
m_physicsServer.replayFromLogFile("BulletPhysicsCommandLog.bin");
}
virtual void resetCamera()
{
@@ -273,6 +280,10 @@ class CommonExampleInterface* PhysicsServerCreateFunc(struct CommonExampleOpt
{
example->enableCommandLogging();
}
if (options.m_option & PHYSICS_SERVER_REPLAY_FROM_COMMAND_LOG)
{
example->replayFromLogFile();
}
return example;
}