EntropyCanvas::IDataProvider
EntropyCanvas::IDataProvider
Section titled “EntropyCanvas::IDataProvider”IDataProvider - Abstract interface for scene data sources. More…
#include <IDataProvider.h>
Inherited by EntropyCanvas::CanvasClient
Public Types
Section titled “Public Types”| Name | |
|---|---|
| using std::function< void(const std::string &usdText)> | UsdSnapshotCallback |
| using std::function< void(const SceneSnapshot &)> | SnapshotCallback |
| using std::function< void(const PropertyDelta &)> | DeltaCallback |
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| virtual | ~IDataProvider() =default |
| virtual void | subscribeMaterial(const AssetId & materialId) =0 Subscribe to a material by its asset ID. |
| virtual void | setUsdSnapshotCallback(UsdSnapshotCallback callback) =0 Set the callback for receiving raw USD scene data. |
| virtual void | setDeltaCallback(DeltaCallback callback) =0 Set the callback for property delta updates. |
| virtual void | requestSnapshot(SnapshotCallback callback) =0 Request a full scene snapshot. |
| virtual bool | isConnected() const =0 Check if connected to the data source. |
| virtual uint32_t | getServerId() const =0 Get the server ID (for multi-server scenarios). |
Detailed Description
Section titled “Detailed Description”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
Public Types Documentation
Section titled “Public Types Documentation”using UsdSnapshotCallback
Section titled “using UsdSnapshotCallback”using EntropyCanvas::IDataProvider::UsdSnapshotCallback = std::function<void(const std::string& usdText)>;using SnapshotCallback
Section titled “using SnapshotCallback”using EntropyCanvas::IDataProvider::SnapshotCallback = std::function<void(const SceneSnapshot&)>;using DeltaCallback
Section titled “using DeltaCallback”using EntropyCanvas::IDataProvider::DeltaCallback = std::function<void(const PropertyDelta&)>;Public Functions Documentation
Section titled “Public Functions Documentation”function ~IDataProvider
Section titled “function ~IDataProvider”virtual ~IDataProvider() =defaultfunction subscribeMaterial
Section titled “function subscribeMaterial”virtual void subscribeMaterial( const AssetId & materialId) =0Subscribe to a material by its asset ID.
Reimplemented by: EntropyCanvas::CanvasClient::subscribeMaterial
This requests the server to send MaterialResolved with the material data.
function setUsdSnapshotCallback
Section titled “function setUsdSnapshotCallback”virtual void setUsdSnapshotCallback( UsdSnapshotCallback callback) =0Set 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).
function setDeltaCallback
Section titled “function setDeltaCallback”virtual void setDeltaCallback( DeltaCallback callback) =0Set the callback for property delta updates.
Reimplemented by: EntropyCanvas::CanvasClient::setDeltaCallback
This will be called whenever a property changes on the server.
function requestSnapshot
Section titled “function requestSnapshot”virtual void requestSnapshot( SnapshotCallback callback) =0Request a full scene snapshot.
Reimplemented by: EntropyCanvas::CanvasClient::requestSnapshot
The callback will be invoked when the snapshot is ready.
function isConnected
Section titled “function isConnected”virtual bool isConnected() const =0Check if connected to the data source.
Reimplemented by: EntropyCanvas::CanvasClient::isConnected
function getServerId
Section titled “function getServerId”virtual uint32_t getServerId() const =0Get the server ID (for multi-server scenarios).
Reimplemented by: EntropyCanvas::CanvasClient::getServerId
Updated on 2026-01-26 at 17:14:35 -0500