SceneView QML Type

A SceneView that renders data in a scene and allows users to interact with the scene. More...

Import Statement: import Esri.ArcGISRuntime 100.15
Since: Esri.ArcGISRuntime 100.0
Inherits:

GeoView

Properties

Signals

Methods

Detailed Description

A SceneView renders data in a 3D scene and allows users to interact with the scene. In an MVC architecture, a SceneView represents the view and a Scene represents the model.

This QML type supports the following default properties. A default property may be declared inside another declared object without being assigned explicitly to a property.

TypeDefault Property
Scenescene
AnalysisOverlayanalysisOverlays (appends to model)
ImageOverlayimageOverlays (appends to model)

Refer to the GeoView documentation for any additional default properties.

Example:

Display a Scene with the World Imagery basemap and the World Elevation surface in a SceneView:

// Create a scene view
SceneView {
    anchors.fill: parent

    Component.onCompleted: {
        // Set the focus on SceneView to initially enable keyboard navigation
        forceActiveFocus();

        // set viewpoint to the specified camera
        setViewpointCameraAndWait(camera);
    }

    // create a scene...scene is a default property of sceneview
    // and thus will get added to the sceneview
    Scene {
        // add a basemap
        Basemap {
            initStyle: Enums.BasemapStyleArcGISImagery
        }

        // add a surface...surface is a default property of scene
        Surface {
            // add an arcgis tiled elevation source...elevation source is a default property of surface
            ArcGISTiledElevationSource {
                url: "https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"
            }
        }
    }
}

See also Cancelable, Scene, and GeoView.

Property Documentation

ambientLightColor : color

The ambient light color for the scene view.

This property was introduced in Esri.ArcGISRuntime 100.1.


[default] analysisOverlays : AnalysisOverlayListModel

Gets the AnalysisOverlayListModel for this SceneView.

This property was introduced in Esri.ArcGISRuntime 100.2.


atmosphereEffect : Enums.AtmosphereEffect

The atmosphere effect for the scene view.

See also Enums.AtmosphereEffect.


cameraController : CameraController

The camera controller for the scene view.

The Camera determines at what position and angle the scene is viewed.


currentViewpointCamera : Camera

Returns the current viewpoint camera for the scene view (read-only).

The Camera determines at what position and angle the scene is viewed.


fieldOfView : double

The field of view on the scene view in degrees to angle.

This value must be between 0 and 120.

The default value is 45.0.

This property was introduced in Esri.ArcGISRuntime 100.6.


fieldOfViewDistortionRatio : double

The distortion factor determines how much the vertical field of view is distorted.

A distortion factor less than 1.0 will cause the visuals to be stretched taller in comparison to their width. A distortion factor greater than 1.0 will cause the visuals to be shrunk shorter in comparison to their width.

the default value is 1.0.

This property was introduced in Esri.ArcGISRuntime 100.6.


imageOverlays : ImageOverlayListModel

A collection of overlays for displaying images in the scene view.

A collection of overlays for displaying images in the scene view.

An image overlay collection cannot belong to more that one SceneView. If the collection contains multiple image overlays, they display in the order in which they were added to the collection.

So the first overlay in the collection (at index 0) displays at the bottom and each one that follows displays on top of the previous ones.

If the SceneView also has a GraphicsOverlay, it displays on top of the ImageOverlay.

This property was introduced in Esri.ArcGISRuntime 100.8.


manualRendering : bool

Whether the SceneView is under manual rendering control.

Note: manual rendering is only supported on iOS and Android platforms.

This property determines whether the SceneView will use manual rendering updates rather than the using the ArcGIS Runtime internal rendering mechanism.

When this property is true, you must call renderFrame for any updates to be drawn on the screen. Calling renderFrame isn't necessary when this property is false. The default value is false.

This property was introduced in Esri.ArcGISRuntime 100.6.

See also renderFrame.


[default] scene : Scene

The scene that is currently set to the scene view.

Setting a non-loaded scene to a view starts the load process of the scene so the scene can be displayed once loaded.


