00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #pragma once
00022
00023 #include <Inventor/sys/port.h>
00024 #include <RemoteViz/Rendering/LibHelper.h>
00025
00026 #include <string>
00027 #include <memory>
00028
00029 class SoSceneManager;
00030
00031 class SoTouchManager;
00032
00033 class SoGLContext;
00034
00035 namespace RemoteViz
00036 {
00037 namespace Rendering
00038 {
00039
00040 class Connection;
00041
00042 class RenderAreaImpl;
00043
00044 class RenderAreaListener;
00045
00046 class RenderAreaHardware;
00061 class RENDERSERVICE_API RenderArea {
00062
00064 friend class ServiceImpl;
00065 friend class ConnectionImpl;
00068 public:
00069
00075 const std::string& getId() const;
00083 Connection* getConnection(const std::string& id) const;
00091 Connection* getConnection(unsigned int index) const;
00097 unsigned int getNumConnections() const;
00105 SoSceneManager* getSceneManager() const;
00113 SoTouchManager* getTouchManager() const;
00121 SoGLContext* getGLContext() const;
00134 bool sendMessage(const std::string& message, Connection** excludedConnections = nullptr, unsigned int num = 0) const;
00140 unsigned int getWidth() const;
00146 unsigned int getHeight() const;
00159 void resize(unsigned int width, unsigned int height);
00168 void closeConnectionsAndDispose();
00174 void addListener(std::shared_ptr<RenderAreaListener> listener);
00180 void removeListener(std::shared_ptr<RenderAreaListener> listener);
00184 void removeAllListeners();
00190 unsigned int getNumListeners() const;
00198 const std::string& getGpu() const;
00199
00200 private:
00202 std::shared_ptr<RenderAreaImpl> getImpl() const;
00205 private:
00207 std::shared_ptr<RenderAreaImpl> pImpl;
00208
00210 RenderArea(const std::string& id, const RenderAreaHardware& renderAreaHardware);
00211
00213 static std::shared_ptr<RenderArea> createInstance(const std::string& id, unsigned int width, unsigned int height, const RenderAreaHardware& renderAreaHardware);
00214 };
00215
00216 }
00217 }
00218
00219