Skip to content

EntropyCanvas::IDataProvider

IDataProvider - Abstract interface for scene data sources. More…

#include <IDataProvider.h>

Inherited by EntropyCanvas::CanvasClient

Name
using std::function< void(const std::string &usdText)>UsdSnapshotCallback
using std::function< void(const SceneSnapshot &)>SnapshotCallback
using std::function< void(const PropertyDelta &)>DeltaCallback
Name
virtual~IDataProvider() =default
virtual voidsubscribeMaterial(const AssetId & materialId) =0
Subscribe to a material by its asset ID.
virtual voidsetUsdSnapshotCallback(UsdSnapshotCallback callback) =0
Set the callback for receiving raw USD scene data.
virtual voidsetDeltaCallback(DeltaCallback callback) =0
Set the callback for property delta updates.
virtual voidrequestSnapshot(SnapshotCallback callback) =0
Request a full scene snapshot.
virtual boolisConnected() const =0
Check if connected to the data source.
virtual uint32_tgetServerId() const =0
Get the server ID (for multi-server scenarios).
class EntropyCanvas::IDataProvider;

IDataProvider - Abstract interface for scene data sources.

This interface allows SceneService to work with any data source:

  • CanvasClient (SDK’s built-in client for CanvasEngine)
  • Custom implementations (USD files, other servers, etc.)

Implementations of this interface provide:

  • Initial scene snapshots on connection
  • Incremental property deltas as the scene changes
using EntropyCanvas::IDataProvider::UsdSnapshotCallback = std::function<void(const std::string& usdText)>;
using EntropyCanvas::IDataProvider::SnapshotCallback = std::function<void(const SceneSnapshot&)>;
using EntropyCanvas::IDataProvider::DeltaCallback = std::function<void(const PropertyDelta&)>;
virtual ~IDataProvider() =default
virtual void subscribeMaterial(
const AssetId & materialId
) =0

Subscribe to a material by its asset ID.

Reimplemented by: EntropyCanvas::CanvasClient::subscribeMaterial

This requests the server to send MaterialResolved with the material data.

virtual void setUsdSnapshotCallback(
UsdSnapshotCallback callback
) =0

Set the callback for receiving raw USD scene data.

Reimplemented by: EntropyCanvas::CanvasClient::setUsdSnapshotCallback

This enables direct scene creation without per-property delta overhead. The callback receives the USD file content as text (USDA format).

virtual void setDeltaCallback(
DeltaCallback callback
) =0

Set the callback for property delta updates.

Reimplemented by: EntropyCanvas::CanvasClient::setDeltaCallback

This will be called whenever a property changes on the server.

virtual void requestSnapshot(
SnapshotCallback callback
) =0

Request a full scene snapshot.

Reimplemented by: EntropyCanvas::CanvasClient::requestSnapshot

The callback will be invoked when the snapshot is ready.

virtual bool isConnected() const =0

Check if connected to the data source.

Reimplemented by: EntropyCanvas::CanvasClient::isConnected

virtual uint32_t getServerId() const =0

Get the server ID (for multi-server scenarios).

Reimplemented by: EntropyCanvas::CanvasClient::getServerId


Updated on 2026-01-26 at 17:14:35 -0500