spaceEffect : Enums.SpaceEffect

The space effect for the scene view.

Determines whether outer space is black with stars or transparent in the scene view.

The default value is Enums.SpaceEffectStars.

This property was introduced in Esri.ArcGISRuntime 100.6.

See also Enums.SpaceEffect.


sunLighting : Enums.LightingMode

The lighting mode for the scene view.

The lighting mode determines whether the Earth appears to be illuminated by the Sun, and whether to simulate shadows. For example, this can be used to control whether the shadows of terrain and 3D models are cast.

This property was introduced in Esri.ArcGISRuntime 100.1.

See also Enums.LightingMode.


sunTime : DateTime

The time used to simulate the Sun's position.

You can simulate the Sun's position relative to the Earth to be as it would at a specific date and time.

The default time of the simulation is September 22, 2000 at noon GMT.

This property was introduced in Esri.ArcGISRuntime 100.1.


Signal Documentation

ambientLightColorChanged()

Emitted when the ambientLightColor property changes.

Note: The corresponding handler is onAmbientLightColorChanged.


atmosphereEffectChanged()

Emitted when the atmosphereEffect property for the scene view changes.

Note: The corresponding handler is onAtmosphereEffectChanged.


cameraControllerChanged()

Emitted when the cameraController property changes.

Note: The corresponding handler is onCameraControllerChanged.

This signal was introduced in Esri.ArcGISRuntime 100.1.


currentViewpointCameraChanged()

Emitted when the currentViewpointCamera property changes.

Note: The corresponding handler is onCurrentViewpointCameraChanged.


fieldOfViewChanged()

Emitted when the fieldOfView property changes or when the functions setFieldOfViewAndDistortionRatio or setFieldOfViewFromLensIntrinsics are called.

Note: The corresponding handler is onFieldOfViewChanged.

This signal was introduced in Esri.ArcGISRuntime 100.6.


fieldOfViewDistortionRatioChanged()

Emitted when the functions setFieldOfViewAndDistortionRatio or setFieldOfViewFromLensIntrinsics are called.

Note: The corresponding handler is onFieldOfViewDistortionRatioChanged.

This signal was introduced in Esri.ArcGISRuntime 100.6.


imageOverlaysChanged()

Emitted when the imageOverlays property changes.

Note: The corresponding handler is onImageOverlaysChanged.

This signal was introduced in Esri.ArcGISRuntime 100.8.


manualRenderingChanged()

Emitted when the manualRendering property changes.

Note: The corresponding handler is onManualRenderingChanged.

This signal was introduced in Esri.ArcGISRuntime 100.6.


sceneChanged()

Emitted when the scene for the scene view changes.

Note: The corresponding handler is onSceneChanged.


screenToLocationCompleted(Point location)

Emitted when the screenToLocation operation has finished.

  • location - The location on the scene view.

Note: The corresponding handler is onScreenToLocationCompleted.


setViewpointCameraCompleted(bool succeeded)

Emitted when any of the setViewpointCamera functions have finished.

  • succeeded - Whether the viewpoint camera was successfully set.

Note: The corresponding handler is onSetViewpointCameraCompleted.


spaceEffectChanged()

Emitted when the spaceEffect property changes.

Note: The corresponding handler is onSpaceEffectChanged.

This signal was introduced in Esri.ArcGISRuntime 100.6.


sunLightingChanged()

Emitted when the sunLighting property changes.

Note: The corresponding handler is onSunLightingChanged.


sunTimeChanged()

Emitted when the sunTime property changes.

Note: The corresponding handler is onSunTimeChanged.


Method Documentation

LocationToScreenResult locationToScreen(Point scenePoint)

Returns a LocationToScreenResult from the provided scenePoint.


void renderFrame()

Manually render the current frame.

Note: manual rendering (along with this method) is only supported on iOS and Android platforms.

This call will block the caller until the latest changes have been rendered to the screen.

This method may be called from any thread.

In certain situations you may be able to achieve better rendering performance by utilizing the single-threaded renderer. This is already the default setting on some platforms.

