RAMSES Documentation  27.0.130
Information for RAMSES users and developers
Public Member Functions | List of all members
ramses::IClientEventHandler Class Referenceabstract

Provides an interface for handling the result of client events. Implementation of this interface must be passed to RamsesClient::dispatchEvents which will in return invoke methods of the interface according to events that occurred since last dispatching. More...

#include <IClientEventHandler.h>

Public Member Functions

virtual void sceneFileLoadFailed (const char *filename)=0
 This method will be called when asynchronous loading of a scene or one of its associated resource files failed. There will also be events generated for the resource files provided to loadSceneFromFileAsync(). More...
 
virtual void sceneFileLoadSucceeded (const char *filename, Scene *loadedScene)=0
 This method will be called when asynchronous loading of a scene file and its associated resource files successfully finished. There will also be events generated for the resource files provided to loadSceneFromFileAsync(). More...
 
virtual void sceneReferenceStateChanged (SceneReference &sceneRef, RendererSceneState state)=0
 This method will be called when state on renderer side of a scene referenced using ramses::SceneReference changed. More...
 
virtual void sceneReferenceFlushed (SceneReference &sceneRef, sceneVersionTag_t versionTag)=0
 This method will be called after a flush with version tag (ramses::Scene::flush) has been applied and there is a ramses::SceneReference with enabled version tag notifications (ramses::SceneReference::requestNotificationsForSceneVersionTags). It will also be called once right after enabling notifications (after they were previously disabled) with the last applied valid version tag. Notifications will only be sent if the scene reference state is Ready. More...
 
virtual void dataLinked (sceneId_t providerScene, dataProviderId_t providerId, sceneId_t consumerScene, dataConsumerId_t consumerId, bool success)=0
 This method will be called when the data link between a data provider and data consumer is established (or failed to be established) on renderer side. More...
 
virtual void dataUnlinked (sceneId_t consumerScene, dataConsumerId_t consumerId, bool success)=0
 This method will be called when the data link between a data provider and data consumer is destroyed (or failed to be destroyed) on renderer side. More...
 
virtual ~IClientEventHandler ()=default
 Empty destructor. More...
 

Detailed Description

Provides an interface for handling the result of client events. Implementation of this interface must be passed to RamsesClient::dispatchEvents which will in return invoke methods of the interface according to events that occurred since last dispatching.

Examples
ramses-example-local-scene-referencing/src/main.cpp.

Constructor & Destructor Documentation

◆ ~IClientEventHandler()

virtual ramses::IClientEventHandler::~IClientEventHandler ( )
virtualdefault

Empty destructor.

Member Function Documentation

◆ dataLinked()

virtual void ramses::IClientEventHandler::dataLinked ( sceneId_t  providerScene,
dataProviderId_t  providerId,
sceneId_t  consumerScene,
dataConsumerId_t  consumerId,
bool  success 
)
pure virtual

This method will be called when the data link between a data provider and data consumer is established (or failed to be established) on renderer side.

This callback is response to ramses::Scene::linkData call on a scene that belongs to this ramses::RamsesClient, not by data link initiated from other clients' scenes or renderer.

Parameters
providerSceneThe ID of scene where the data provider slot is, can be either a ramses::Scene from this ramses::RamsesClient or another scene referenced via ramses::SceneReference
providerIdThe ID of data provider which was linked
consumerSceneThe ID of scene where the data consumer slot is, can be either a ramses::Scene from this ramses::RamsesClient or another scene referenced via ramses::SceneReference
consumerIdThe ID of data consumer which was linked
successTrue if succeeded, false otherwise - check renderer logs for concrete error message.
Examples
ramses-example-local-scene-referencing/src/main.cpp.

◆ dataUnlinked()

virtual void ramses::IClientEventHandler::dataUnlinked ( sceneId_t  consumerScene,
dataConsumerId_t  consumerId,
bool  success 
)
pure virtual

This method will be called when the data link between a data provider and data consumer is destroyed (or failed to be destroyed) on renderer side.

This callback is response to ramses::Scene::unlinkData call on a scene that belongs to this ramses::RamsesClient, not by data unlink initiated from other clients' scenes or renderer.

Parameters
consumerSceneThe ID of scene where the data consumer slot is, can be either a ramses::Scene from this ramses::RamsesClient or another scene referenced via ramses::SceneReference
consumerIdThe ID of data consumer which was unlinked
successTrue if succeeded, false otherwise - check renderer logs for concrete error message.
Examples
ramses-example-local-scene-referencing/src/main.cpp.

◆ sceneFileLoadFailed()

virtual void ramses::IClientEventHandler::sceneFileLoadFailed ( const char *  filename)
pure virtual

This method will be called when asynchronous loading of a scene or one of its associated resource files failed. There will also be events generated for the resource files provided to loadSceneFromFileAsync().

Parameters
filenameThe filename of the scene file that failed to load.
Examples
ramses-example-local-scene-referencing/src/main.cpp.

◆ sceneFileLoadSucceeded()

virtual void ramses::IClientEventHandler::sceneFileLoadSucceeded ( const char *  filename,
Scene loadedScene 
)
pure virtual

This method will be called when asynchronous loading of a scene file and its associated resource files successfully finished. There will also be events generated for the resource files provided to loadSceneFromFileAsync().

Parameters
filenameThe filename of the scene file that finished loading.
loadedScenePointer to the newly loaded scene.
Examples
ramses-example-local-scene-referencing/src/main.cpp.

◆ sceneReferenceFlushed()

virtual void ramses::IClientEventHandler::sceneReferenceFlushed ( SceneReference sceneRef,
sceneVersionTag_t  versionTag 
)
pure virtual

This method will be called after a flush with version tag (ramses::Scene::flush) has been applied and there is a ramses::SceneReference with enabled version tag notifications (ramses::SceneReference::requestNotificationsForSceneVersionTags). It will also be called once right after enabling notifications (after they were previously disabled) with the last applied valid version tag. Notifications will only be sent if the scene reference state is Ready.

Parameters
sceneRefInstance of ramses::SceneReference that references the scene which the versioned flush belongs to
versionTagVersion tag of the scene flush
Examples
ramses-example-local-scene-referencing/src/main.cpp.

◆ sceneReferenceStateChanged()

virtual void ramses::IClientEventHandler::sceneReferenceStateChanged ( SceneReference sceneRef,
RendererSceneState  state 
)
pure virtual

This method will be called when state on renderer side of a scene referenced using ramses::SceneReference changed.

Typically this is a result of ramses::SceneReference::requestState call but can be also triggered externally (e.g. scene was unpublished by client). Note that there can be multiple state change callbacks in a row depending on number of state transitions needed between the previous state and target state when calling ramses::SceneReference::requestState.

Parameters
sceneRefInstance of ramses::SceneReference that references the scene with changed state
stateNew renderer state of the referenced scene
Examples
ramses-example-local-scene-referencing/src/main.cpp.

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