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

    A lighting type where the position of the light is set to simulate the sun's location. More...

    Header: #include <SunLighting.h>
    Since: Esri::ArcGISRuntime 300.0
    Inherits: Esri::ArcGISRuntime::SceneLighting

    Public Functions

    SunLighting(const QDateTime &simulatedDate, bool areDirectShadowsEnabled, QObject *parent = nullptr)
    virtual ~SunLighting() override
    Esri::ArcGISRuntime::TimeZoneOffset *displayTimeZone() const
    void setSimulatedDate(const QDateTime &simulatedDate)
    QDateTime simulatedDate() const

    Detailed Description

    Relevant samples:

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

    See also SceneEnvironment.

    Member Function Documentation

    SunLighting::SunLighting(const QDateTime &simulatedDate, bool areDirectShadowsEnabled, QObject *parent = nullptr)

    Creates a sun lighting for lighting a scene.

    • simulatedDate - The current date and time of the simulated sun in UTC.
    • areDirectShadowsEnabled - true if shadows cast by the sun are shown, false otherwise.
    • parent - The optional parent QObject.

    Shadows cast by the terrain are not supported. Enabling shadows can impact rendering performance, depending on the amount of data in the scene.

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

    Destructor.

    Esri::ArcGISRuntime::TimeZoneOffset *SunLighting::displayTimeZone() const

    Returns the preferred time zone authored with the web scene.

    This offset is not applied to the simulatedDate property. The offset can be used to adjust the date to the preferred time zone in the UI. If the offset is nullptr, then no preferred time zone was defined for the web scene, and the user can adjust the date to the time zone of their choice.

    void SunLighting::setSimulatedDate(const QDateTime &simulatedDate)

    Sets the simulatedDate to simulatedDate.

    See also simulatedDate.

    QDateTime SunLighting::simulatedDate() const

    Returns the current date and time of the simulated sun in UTC.

    See also setSimulatedDate().

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