Refactor of PhysicsClient/PhysicsServer, to separate from the example browser code.

(as usual, work-in-progress)
This commit is contained in:
erwin coumans
2015-07-14 15:30:17 -07:00
parent 2e0da2b7a1
commit 54a76f6e0c
16 changed files with 747 additions and 470 deletions

View File

@@ -1,6 +1,35 @@
#ifndef PHYSICS_CLIENT_H
#define PHYSICS_CLIENT_H
#ifndef BT_PHYSICS_CLIENT_API_H
#define BT_PHYSICS_CLIENT_API_H
class CommonExampleInterface* PhysicsClientCreateFunc(struct CommonExampleOptions& options);
#include "SharedMemoryCommands.h"
#endif
class PhysicsClientSharedMemory //: public CommonPhysicsClientInterface
{
struct PhysicsClientSharedMemoryInternalData* m_data;
protected:
public:
PhysicsClientSharedMemory();
virtual ~PhysicsClientSharedMemory();
//todo: implement 'allocateSharedMemory' from client side in 'connect' call
virtual bool connect(bool allowSharedMemoryInitialization = true);
virtual bool isConnected() const;
virtual void processServerStatus();
virtual bool getLastServerStatus(ServerStatus& status)
{
return false;
}
virtual bool canSubmitCommand() const;
virtual bool submitClientCommand(const SharedMemoryCommand& command);
};
#endif //BT_PHYSICS_CLIENT_API_H