public class RenderArea extends Inventor
RenderAreaListener
allows managing the renderArea events.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.
Inventor.ConstructorCommand
VERBOSE_LEVEL, ZeroHandle
Modifier and Type | Method and Description |
---|---|
void |
addListener(RenderAreaListener listener)
Adds a
RenderAreaListener to manage the renderArea. |
void |
closeConnectionsAndDispose()
Closes all connections of the renderArea and disposes it.
|
Connection |
getConnection(int index)
Gets a
Connection to the renderArea. |
Connection |
getConnection(java.lang.String id)
Gets a
Connection to the renderArea. |
SoGLContext |
getGLContext()
Gets the OpenGL context of the renderArea.
|
java.lang.String |
getGpu()
Gets the Graphics Processing Unit (GPU) used to compute the render.
|
int |
getHeight()
Gets the renderArea height.
|
java.lang.String |
getId()
Gets the renderArea id.
|
int |
getNumConnections()
Gets the connections number of the renderArea.
|
int |
getNumListeners()
Gets the number of
RenderAreaListener . |
SoSceneManager |
getSceneManager()
Gets the Scene manager of the renderArea.
|
SoTouchManager |
getTouchManager()
Gets the Touch Manager of the renderArea.
|
int |
getWidth()
Gets the renderArea width.
|
void |
removeAllListeners()
Removes all RenderAreaListeners.
|
void |
removeListener(RenderAreaListener listener)
Removes a
RenderAreaListener . |
void |
resize(int width,
int height)
Resizes the renderArea at a specific size.
|
boolean |
sendMessage(java.lang.String message)
Calls sendMessage(message, (com.openinventor.remoteviz.rendering.Connection[])null).
|
boolean |
sendMessage(java.lang.String message,
Connection[] excludedConnections)
Sends a text message to the renderArea connections.
|
dispose, getNativeResourceHandle
public boolean sendMessage(java.lang.String message)
public int getNumConnections()
public java.lang.String getGpu()
RenderAreaHardware.setGpu
public SoSceneManager getSceneManager()
ServiceSettings.INDEPENDENT_SERVICE
mode, this method returns nullptr.
public int getNumListeners()
RenderAreaListener
.
RenderAreaListener
.
public java.lang.String getId()
public int getHeight()
public Connection getConnection(int index)
Connection
to the renderArea.
index
- : index identifying the Connection
public Connection getConnection(java.lang.String id)
Connection
to the renderArea.
id
- : ID identifying the Connection
public void closeConnectionsAndDispose()
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.public boolean sendMessage(java.lang.String message, Connection[] excludedConnections)
message
- : the message to be sent to all connections of the renderArea
excludedConnections
- : pointer to an excluded connections array
num
- : number of excluded connections
public void resize(int width, int height)
width
- : new width of the renderArea
height
- : new height of the renderAreapublic int getWidth()
public void addListener(RenderAreaListener listener)
RenderAreaListener
to manage the renderArea.
listener
- : shared_ptr pointer to the class that implements RenderAreaListener
public SoTouchManager getTouchManager()
ServiceSettings.INDEPENDENT_SERVICE
mode, this method returns nullptr.
public void removeAllListeners()
public SoGLContext getGLContext()
ServiceSettings.INDEPENDENT_SERVICE
mode, this method returns nullptr.
SoGLContext
public void removeListener(RenderAreaListener listener)
RenderAreaListener
.
listener
- : shared_ptr pointer to the class that implements RenderAreaListener
Generated on July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com