// use the environment variable to use the "basic" rendering loop
// for the Qt Quick Scene Graph
// this C++ call should be placed in your startup code (probably main.cpp) as early
// as possible
qputenv("QSG_RENDER_LOOP", "basic");

For more information, see here https://links.esri.com/qtquick-visualcanvas-scenegraph-rendering

This method was introduced in Esri.ArcGISRuntime 100.6.

See also manualRendering.


Point screenToBaseSurface(double screenX, double screenY)

Returns the x/y location on the map that corresponds to the provided screen coordinates.

  • screenX - The x screen coordinate.
  • screenY - The y screen coordinate.

This method gets the x/y coordinates on the base surface that would be seen at the screen coordinates without regard for any features in the scene. Any features in the line of sight from the camera to the base surface are ignored. To convert this result into a 3D scene location, use the returned x/y coordinates with the z-value at that x/y location on the base surface.


string screenToLocation(double screenX, double screenY)

Asynchronously converts a screenX and screenY screen coordinates to location coordinates in the spatial reference of the scene view.

This method will wait for the next drawing cycle to get the exact point from the graphics card that is at the screen coordinate supplied. This location could be on the surface, a building, or a feature.

Note: This operation could return a null point (clicked outside the earth).

Returns a task ID that can be used to cancel the screenToLocation task.

See also Cancelable.


void setFieldOfViewAndDistortionRatio(double angle, double distortionRatio)

Sets the angle and the distortion factor.

Set the field of view on the scene view in degrees and determines how much the vertical field of view is distorted. A distortion factor of 1.0 is default. A distortion factor less than 1.0 will cause the visuals to be stretched taller in comparison to their width. A distortion factor greater than 1.0 will cause the visuals to be shrunk shorter in comparison to their width.

  • angle - The field of view on the scene view in degrees. This value must be between 0 and 120.
  • distortionRatio - The field of view vertical distortion ratio. This value must be between 0.1 and 10.

This method was introduced in Esri.ArcGISRuntime 100.6.


void setFieldOfViewFromLensIntrinsics(double xFocalLength, double yFocalLength, double xPrincipal, double yPrincipal, double xImageSize, double yImageSize, DeviceOrientation deviceOrientation)

Sets the field of view of a camera lens using the lens characteristics.

Allows for matching the field of view of the scene view to the field of view of a camera lens using the lens characteristics.

  • xFocalLength - The pixel focal length along the x axis. The units are in pixels. xFocal and yFocal should be identical for square pixels.
  • yFocalLength - The pixel focal length along the y axis. The units are in pixels. xFocal and yFocal should be identical for square pixels.
  • xPrincipal - The distance along the x axis between the principal point and the top-left corner of the image frame. The units are in pixels.
  • yPrincipal - The distance along the y axis between the principal point and the top-left corner of the image frame. The units are in pixels.
  • xImageSize - The x value of the image size captured by the camera. The units are in pixels.
  • yImageSize - The y value of the image size captured by the camera. The units are in pixels.
  • deviceOrientation - Describes the orientation of the device.

This method was introduced in Esri.ArcGISRuntime 100.6.


string setViewpointCamera(Camera camera)

Sets the viewpoint camera for the scene view.

The Camera determines at what position and angle the scene is viewed.

  • camera - The Camera to set for the scene view.

Returns a task ID that can be used to cancel the setViewpointCamera task.

See also Cancelable.


string setViewpointCameraAndSeconds(Camera camera, real durationSeconds)

Sets the viewpoint camera for the scene view with animation duration.

The Camera determines at what position and angle the scene is viewed.

  • camera - The Camera to set for the scene view.
  • durationSeconds - The number of seconds for the animation to run from beginning to end.

Returns a task ID that can be used to cancel the setViewpointCameraAndSeconds task.

See also Cancelable.


void setViewpointCameraAndWait(Camera camera)

Synchronously sets the viewpoint camera for the scene view.

The Camera determines at what position and angle the scene is viewed.

  • camera - The Camera to set for the scene view.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.