2015-07-14 22:30:17 +00:00
|
|
|
#ifndef BT_PHYSICS_CLIENT_API_H
|
|
|
|
#define BT_PHYSICS_CLIENT_API_H
|
2015-05-28 23:05:24 +00:00
|
|
|
|
2015-07-14 22:30:17 +00:00
|
|
|
#include "SharedMemoryCommands.h"
|
2015-05-28 23:05:24 +00:00
|
|
|
|
2015-07-14 22:30:17 +00:00
|
|
|
|
|
|
|
class PhysicsClientSharedMemory //: public CommonPhysicsClientInterface
|
|
|
|
{
|
|
|
|
struct PhysicsClientSharedMemoryInternalData* m_data;
|
|
|
|
protected:
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
PhysicsClientSharedMemory();
|
|
|
|
virtual ~PhysicsClientSharedMemory();
|
|
|
|
|
2015-07-21 06:35:29 +00:00
|
|
|
//return true if connection succesfull, can also check 'isConnected'
|
2015-08-06 18:59:31 +00:00
|
|
|
virtual bool connect();
|
|
|
|
|
|
|
|
virtual void disconnectSharedMemory ();
|
2015-07-14 22:30:17 +00:00
|
|
|
|
|
|
|
virtual bool isConnected() const;
|
|
|
|
|
2015-07-21 06:35:29 +00:00
|
|
|
// return true if there is a status, and fill in 'serverStatus'
|
2015-07-23 18:51:25 +00:00
|
|
|
virtual bool processServerStatus(SharedMemoryStatus& serverStatus);
|
2015-07-14 22:30:17 +00:00
|
|
|
|
|
|
|
virtual bool canSubmitCommand() const;
|
|
|
|
|
|
|
|
virtual bool submitClientCommand(const SharedMemoryCommand& command);
|
|
|
|
|
2015-08-02 21:00:43 +00:00
|
|
|
virtual int getNumJoints() const;
|
2015-07-21 06:35:29 +00:00
|
|
|
|
2015-08-02 21:00:43 +00:00
|
|
|
virtual void getJointInfo(int index, b3JointInfo& info) const;
|
2015-07-21 06:35:29 +00:00
|
|
|
|
2015-08-07 07:13:26 +00:00
|
|
|
virtual void setSharedMemoryKey(int key);
|
2015-07-14 22:30:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //BT_PHYSICS_CLIENT_API_H
|