Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
RenderArea.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2023 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20
21#pragma once
22
23#include <Inventor/sys/port.h>
24#include <RemoteViz/Rendering/LibHelper.h>
25
26#include <string>
27#include <memory>
28#include <vector>
29
30class SoSceneManager;
31
32class SoTouchManager;
33
34class SoGLContext;
35
36namespace RemoteViz
37{
38 namespace Rendering
39 {
40
41 class Connection;
42
43 class RenderAreaImpl;
44
45 class RenderAreaListener;
46
47 class RenderAreaHardware;
79 class RENDERSERVICE_API RenderArea {
80
82 friend class ServiceImpl;
83 friend class ConnectionImpl;
86 public:
87
104 bool isDisposed() const;
110 const std::string& getId() const;
118 std::shared_ptr<Connection> getConnection(const std::string& id) const;
126 std::shared_ptr<Connection> getConnection(unsigned int index) const;
132 unsigned int getNumConnections() const;
171 bool sendMessage(const std::string& message, std::vector<std::shared_ptr<Connection>> excludedConnections = {}) const;
181 bool sendMessage(const std::vector<unsigned char>& buffer, std::vector<std::shared_ptr<Connection>> excludedConnections = {}) const;
187 unsigned int getWidth() const;
193 unsigned int getHeight() const;
206 void resize(unsigned int width, unsigned int height);
225 void addListener(std::shared_ptr<RenderAreaListener> listener);
233 void removeListener(std::shared_ptr<RenderAreaListener> listener);
245 unsigned int getNumListeners() const;
253 const std::string& getGpu() const;
254
261 void setFrameMessage( const std::string& message );
262
263 private:
265 std::shared_ptr<RenderAreaImpl> getImpl() const;
268 private:
270 std::shared_ptr<RenderAreaImpl> pImpl;
271
273 RenderArea(const std::string& id, const RenderAreaHardware& renderAreaHardware);
274
276 RenderArea(const RenderArea&) = delete;
277 RenderArea& operator= (const RenderArea&) = delete;
278
280 static std::shared_ptr<RenderArea> createInstance(const std::string& id, unsigned int width, unsigned int height, const RenderAreaHardware& renderAreaHardware);
281 };
282
283 }
284}
285
<a href="IconLegend.html"><img src="extRV.gif" alt="RemoteViz" border="0"></a>
<a href="IconLegend.html"><img src="extRV.gif" alt="RemoteViz" border="0"></a>
Definition RenderArea.h:79
std::shared_ptr< Connection > getConnection(unsigned int index) const
Gets an existing Connection to the renderArea.
void removeAllListeners()
Removes all RenderAreaListeners.
bool sendMessage(const std::vector< unsigned char > &buffer, std::vector< std::shared_ptr< Connection > > excludedConnections={}) const
Sends a binary message to the renderArea connections.
void removeListener(std::shared_ptr< RenderAreaListener > listener)
Removes a RenderAreaListener.
SoSceneManager * getSceneManager() const
Gets the Open Inventor scene manager associated with the renderArea.
bool sendMessage(const std::string &message, std::vector< std::shared_ptr< Connection > > excludedConnections={}) const
Sends a text message to the renderArea connections.
unsigned int getWidth() const
Gets the renderArea width.
SoGLContext * getGLContext() const
Gets the OpenGL context associated with the renderArea.
void closeConnectionsAndDispose()
Closes all connections of the renderArea and disposes it.
void resize(unsigned int width, unsigned int height)
Resizes the renderArea at a specific size.
std::shared_ptr< Connection > getConnection(const std::string &id) const
Gets an existing Connection to the renderArea.
SoTouchManager * getTouchManager() const
Gets the Open Inventor touch manager associated with the renderArea.
unsigned int getNumListeners() const
Gets the number of RenderAreaListener.
const std::string & getId() const
Gets the renderArea id.
unsigned int getNumConnections() const
Gets the number of connections (see Connection) that exist for this renderArea.
const std::string & getGpu() const
Gets the Graphics Processing Unit (GPU) used to render images.
void setFrameMessage(const std::string &message)
Sets the message which will be associate with the next rendered frames.
void addListener(std::shared_ptr< RenderAreaListener > listener)
Adds a RenderAreaListener to manage the renderArea.
bool isDisposed() const
Gets the state of the RenderArea: alive or disposed.
unsigned int getHeight() const
Gets the renderArea height.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> OpenGL context m...
Manages scene graph rendering and event handling.
Class for managing events from touch screen input devices.