Class SceneView

  • All Implemented Interfaces:
    SceneViewNavigation, Styleable, EventTarget, Skinnable

    public final class SceneView
    extends GeoView
    implements SceneViewNavigation
    A SceneView renders data from an ArcGISScene in 3-dimensional space and allows users to interact with the scene. In an MVC architecture, a SceneView represents the view and an ArcGISScene represents the model. This class must only be created and used on the UI thread.
     ArcGISScene scene = new ArcGISScene(Basemap.createImagery());
     SceneView sceneView = new SceneView();
     sceneView.setArcGISScene(scene);
     
    Since:
    100.0.0
    See Also:
    ArcGISScene
    • Constructor Detail

      • SceneView

        public SceneView()
        Creates a new scene view
        Since:
        100.0.0
    • Method Detail

      • setArcGISScene

        public void setArcGISScene​(ArcGISScene scene)
        Sets the ArcGISScene to be displayed in this view. Null is allowed.
        Parameters:
        scene - the new ArcGISScene
        Since:
        100.0.0
      • getArcGISScene

        public ArcGISScene getArcGISScene()
        Gets the ArcGISScene displayed in this view.
        Returns:
        the ArcGISScene
        Since:
        100.0.0
      • setViewpointCameraAsync

        public ListenableFuture<Boolean> setViewpointCameraAsync​(Camera camera)
        Sets the viewpoint asynchronously, based on the given camera.
        Parameters:
        camera - the new viewpoint camera
        Returns:
        a ListenableFuture. Add a listener to this to know when the viewpoint has finished animating. The result of the future indicates if the operation completed successfully or not.
        Throws:
        IllegalArgumentException - if the camera is null
        Since:
        100.0.0
      • setViewpointCameraAsync

        public ListenableFuture<Boolean> setViewpointCameraAsync​(Camera camera,
                                                                 float durationSeconds)
        Sets the viewpoint camera asynchronously with a specified animation duration.
        Parameters:
        camera - the new viewpoint camera
        durationSeconds - the duration seconds
        Returns:
        a ListenableFuture. Add a listener to this to know when the viewpoint has finished animating. The result of the future indicates if the operation completed successfully or not.
        Throws:
        IllegalArgumentException - if the camera is null
        Since:
        100.0.0
      • getSpatialReference

        public SpatialReference getSpatialReference()
        Gets the spatial reference.
        Specified by:
        getSpatialReference in class GeoView
        Returns:
        the spatial reference, null if the ArcGISScene is null
        Since:
        100.0.0
      • setAmbientLightColor

        public void setAmbientLightColor​(int color)
        Sets the color of the ambient light.
        Parameters:
        color - the color of the ambient light, in 0xAARRGGBB format
        Since:
        100.0.0
      • getAmbientLightColor

        public int getAmbientLightColor()
        Returns the color of the ambient light. Default is 0.
        Returns:
        the color of the ambient light, in 0xAARRGGBB format
        Since:
        100.0.0
      • setAtmosphereEffect

        public void setAtmosphereEffect​(AtmosphereEffect atmosphereEffect)
        Sets the effect to be applied to the scene view's atmosphere.
        Parameters:
        atmosphereEffect - the atmosphere effect
        Throws:
        IllegalArgumentException - if atmosphereEffect is null
        Since:
        100.0.0
      • getAtmosphereEffect

        public AtmosphereEffect getAtmosphereEffect()
        Returns the atmosphere effect on the scene view. The default value is AtmosphereEffect.HORIZON_ONLY.
        Returns:
        the atmosphere effect on the scene view
        Since:
        100.0.0
      • getSunTime

        public Calendar getSunTime()
        Returns the time that indicates the position of the Sun. Default is Fri Sep 22 2000 12:00:00 GMT+0000.
        Returns:
        the time that indicates the position of the Sun
        Since:
        100.0.0
      • setSunLighting

        public void setSunLighting​(LightingMode lightingMode)
        Sets the type of sun lighting to be applied to the scene view. For example, this can be used to control whether the shadows of terrain and 3D models are cast.
        Parameters:
        lightingMode - the lighting mode to be applied for this scene view
        Throws:
        IllegalArgumentException - if lightingMode is null
        Since:
        100.0.0
        See Also:
        setSunTime(java.util.Calendar)
      • getSunLighting

        public LightingMode getSunLighting()
        Returns the type of Sun lighting applied to the scene view. Default is LightingMode.NO_LIGHT.
        Returns:
        the type of Sun lighting
        Since:
        100.0.0
      • screenToBaseSurface

        public Point screenToBaseSurface​(Point2D screenPoint)
        Returns the scene location of a screen point on the base surface i.e. ignoring any elevation.
        Specified by:
        screenToBaseSurface in interface SceneViewNavigation
        Parameters:
        screenPoint - the screen point
        Returns:
        the scene location on the base surface
        Throws:
        IllegalArgumentException - if screenPoint is null
        Since:
        100.0.0
      • screenToLocationAsync

        public ListenableFuture<Point> screenToLocationAsync​(Point2D screenPoint)
        This asynchronous method will wait for the next drawing cycle to get the exact point from the graphic card that is at this screen coordinate. That could be on the surface, on building or on a feature e.g.aircraft.
        Parameters:
        screenPoint - the screen point to use
        Returns:
        a ListenableFuture. Add a listener to this to know when the result is ready. The result of the future is the location of the screen point.
        Throws:
        IllegalArgumentException - if screenPoint is null
        Since:
        100.0.0
      • getCameraController

        public CameraController getCameraController()
        Gets the current camera controller. The default is an instance of GlobeCameraController.
        Returns:
        the current camera controller
        Since:
        100.1.0
      • getAnalysisOverlays

        public ListenableList<AnalysisOverlay> getAnalysisOverlays()
        Gets a modifiable list of the analysis overlays. Add or remove analysis overlays from this list to modify what is displayed. The list returned can be empty but not null. You can add listeners to this list to monitor changes to the list.

        An analysis overlay can only be in the list once.

        Returns:
        the analysis overlays
        Since:
        100.2.0