2017-02-21 00:46:25 +00:00
|
|
|
#ifndef PHYSICS_CLIENT_TCP_H
|
|
|
|
#define PHYSICS_CLIENT_TCP_H
|
|
|
|
|
|
|
|
#include "PhysicsDirect.h"
|
2018-01-16 21:39:37 +00:00
|
|
|
#include "PhysicsCommandProcessorInterface.h"
|
2017-02-21 00:46:25 +00:00
|
|
|
|
|
|
|
class TcpNetworkedPhysicsProcessor : public PhysicsCommandProcessorInterface
|
|
|
|
{
|
|
|
|
struct TcpNetworkedInternalData* m_data;
|
|
|
|
|
|
|
|
public:
|
|
|
|
TcpNetworkedPhysicsProcessor(const char* hostName, int port);
|
|
|
|
|
|
|
|
virtual ~TcpNetworkedPhysicsProcessor();
|
|
|
|
|
|
|
|
virtual bool connect();
|
|
|
|
|
|
|
|
virtual void disconnect();
|
|
|
|
|
|
|
|
virtual bool isConnected() const;
|
2018-09-23 21:17:31 +00:00
|
|
|
|
2017-02-21 00:46:25 +00:00
|
|
|
virtual bool processCommand(const struct SharedMemoryCommand& clientCmd, struct SharedMemoryStatus& serverStatusOut, char* bufferServerToClient, int bufferSizeInBytes);
|
|
|
|
|
|
|
|
virtual bool receiveStatus(struct SharedMemoryStatus& serverStatusOut, char* bufferServerToClient, int bufferSizeInBytes);
|
|
|
|
|
2017-05-16 19:19:03 +00:00
|
|
|
virtual void renderScene(int renderFlags);
|
2017-02-21 00:46:25 +00:00
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
virtual void physicsDebugDraw(int debugDrawFlags);
|
2017-02-21 00:46:25 +00:00
|
|
|
|
|
|
|
virtual void setGuiHelper(struct GUIHelperInterface* guiHelper);
|
|
|
|
|
2017-02-24 23:34:11 +00:00
|
|
|
virtual void setTimeOut(double timeOutInSeconds);
|
|
|
|
|
2018-09-04 06:13:15 +00:00
|
|
|
virtual void reportNotifications() {}
|
2017-02-21 00:46:25 +00:00
|
|
|
};
|
|
|
|
|
2018-09-23 21:17:31 +00:00
|
|
|
#endif //PHYSICS_CLIENT_TCP_H
|