PhysicsClient.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef BT_PHYSICS_CLIENT_API_H
  2. #define BT_PHYSICS_CLIENT_API_H
  3. //#include "SharedMemoryCommands.h"
  4. #include "LinearMath/btVector3.h"
  5. class PhysicsClient {
  6. public:
  7. virtual ~PhysicsClient();
  8. // return true if connection succesfull, can also check 'isConnected'
  9. virtual bool connect() = 0;
  10. virtual void disconnectSharedMemory() = 0;
  11. virtual bool isConnected() const = 0;
  12. // return non-null if there is a status, nullptr otherwise
  13. virtual const struct SharedMemoryStatus* processServerStatus() = 0;
  14. virtual struct SharedMemoryCommand* getAvailableSharedMemoryCommand() = 0;
  15. virtual bool canSubmitCommand() const = 0;
  16. virtual bool submitClientCommand(const struct SharedMemoryCommand& command) = 0;
  17. virtual int getNumJoints(int bodyIndex) const = 0;
  18. virtual void getJointInfo(int bodyIndex, int jointIndex, struct b3JointInfo& info) const = 0;
  19. virtual void setSharedMemoryKey(int key) = 0;
  20. virtual void uploadBulletFileToSharedMemory(const char* data, int len) = 0;
  21. virtual int getNumDebugLines() const = 0;
  22. virtual const float* getDebugLinesFrom() const = 0;
  23. virtual const float* getDebugLinesTo() const = 0;
  24. virtual const float* getDebugLinesColor() const = 0;
  25. };
  26. #endif // BT_PHYSICS_CLIENT_API_H