|
LuciadCPillar C# 2026.1.02
|
Model interface for projected imagery: single images, live video, and 360-degree panoramas.
More...
Public Member Functions | |
| void | AddObserver (IProjectedImageryModelObserver observer) |
| Registers an observer that will be notified of changes to this model. | |
| IList< ProjectedImagery > | GetProjections () |
| Returns the projections held by this model. | |
| ProjectionTileQueryResult | QueryTile (string projectionId, ProjectionTileCoordinate tile, CancellationToken cancellationToken) |
| Queries a single tile of a single projection. | |
| void | RemoveObserver (IProjectedImageryModelObserver observer) |
| Unregisters a previously added observer. | |
| Public Member Functions inherited from Luciad.Models.Model | |
| ModelMetadata | GetModelMetadata () |
| Returns the meta data for this model. | |
| Bounds | QueryBounds () |
| Returns the bounds of this model, if available. | |
Model interface for projected imagery: single images, live video, and 360-degree panoramas.
A model exposes a set of posed projections and serves their tiles on request. A single access pattern covers every case. The layer lists the projections, requests the tiles it needs, and reacts to change notifications:
IProjectedImageryModelObserver.OnImageryInvalidated. Implement this interface to supply projected imagery to a ProjectedImageryLayer, or obtain an implementation from a decoder.
Thread safety is the responsibility of the implementer. queryTile must be thread-safe: LuciadCPillar may call it from any thread. Typically, it will be called on a background thread for initial tile loads, and on the render thread when a projection is invalidated (see IProjectedImageryModelObserver.OnImageryInvalidated), for example for every video frame. It is also recommended to make addObserver / removeObserver thread-safe so that the layer can safely subscribe and unsubscribe from any thread.
Related article: Projecting images, video and panoramas onto the map
| void Luciad.Models.ProjectedImagery.IProjectedImageryModel.AddObserver | ( | IProjectedImageryModelObserver | observer | ) |
Registers an observer that will be notified of changes to this model.
| observer | the observer to add. Must not be null. |
Implemented in Luciad.Models.ProjectedImagery.PanoramaModel, and Luciad.Models.ProjectedImagery.ProjectedVideoModel.
| IList< ProjectedImagery > Luciad.Models.ProjectedImagery.IProjectedImageryModel.GetProjections | ( | ) |
Returns the projections held by this model.
Implemented in Luciad.Models.ProjectedImagery.PanoramaModel, and Luciad.Models.ProjectedImagery.ProjectedVideoModel.
| ProjectionTileQueryResult Luciad.Models.ProjectedImagery.IProjectedImageryModel.QueryTile | ( | string | projectionId, |
| ProjectionTileCoordinate | tile, | ||
| CancellationToken | cancellationToken ) |
Queries a single tile of a single projection.
This method must be thread-safe. It may be called on a background thread, for example for an initial tile load, but also on the render thread, for example when a projection is invalidated. A projection that fires IProjectedImageryModelObserver.OnImageryInvalidated must serve its tiles cheaply and synchronously. Honor the cancellation token for long-running work.
The possible outcomes are not interchangeable, because each one decides whether the tile is ever requested again:
| projectionId | the identifier of the projection, as returned by ProjectedImagery.Id. |
| tile | the coordinate of the requested tile. |
| cancellationToken | a token that signals when the result is no longer needed. |
| System.IO.IOException | when the tile could not be retrieved. |
Implemented in Luciad.Models.ProjectedImagery.PanoramaModel, and Luciad.Models.ProjectedImagery.ProjectedVideoModel.
| void Luciad.Models.ProjectedImagery.IProjectedImageryModel.RemoveObserver | ( | IProjectedImageryModelObserver | observer | ) |
Unregisters a previously added observer.
If the given observer was not previously added, this method has no effect.
| observer | the observer to remove. |
Implemented in Luciad.Models.ProjectedImagery.PanoramaModel, and Luciad.Models.ProjectedImagery.ProjectedVideoModel.