PhysicsServer.h 1.3 KB

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