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 #if defined( _WIN32 ) || defined( __WIN32__ )
00024 #if !defined( RemoteVizServices_EXPORTS )
00025 #if _DEBUG
00026 #pragma comment(lib,"RemoteVizServicesD")
00027 #else
00028 #pragma comment(lib,"RemoteVizServices")
00029 #endif
00030 #endif
00031 #endif
00032
00033 #include <Inventor/sys/port.h>
00034
00035 #include <string>
00036 #include <memory>
00037
00038 class SoSceneManager;
00039
00040 class SoTouchManager;
00041
00042 class SoGLContext;
00043
00044 namespace RemoteViz
00045 {
00046 namespace Rendering
00047 {
00048
00049 class Connection;
00050
00051 class RenderAreaImpl;
00052
00053 class RenderAreaListener;
00054
00055 class RenderAreaHardware;
00070 class RENDERSERVICE_API RenderArea {
00071
00073 friend class ServiceImpl;
00074 friend class ConnectionImpl;
00077 public:
00078
00084 const std::string& getId() const;
00092 Connection* getConnection(const std::string& id) const;
00100 Connection* getConnection(unsigned int index) const;
00106 unsigned int getNumConnections() const;
00114 SoSceneManager* getSceneManager() const;
00122 SoTouchManager* getTouchManager() const;
00130 SoGLContext* getGLContext() const;
00143 bool sendMessage(const std::string& message, Connection** excludedConnections = NULL, unsigned int num = 0) const;
00149 unsigned int getWidth() const;
00155 unsigned int getHeight() const;
00168 void resize(unsigned int width, unsigned int height);
00177 void closeConnectionsAndDispose();
00183 void addListener(std::shared_ptr<RenderAreaListener> listener);
00189 void removeListener(std::shared_ptr<RenderAreaListener> listener);
00193 void removeAllListeners();
00199 unsigned int getNumListeners() const;
00207 const std::string& getGpu() const;
00208
00209 private:
00211 std::shared_ptr<RenderAreaImpl> getImpl() const;
00214 private:
00216 std::shared_ptr<RenderAreaImpl> pImpl;
00217
00219 RenderArea(const std::string& id, unsigned int width, unsigned int height, RenderAreaHardware& renderAreaHardware);
00220
00222 RenderArea(const RenderArea&) = delete;
00223 RenderArea& operator= (const RenderArea&) = delete;
00224
00226 static std::shared_ptr<RenderArea> createInstance(const std::string& id, unsigned int width, unsigned int height, RenderAreaHardware& renderAreaHardware);
00227 };
00228
00229 }
00230 }
00231
00232