PhysicsServerSharedMemory.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef PHYSICS_SERVER_SHARED_MEMORY_H
  2. #define PHYSICS_SERVER_SHARED_MEMORY_H
  3. #include "PhysicsServer.h"
  4. class PhysicsServerSharedMemory : public PhysicsServer
  5. {
  6. struct PhysicsServerSharedMemoryInternalData* m_data;
  7. protected:
  8. void releaseSharedMemory();
  9. public:
  10. PhysicsServerSharedMemory();
  11. virtual ~PhysicsServerSharedMemory();
  12. virtual void setSharedMemoryKey(int key);
  13. //todo: implement option to allocated shared memory from client
  14. virtual bool connectSharedMemory( struct GUIHelperInterface* guiHelper);
  15. virtual void disconnectSharedMemory (bool deInitializeSharedMemory);
  16. virtual void processClientCommands();
  17. //bool supportsJointMotor(class btMultiBody* body, int linkIndex);
  18. //@todo(erwincoumans) Should we have shared memory commands for picking objects?
  19. ///The pickBody method will try to pick the first body along a ray, return true if succeeds, false otherwise
  20. virtual bool pickBody(const btVector3& rayFromWorld, const btVector3& rayToWorld);
  21. virtual bool movePickedBody(const btVector3& rayFromWorld, const btVector3& rayToWorld);
  22. virtual void removePickingConstraint();
  23. //for physicsDebugDraw and renderScene are mainly for debugging purposes
  24. //and for physics visualization. The idea is that physicsDebugDraw can also send wireframe
  25. //to a physics client, over shared memory
  26. void physicsDebugDraw(int debugDrawFlags);
  27. void renderScene();
  28. void enableCommandLogging(bool enable, const char* fileName);
  29. void replayFromLogFile(const char* fileName);
  30. };
  31. #endif //PHYSICS_SERVER_EXAMPLESHARED_MEMORY_H