Skip to content
  • SceneEnvironment
  • class Esri::ArcGISRuntime::SceneEnvironment

    The settings that affect the environment in which a scene is displayed. More...

    Header: #include <SceneEnvironment.h>
    Since: Esri::ArcGISRuntime 300.0
    Inherits: Esri::ArcGISRuntime::Object

    Public Functions

    SceneEnvironment(QObject *parent = nullptr)
    SceneEnvironment(bool isAtmosphereEnabled, bool areStarsEnabled, Esri::ArcGISRuntime::SceneLighting *lighting, const QColor &backgroundColor, QObject *parent = nullptr)
    virtual ~SceneEnvironment() override
    bool areStarsEnabled() const
    QColor backgroundColor() const
    bool isAtmosphereEnabled() const
    Esri::ArcGISRuntime::SceneLighting *lighting() const
    void setAtmosphereEnabled(bool atmosphereEnabled)
    void setBackgroundColor(const QColor &backgroundColor)
    void setLighting(Esri::ArcGISRuntime::SceneLighting *lighting)
    void setStarsEnabled(bool areStarsEnabled)

    Detailed Description

    This includes rendering of the atmosphere effect, stars, and background color. If all three of these effects are set, they are rendered in the following order: background color, stars, then atmosphere.

    Some scene environment effects will change depending on the position of the camera relative to the surface. Atmosphere effect is disabled when too far from the surface. Lighting and shadows are most accurate when closer to the surface and are disabled further from the surface.

    Relevant samples:

    • Configure scene environment: Configure the environment settings in a local scene to change the lighting conditions and background appearance.

    See also Scene::environment.

    Member Function Documentation

    [explicit] SceneEnvironment::SceneEnvironment(QObject *parent = nullptr)

    Creates a default environment object.

    • parent - The optional parent QObject.

    The defaults are: opaque black background, VirtualLighting lighting, and atmosphere and stars enabled.

    SceneEnvironment::SceneEnvironment(bool isAtmosphereEnabled, bool areStarsEnabled, Esri::ArcGISRuntime::SceneLighting *lighting, const QColor &backgroundColor, QObject *parent = nullptr)

    Creates an environment object.

    • isAtmosphereEnabled - true if the atmosphere should be visualized, false otherwise. This includes sky and haze effects.
    • areStarsEnabled - true if stars should be visualized, false otherwise.
    • lighting - The lighting object containing information on how the scene is lit.
    • backgroundColor - The background color displayed behind any scene objects.
    • parent - The optional parent QObject.

    [override virtual noexcept] SceneEnvironment::~SceneEnvironment()

    Destructor.

    bool SceneEnvironment::areStarsEnabled() const

    Returns true if stars should be visualized, false otherwise.

    QColor SceneEnvironment::backgroundColor() const

    Returns the color of the background that is displayed behind any scene objects.

    See also setBackgroundColor().

    bool SceneEnvironment::isAtmosphereEnabled() const

    Returns true if the atmosphere should be visualized, false otherwise. This includes sky and haze effects.

    Esri::ArcGISRuntime::SceneLighting *SceneEnvironment::lighting() const

    Returns the lighting object that controls how the scene is lit.

    See also setLighting().

    void SceneEnvironment::setAtmosphereEnabled(bool atmosphereEnabled)

    Sets the atmosphereEnabled to atmosphereEnabled.

    See also isAtmosphereEnabled.

    void SceneEnvironment::setBackgroundColor(const QColor &backgroundColor)

    Sets the backgroundColor to backgroundColor.

    See also backgroundColor.

    void SceneEnvironment::setLighting(Esri::ArcGISRuntime::SceneLighting *lighting)

    Sets the lighting to lighting.

    See also lighting.

    void SceneEnvironment::setStarsEnabled(bool areStarsEnabled)

    Sets the areStarsEnabled to areStarsEnabled.

    See also areStarsEnabled.

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