Skip To Content ArcGIS for Developers Sign In Dashboard

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.6
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)

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

    // create a scene...scene is a default property of sceneview
    // and thus will get added to the sceneview
    Scene {
        // add a basemap
        BasemapImagery {}

        // 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"
            }
        }
    }

    Component.onCompleted: {
        // set viewpoint to the specified camera
        setViewpointCameraAndWait(camera);
    }
}

See also Cancelable, Scene, and GeoView.

Property Documentation

ambientLightColor : color

The ambient light color for the scene view.

This QML property was introduced in Esri.ArcGISRuntime 100.1.


[default] analysisOverlays : AnalysisOverlayListModel

Gets the AnalysisOverlayListModel for this SceneView.

This QML 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 QML 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 QML property was introduced in Esri.ArcGISRuntime 100.6.


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 QML property was introduced in Esri.ArcGISRuntime 100.6.

See also renderFrame.


[default] scene : Scene

The Scene containing the layers to be rendered on the scene view.


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 QML 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 QML 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 QML property was introduced in Esri.ArcGISRuntime 100.1.


Signal Documentation

ambientLightColorChanged()

Emitted when the ambientLightColor property changes.


atmosphereEffectChanged()

Emitted when the atmosphereEffect property for the scene view changes.


cameraControllerChanged()

Emitted when the cameraController property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.1.


currentViewpointCameraChanged()

Emitted when the currentViewpointCamera property changes.


fieldOfViewChanged()

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

This QML signal was introduced in Esri.ArcGISRuntime 100.6.


fieldOfViewDistortionRatioChanged()

Emitted when the functions setFieldOfViewAndDistortionRatio or setFieldOfViewFromLensIntrinsics are called.

This QML signal was introduced in Esri.ArcGISRuntime 100.6.


manualRenderingChanged()

Emitted when the manualRendering property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.6.


sceneChanged()

Emitted when the scene for the scene view changes.


sceneHeightChanged()

Emitted when the sceneHeight property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.4.


sceneWidthChanged()

Emitted when the sceneWidth property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.4.


screenToLocationCompleted(Point location)

Emitted when the screenToLocation operation has finished.

  • location - The location on the scene view.

setViewpointCameraCompleted(bool succeeded)

Emitted when any of the setViewpointCamera functions have finished.

  • succeeded - Whether the viewpoint camera was successfully set.

spaceEffectChanged()

Emitted when the spaceEffect property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.6.


sunLightingChanged()

Emitted when the sunLighting property changes.


sunTimeChanged()

Emitted when the sunTime property changes.


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 QML 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)

Converts screenX and screenY screen coordinates to a Point in scene view coordinates asynchronously.

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 QML 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 QML 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.


Feedback on this topic?