RemoteViz::Rendering::RenderArea Class Reference
[RemoteViz]

RemoteViz More...

#include <RemoteViz/Rendering/RenderArea.h>

List of all members.

Public Member Functions

const std::string & getId () const
ConnectiongetConnection (const std::string &id) const
ConnectiongetConnection (unsigned int index) const
unsigned int getNumConnections () const
SoSceneManagergetSceneManager () const
SoTouchManagergetTouchManager () const
SoGLContextgetGLContext () const
bool sendMessage (const std::string &message, Connection **excludedConnections=NULL, unsigned int num=0) const
unsigned int getWidth () const
unsigned int getHeight () const
void resize (unsigned int width, unsigned int height)
void closeConnectionsAndDispose ()
void addListener (std::shared_ptr< RenderAreaListener > listener)
void removeListener (std::shared_ptr< RenderAreaListener > listener)
void removeAllListeners ()
unsigned int getNumListeners () const
const std::string & getGpu () const

Detailed Description

RemoteViz

Defines the rendering area.
The implementation of the class RenderAreaListener allows managing the renderArea events.
When using ServiceSettings::INVENTOR_SERVICE or ServiceSettings::INVENTOR_APPLICATION service mode, this class provides access to the scene manager and the touch manager to modify the rendering.


Member Function Documentation

void RemoteViz::Rendering::RenderArea::addListener ( std::shared_ptr< RenderAreaListener listener  ) 

Adds a RenderAreaListener to manage the renderArea.

Parameters:
listener : shared_ptr pointer to the class that implements RenderAreaListener
void RemoteViz::Rendering::RenderArea::closeConnectionsAndDispose (  ) 

Closes all connections of the renderArea and disposes it.

If connections are still open, this method will close them and dispose the renderArea. While executing this method, the callback ServiceListener::onDisposedRenderArea will be triggered and a DISPOSED disconnect message will be sent to all clients of the renderArea. The callback RenderAreaListener::onClosedConnection will not be triggered after closing connections.

Connection* RemoteViz::Rendering::RenderArea::getConnection ( unsigned int  index  )  const

Gets a Connection to the renderArea.

Parameters:
index : index identifying the Connection
Returns:
a pointer to the connection if the index exists, otherwise returns NULL.
Connection* RemoteViz::Rendering::RenderArea::getConnection ( const std::string &  id  )  const

Gets a Connection to the renderArea.

Parameters:
id : ID identifying the Connection
Returns:
a pointer to the connection if the id exists, otherwise returns NULL.
SoGLContext* RemoteViz::Rendering::RenderArea::getGLContext (  )  const

Gets the OpenGL context of the renderArea.


In the ServiceSettings::INDEPENDENT_SERVICE mode, this method returns NULL.

Returns:
a pointer to the SoGLContext
const std::string& RemoteViz::Rendering::RenderArea::getGpu (  )  const

Gets the Graphics Processing Unit (GPU) used to compute the render.


GPU can be defined in ServiceListener::onPendingCreateRenderArea.

See also:
RenderAreaHardware::setGpu
Returns:
gpu used to compute the render.
unsigned int RemoteViz::Rendering::RenderArea::getHeight (  )  const

Gets the renderArea height.

Returns:
the renderArea height
const std::string& RemoteViz::Rendering::RenderArea::getId (  )  const

Gets the renderArea id.

Returns:
the ID identifying the renderArea
unsigned int RemoteViz::Rendering::RenderArea::getNumConnections (  )  const

Gets the connections number of the renderArea.

Returns:
the number of connections
unsigned int RemoteViz::Rendering::RenderArea::getNumListeners (  )  const

Gets the number of RenderAreaListener.

Returns:
number of RenderAreaListener.
SoSceneManager* RemoteViz::Rendering::RenderArea::getSceneManager (  )  const

Gets the Scene manager of the renderArea.


In the ServiceSettings::INDEPENDENT_SERVICE mode, this method returns NULL.

Returns:
a pointer to the sceneManager
SoTouchManager* RemoteViz::Rendering::RenderArea::getTouchManager (  )  const

Gets the Touch Manager of the renderArea.


In the ServiceSettings::INDEPENDENT_SERVICE mode, this method returns NULL.

Returns:
a pointer to the sceneManager
unsigned int RemoteViz::Rendering::RenderArea::getWidth (  )  const

Gets the renderArea width.

Returns:
the renderArea width
void RemoteViz::Rendering::RenderArea::removeAllListeners (  ) 

Removes all RenderAreaListeners.

void RemoteViz::Rendering::RenderArea::removeListener ( std::shared_ptr< RenderAreaListener listener  ) 

Removes a RenderAreaListener.

Parameters:
listener : shared_ptr pointer to the class that implements RenderAreaListener
void RemoteViz::Rendering::RenderArea::resize ( unsigned int  width,
unsigned int  height 
)

Resizes the renderArea at a specific size.

After resizing, a notification will be sent to all the renderArea clients. The minimum size is (128, 128) and the maximum size is (3840, 2160). If the size is inferior or superior to the limit, it will be adjusted automatically.

See also:
RenderAreaListener::onResize
Parameters:
width : new width of the renderArea
height : new height of the renderArea
bool RemoteViz::Rendering::RenderArea::sendMessage ( const std::string &  message,
Connection **  excludedConnections = NULL,
unsigned int  num = 0 
) const

Sends a text message to the renderArea connections.

Parameters:
message : the message to be sent to all connections of the renderArea
excludedConnections : pointer to an excluded connections array
num : number of excluded connections
Returns:
true if the message has been successfully sent to all connections, otherwise returns false.

The documentation for this class was generated from the following file:

Open Inventor by FEI reference manual, generated on 19 Aug 2019
Copyright © FEI S.A.S. All rights reserved.
http://www.openinventor.com/