A scene is a container for layers. You use a scene together with a SceneView to display layers of geographic data in 3D. More...
Detailed DescriptionScene contains layers of mapping data and information such as elevation data, renderers, and labels which define the scene's capabilities. You can access Scene content directly or, more commonly, visualize the scene in a SceneView.
In an MVC architecture, Scene represents the model and SceneView represents the 3D view. Scene specifies how the geographic data is organized, and SceneView renders the data on the screen and allows users to interact with it.
Conceptually, a scene's geographic content is derived from its basemap and operational layers. The elevation is derived from the surface class, which contains ElevationSource.
A basemap provides a background of geographical context for the content you want to display in the scene. It is used for locational reference and provides a framework on which you can overlay operational layers. Thus, the basemap serves as a foundation and provides a framework for working with information geographically. Its content is typically geographic features that are static and do not change frequently, such as streets, parcel boundaries, or rivers.
Operational layers provide content that is of unique interest to the application and the task at hand. Their content might change frequently, such as earthquake reports, traffic, or weather.
If operational layers are added to an existing scene before the scene is loaded, then the scene's original list of operational layers is overridden to only contain the added layers. To keep the scene's original operational layers and also add new ones, wait until the scene is done loading before adding operational layers. You can wait for the doneLoading signal to be emitted before adding the new operational layers.
You can create a scene from an existing web scene using its URL or PortalItem. Alternatively, you can get a scene directly from a MobileScenePackage::scenes collection. Scene properties are hydrated when the scene is loaded.
The scene has a spatial reference which specifies how the geographic content from its basemap and operational layers are aligned when combined together.
If you create a new scene, the spatial reference of the first layer you add, which is typically the first layer in the Basemap, defines the spatial reference of the entire scene.
Once the scene has obtained a spatial reference it cannot be changed, even by changing the basemap.
Example:
Create a Scene with the World Imagery basemap and the World Elevation surface:
// Create a scene with the imagery basemap and world elevation surface m_sceneView = findChild<SceneQuickView*>("sceneView"); Scene* scene = new Scene(BasemapStyle::ArcGISImageryStandard, this); Surface* surface = new Surface(this); surface->elevationSources()->append(new ArcGISTiledElevationSource(QUrl("https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"), this)); scene->setBaseSurface(surface); // Create scene layer from the Brest, France scene server. ArcGISSceneLayer* sceneLayer = new ArcGISSceneLayer(QUrl("https://tiles.arcgis.com/tiles/P3ePLMYs2RVChkJx/arcgis/rest/services/Buildings_Brest/SceneServer"), this); scene->operationalLayers()->append(sceneLayer);
Relevant samples:
[explicit]
Scene::Scene(QObject *parent = nullptr)
Creates a scene.
See also GeoModel::load.
[explicit]
Scene::Scene(Esri::ArcGISRuntime::Basemap *basemap, QObject *parent = nullptr)
Creates a scene with a Basemap.
[explicit, since Esri::ArcGISRuntime 100.10]
Scene::Scene(Esri::ArcGISRuntime::BasemapStyle basemapStyle, QObject *parent = nullptr)
Creates a scene with a BasemapStyle.
This function was introduced in Esri::ArcGISRuntime 100.10.
[explicit, since Esri::ArcGISRuntime 100.3]
Scene::Scene(Esri::ArcGISRuntime::Item *item, QObject *parent = nullptr)
Creates a scene with a portal item of type PortalItemType::WebScene.
The PortalItem automatically loads when the Scene loads. If the loaded Item is not a portal item of type PortalItemType::WebScene, the scene fails to load.
This function was introduced in Esri::ArcGISRuntime 100.3.
[explicit, since Esri::ArcGISRuntime 100.2]
Scene::Scene(Esri::ArcGISRuntime::SceneViewTilingScheme sceneViewTilingScheme, QObject *parent = nullptr)
Creates a scene with a specific tiling scheme.
The tiling scheme determines which cached tiled services can render in the scene.
This function was introduced in Esri::ArcGISRuntime 100.2.
[explicit]
Scene::Scene(Esri::ArcGISRuntime::Surface *baseSurface, QObject *parent = nullptr)
Constructor that takes a baseSurface with an optional parent.
[explicit, since Esri::ArcGISRuntime 100.3]
Scene::Scene(const QUrl &url, QObject *parent = nullptr)
Creates a scene with the URL to a web scene.
If the specified URL is a portal item URL, the underlying PortalItem is created and can be accessed through item. The URL may be a direct URL to web scene JSON content or the URL of a portal item.
Examples of supported URL formats:
{PortalItem::PortalItem(const QUrl&, QObject*)}, {Esri::ArcGISRuntime::GeoModel::item} {GeoModel::item}
This function was introduced in Esri::ArcGISRuntime 100.3.
See also PortalItem and Esri::ArcGISRuntime::PortalItem::PortalItem(const QUrl&, QObject*).
[override virtual noexcept]
Scene::~Scene()
Destructor.
Esri::ArcGISRuntime::Surface *Scene::baseSurface() constReturns the base surface of the scene.
The base surface is the default surface on which layers are draped or from which relative layers are offset.
See also setBaseSurface().
[static, since Esri::ArcGISRuntime 100.3]
Esri::ArcGISRuntime::Scene *Scene::fromJson(const QString &json, QObject *parent = nullptr)
Creates this Scene from its JSON representation.
Returns a Scene created using the data in the json parameter and an optional parent.
This function was introduced in Esri::ArcGISRuntime 100.3.
[since Esri::ArcGISRuntime 100.2]
Esri::ArcGISRuntime::SceneViewTilingScheme Scene::sceneViewTilingScheme() const
Returns the tiling scheme defines how tile based data is rendered.
The tiling scheme property is used by the SceneView to determine how to render tiled data.
This property is determined during GeoModel::load. The SpatialReference of the first tiled elevation source (ArcGISTiledElevationSource) or tiled layer in the basemap or operational layer (see ArcGISTiledLayer) determines whether the value is SceneViewTilingScheme::Geographic or SceneViewTilingScheme::WebMercator.
If you create a new scene, you can set this value before adding the base surface, basemap or operational layers. The SceneViewTilingScheme must correspond to the SpatialReference of the layers to ensure they render correctly.
The default value is SceneViewTilingScheme::WebMercator.
This function was introduced in Esri::ArcGISRuntime 100.2.
See also SceneViewTilingScheme.
void Scene::setBaseSurface(Esri::ArcGISRuntime::Surface *surface)Sets the surface for the scene.
See also baseSurface().
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4