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-09-17 06:09:10 +00:00
|
|
|
//#include "SharedMemoryCommands.h"
|
2015-08-20 05:51:16 +00:00
|
|
|
#include "LinearMath/btVector3.h"
|
2015-05-28 23:05:24 +00:00
|
|
|
|
2015-08-20 05:51:16 +00:00
|
|
|
class PhysicsClientSharedMemory
|
2015-07-14 22:30:17 +00:00
|
|
|
{
|
|
|
|
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-09-25 05:42:22 +00:00
|
|
|
// return non-null if there is a status, nullptr otherwise
|
2015-09-17 06:09:10 +00:00
|
|
|
virtual const struct SharedMemoryStatus* processServerStatus();
|
2015-07-14 22:30:17 +00:00
|
|
|
|
2015-09-17 06:09:10 +00:00
|
|
|
virtual struct SharedMemoryCommand* getAvailableSharedMemoryCommand();
|
|
|
|
|
2015-07-14 22:30:17 +00:00
|
|
|
virtual bool canSubmitCommand() const;
|
|
|
|
|
2015-09-17 06:09:10 +00:00
|
|
|
virtual bool submitClientCommand(const struct SharedMemoryCommand& command);
|
2015-07-14 22:30:17 +00:00
|
|
|
|
2015-08-02 21:00:43 +00:00
|
|
|
virtual int getNumJoints() const;
|
2015-07-21 06:35:29 +00:00
|
|
|
|
2015-09-17 06:09:10 +00:00
|
|
|
virtual void getJointInfo(int index, struct 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-08-20 05:51:16 +00:00
|
|
|
|
|
|
|
virtual void uploadBulletFileToSharedMemory(const char* data, int len);
|
|
|
|
|
|
|
|
virtual int getNumDebugLines() const;
|
|
|
|
|
2015-09-17 06:09:10 +00:00
|
|
|
virtual const float* getDebugLinesFrom() const;
|
|
|
|
virtual const float* getDebugLinesTo() const;
|
|
|
|
virtual const float* getDebugLinesColor() const;
|
2015-08-20 05:51:16 +00:00
|
|
|
|
2015-07-14 22:30:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //BT_PHYSICS_CLIENT_API_H
|