Class SoRemoteVizClient
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.misc.SoBase
com.openinventor.inventor.fields.SoFieldContainer
com.openinventor.inventor.nodes.SoNode
com.openinventor.remoteviz.clients.nodes.SoRemoteVizClient
- All Implemented Interfaces:
SafeDisposable
Client node enables to integrate RemoteViz into Open Inventor applications.
This node is a RemoteViz client enabling software developers to easily integrate remote 3D interaction and visualization into their Open Inventor applications. It enables to establish a connection to a RemoteViz service so that display frames into an Open Inventor viewer.
RemoteVizClient
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Structure given when a received binary message event is raised.static enum
Display mode value.static class
Structure given when a received and decoded frame event is raised.static class
Structure given when a keyboard event is raised.static class
Structure given when a received text message event is raised.static class
Structure given when a mouse button event is raised.static class
Structure given when a mouse location event is raised.static class
Structure given when a mouse wheel event is raised.static class
Structure given when a renderArea resize event is raised.static enum
Each enumeration represents a security protocol.static class
Structure given when a ServiceMessage event is raised.static enum
Streaming mode values.static class
Structure given when a touch event is raised.static enum
Video decoder values.Nested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal SoSFBool
Opens/Closes a connection between the client and the RemoteViz service.final SoMFVec2String
Connection parameters that will be sent to the RemoteViz service during the connection establishment.This setting allows you to specify how to map the renderArea image (server-side) into the container (client-side).final SoSFString
Specifies the IP address of the RemoteViz Service to which the client will connect.Triggered when a frame is decoded and displayed.Triggered when a keyboard event is fired on the client.Triggered when a mouse button event is fired on the client.Triggered when a mouse location event is fired on the client.Triggered when a mouse wheel event is fired on the client.Triggered when a binary message is received from the RemoteViz service.Triggered when a frame is received from the RemoteViz service.Triggered when a text message is received from the RemoteViz service.Triggered when the renderArea has been resized.Triggered when a service message is received from the RemoteViz service.Triggered when a touch event is fired on the client.final SoSFUShort
Specifies the port of the RemoteViz Service to which the client will connect.final SoSFString
Specifies the renderArea name to which the client will connect.This setting allows you to specify a preference list of video decoders.Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
enableSecureConnection
(String publicCertificateFilePath, String privateKeyFilePath) Calls enableSecureConnection(publicCertificateFilePath, privateKeyFilePath, SoRemoteVizClient.SecurityProtocols.valueOf( SoRemoteVizClient.SecurityProtocols.TLSv1_1.getValue() | SoRemoteVizClient.SecurityProtocols.TLSv1_2.getValue() | SoRemoteVizClient.SecurityProtocols.TLSv1_3.getValue() ), "").void
enableSecureConnection
(String publicCertificateFilePath, String privateKeyFilePath, SoRemoteVizClient.SecurityProtocols enabledSecurityProtocols) Calls enableSecureConnection(publicCertificateFilePath, privateKeyFilePath, enabledSecurityProtocols, "").void
enableSecureConnection
(String publicCertificateFilePath, String privateKeyFilePath, SoRemoteVizClient.SecurityProtocols enabledSecurityProtocols, String privateKeyPassphrase) Secures the connection between the client and the server.Returns the size of the renderArea container.Gets the security procotols used in RemoteViz.Returns the size of the renderArea managed by the RemoteViz service.Returns the type of streaming currently used by the client.Returns the video decoder that has been successfully initialized and currently used by the client to decode video stream.boolean
Checks if the client supports image streaming.boolean
Gets the SSL engine activation.boolean
Checks if the client supports video streaming.void
requestRenderAreaSize
(SbVec2s size) Sends a request to resize the renderArea associated with the connection.void
sendMessage
(SoCpuBufferObject buffer) Sends a binary message to the server.void
sendMessage
(String message) Sends a text message to the server.Methods inherited from class com.openinventor.inventor.nodes.SoNode
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
Field Details
-
connect
Opens/Closes a connection between the client and the RemoteViz service.
After being connected, the server-side onPendingCreateRenderArea callback will be triggered if the renderArea does not exist otherwise the server-side onPendingShareRenderArea callback will be triggered. -
ipAddress
Specifies the IP address of the RemoteViz Service to which the client will connect. -
port
Specifies the port of the RemoteViz Service to which the client will connect. -
renderAreaName
Specifies the renderArea name to which the client will connect. -
videoDecoders
This setting allows you to specify a preference list of video decoders.
The first decoder (among the decoders of the list) successfully initialized will be used to decode the video stream.
If all decoders of the list fail to be initialized, the decoder VideoDecoder.OPENH264 will be used.
. Default is OPENH264. -
connectionParameters
Connection parameters that will be sent to the RemoteViz service during the connection establishment. The container size will be sent to the service as RenderArea requested size. This behavior can be overriden by including the requested height ("requestedHeight") and the requested width ("requestedWidth") in the parameters. If the connection is accepted, a server-side onRequestedSize callback will be triggered. -
displayMode
This setting allows you to specify how to map the renderArea image (server-side) into the container (client-side).
. Default is FIT. -
onServiceMessage
Triggered when a service message is received from the RemoteViz service. -
onReceivedMessage
Triggered when a text message is received from the RemoteViz service. -
onReceivedBinaryMessage
Triggered when a binary message is received from the RemoteViz service. -
onRenderAreaResize
Triggered when the renderArea has been resized. -
onReceivedFrame
Triggered when a frame is received from the RemoteViz service. -
onDecodedFrame
Triggered when a frame is decoded and displayed. -
onMouseLocationEvent
Triggered when a mouse location event is fired on the client. -
onMouseButtonEvent
Triggered when a mouse button event is fired on the client. -
onMouseWheelEvent
Triggered when a mouse wheel event is fired on the client. -
onKeyboardEvent
Triggered when a keyboard event is fired on the client. -
onTouchEvent
Triggered when a touch event is fired on the client.
-
-
Constructor Details
-
SoRemoteVizClient
public SoRemoteVizClient()Default constructor.
-
-
Method Details
-
enableSecureConnection
Calls enableSecureConnection(publicCertificateFilePath, privateKeyFilePath, SoRemoteVizClient.SecurityProtocols.valueOf( SoRemoteVizClient.SecurityProtocols.TLSv1_1.getValue() | SoRemoteVizClient.SecurityProtocols.TLSv1_2.getValue() | SoRemoteVizClient.SecurityProtocols.TLSv1_3.getValue() ), ""). -
enableSecureConnection
public void enableSecureConnection(String publicCertificateFilePath, String privateKeyFilePath, SoRemoteVizClient.SecurityProtocols enabledSecurityProtocols) Calls enableSecureConnection(publicCertificateFilePath, privateKeyFilePath, enabledSecurityProtocols, ""). -
sendMessage
Sends a binary message to the server. After being sent, the server-side onReceivedMessage callback will be triggered.- Parameters:
buffer
- : buffer to be sent
-
sendMessage
Sends a text message to the server. After being sent, the server-side onReceivedMessage callback will be triggered.- Parameters:
message
- : message to be sent
-
enableSecureConnection
public void enableSecureConnection(String publicCertificateFilePath, String privateKeyFilePath, SoRemoteVizClient.SecurityProtocols enabledSecurityProtocols, String privateKeyPassphrase) Secures the connection between the client and the server.- Parameters:
publicCertificateFilePath
- : Path to a file containing the public certificate used to authenticate the server to the clients. The certificate has to be a PEM ("Privacy Enhanced Mail") encoded certificate.privateKeyFilePath
- : Path to a file containing the private key used to sign the server key exchange between the client and the server.enabledSecurityProtocols
- : Defines the security protocols used to secure the exchange between the client and the server. By default, TLSv1.1, TLSv1.2 and TLSv1.3 protocols are enabled. A bitmask of the security protocols is used. Many security protocols can be enabled by using the logical OR operator.
privateKeyPassphrase
- : The passphrase that protect the private key. Security warning !! DO NOT hard-code the passphrase !!
Read it from a SECURE location on your system.
-
isImageStreamingSupported
public boolean isImageStreamingSupported()Checks if the client supports image streaming.- Returns:
- true if the client supports image streaming
-
getContainerSize
Returns the size of the renderArea container.- Returns:
- the renderArea container size
-
getVideoDecoder
Returns the video decoder that has been successfully initialized and currently used by the client to decode video stream.
This information is known after receiving the first frame. For instance, you can retrieve this information in the event callback onDecodedFrame.
If this method is called before receiving the first frame, it will return VideoDecoder.NONE. If the streaming mode is not StreamingMode.VIDEO (getStreamingMode
), this method will return VideoDecoder.NONE.- Returns:
- video decoder used by the client.
- See Also:
-
isVideoStreamingSupported
public boolean isVideoStreamingSupported()Checks if the client supports video streaming.- Returns:
- true if the client supports video streaming
-
getRenderAreaSize
Returns the size of the renderArea managed by the RemoteViz service.- Returns:
- the renderArea size
-
getEnabledSecurityProtocols
Gets the security procotols used in RemoteViz.
- Returns:
- the bitmask of used security protocols.
-
getStreamingMode
Returns the type of streaming currently used by the client.
This information is known after receiving the first frame. For instance, you can retrieve this information in the event callback onDecodedFrame.
If this method is called before receiving the first frame, it will return StreamingMode.UNKNOWN.- Returns:
- streaming mode used by the client.
- See Also:
-
requestRenderAreaSize
Sends a request to resize the renderArea associated with the connection. A server-side onRequestedSize event will be triggered.
If the renderarea size is modified in the server-side onRequestSize callback, the client-side resize event will be triggered.- Parameters:
size
- : renderArea size
-
isSecureConnection
public boolean isSecureConnection()Gets the SSL engine activation.- Returns:
- true if the secure connection is enabled.
-