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

    A layer that may be used to visualize building models exported from Building Information Modeling (BIM) projects. More...

    Header: #include <BuildingSceneLayer.h>
    Since: Esri::ArcGISRuntime 300.0
    Inherits: Esri::ArcGISRuntime::Layer and Esri::ArcGISRuntime::ApiKeyResource

    Public Functions

    BuildingSceneLayer(Esri::ArcGISRuntime::PortalItem *portalItem, QObject *parent = nullptr)
    BuildingSceneLayer(const QUrl &url, QObject *parent = nullptr)
    virtual ~BuildingSceneLayer() override
    Esri::ArcGISRuntime::BuildingFilter *activeFilter() const
    double altitudeOffset() const
    QFuture<QMap<QString, Esri::ArcGISRuntime::BuildingSceneLayerAttributeStatistics *>> fetchStatisticsAsync(QObject *parent = nullptr)
    Esri::ArcGISRuntime::BuildingFilterListModel *filters() const
    bool isShowChildrenInLegend() const
    void setActiveFilter(Esri::ArcGISRuntime::BuildingFilter *activeFilter)
    void setAltitudeOffset(double altitudeOffset)
    void setShowChildrenInLegend(bool showChildrenInLegend)
    Esri::ArcGISRuntime::BuildingSublayerListModel *sublayers() const
    QUrl url() const

    Reimplemented Public Functions

    virtual QString apiKey() const override
    virtual void setApiKey(const QString &apiKey) override

    Detailed Description

    This layer is used to visualize and interact with 3D building models developed using Building Information Modeling tools. The data in a building scene layer may represent building features such as walls, light fixtures, mechanical ductwork, and so forth. This layer is supported when used with LocalSceneView.

    The data in a BuildingSceneLayer is organized into a hierarchy of BuildingSublayer. The sublayers of the building scene layer are a Full Model sublayer, which contains all building components, organized into a hierarchy of sublayers, grouped by discipline (such as Architectural, Mechanical, or Structural). The building scene layer may also contain an Overview sublayer, which may be loaded to display the exterior shell of the building. The Overview sublayer provides a means to quickly visualize a building's exterior, in cases where visualization of interior features is not required. Sublayers are available through LayerContent::subLayerContents.

    Due to its complexity, the data in this layer is organized using BuildingGroupSublayer, which contains BuildingComponentSublayer. Often, the building scene layer contains an Overview BuildingComponentSublayer that can be loaded to display the exterior shell of a building. This provides a preview of the entire building without loading all interior features. This layer might also contain a Full Model building group sublayer with all the features in a building grouped by disciplines. Each discipline is a building group sublayer containing building component sublayers with features such as rooftops, walls, doors, AC units, lighting fixtures, columns, or foundations.

    Building scene layers always have a SurfacePlacement mode of absolute.

    Relevant samples:

    • Add building scene layer: Add a layer to a local scene to visualize and interact with 3D building models developed using Building Information Modeling (BIM) tools.
    • Filter building scene layer: Explore details of a building scene by using filters and sublayer visibility.

    See also Layer.

    Member Function Documentation

    [explicit] BuildingSceneLayer::BuildingSceneLayer(Esri::ArcGISRuntime::PortalItem *portalItem, QObject *parent = nullptr)

    Creates a building scene layer object with a portal item.

    • portalItem - The building scene layer portal item (only PortalItem are supported).
    • parent - The optional parent QObject.

    See also PortalItem.

    [explicit] BuildingSceneLayer::BuildingSceneLayer(const QUrl &url, QObject *parent = nullptr)

    Creates a building scene layer object with the URL.

    • url - The URL to a service, scene layer package, or portal item.
    • parent - The optional parent QObject.

    If the specified URL is a portal item URL (see PortalItem::PortalItem(const QUrl&, QObject*) for the supported URL formats), the underlying PortalItem will be created and accessible through Layer::item.

    See also PortalItem, PortalItem::PortalItem(const QUrl&, QObject*), and Layer::item.

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

    Destructor.

    Esri::ArcGISRuntime::BuildingFilter *BuildingSceneLayer::activeFilter() const

    Returns the active filter to apply to this layer.

    If no active filter is set, then no filter is applied. The active filter is not applied to an Overview BuildingComponentSublayer.

    See also setActiveFilter().

    double BuildingSceneLayer::altitudeOffset() const

    Returns the layer altitude offset.

    This raises or lowers all features in this layer by the given offset. The value is in meters.

    See also setAltitudeOffset().

    [override virtual] QString BuildingSceneLayer::apiKey() const

    Reimplements: ApiKeyResource::apiKey() const.

    Returns the API key allows your app to access ArcGIS location services and private portal items.

    An API key is a unique long-lived access token that is used to authenticate and monitor requests to ArcGIS location services and private portal items. You can create and manage an API key using your portal when you sign in with an ArcGIS Location Platform account or an ArcGIS Online account with administrator access or a custom role that has the `Generate API keys` privilege. To learn how to create and manage API keys, go to the Create an API Key tutorial. You must ensure that your API key has the correct privileges to access secure resources.

    Note: An API key created with a referrer is not supported. If you need service requests to include the referrer, use the SDK's functionality to intercept the request and add an HTTP referer header.

    In addition to setting an ArcGISRuntimeEnvironment::apiKey at a global level for your application, you can set it on any class that implements ApiKeyResource. This overrides the ArcGISRuntimeEnvironment::apiKey and enables more granular usage telemetry and management of ArcGIS location resources used by your app.

    Classes that expose an API key property by implementing ApiKeyResource include:

    For more information, see API key authentication and Types of authentication.

    See also setApiKey().

    QFuture<QMap<QString, Esri::ArcGISRuntime::BuildingSceneLayerAttributeStatistics *>> BuildingSceneLayer::fetchStatisticsAsync(QObject *parent = nullptr)

    Fetches available statistics for each attribute defined in this layer. Statistics are stored as a dictionary of key-value pairs, with each key being the attribute's name, and the associated value being a set of relevant statistics.

    There will be an error if fetching statistics is unsuccessful.

    • parent - The optional parent QObject.

    This method returns a QFuture for the asynchronous operation. Use future.then() to continue processing when the operation completes. Use future.onFailed() to handle exceptions of type ErrorException.

    See Working with QFuture for further details.

    See Internal data structures with case-insensitive string keys for further details.

    See also BuildingSceneLayerAttributeStatistics.

    Esri::ArcGISRuntime::BuildingFilterListModel *BuildingSceneLayer::filters() const

    Returns a collection of all available filters, including those that were pre-authored from the service or package.

    To enable a building filter on a layer, specify a activeFilter.

    bool BuildingSceneLayer::isShowChildrenInLegend() const

    Returns true if the child layers should be shown in the map legend, false otherwise.

    void BuildingSceneLayer::setActiveFilter(Esri::ArcGISRuntime::BuildingFilter *activeFilter)

    Sets the activeFilter to activeFilter.

    See also activeFilter.

    void BuildingSceneLayer::setAltitudeOffset(double altitudeOffset)

    Sets the altitudeOffset to altitudeOffset.

    See also altitudeOffset.

    [override virtual] void BuildingSceneLayer::setApiKey(const QString &apiKey)

    Reimplements: ApiKeyResource::setApiKey(const QString &apiKey).

    Sets the API key to apiKey.

    See ApiKeyResource.

    See also apiKey.

    void BuildingSceneLayer::setShowChildrenInLegend(bool showChildrenInLegend)

    Sets the showChildrenInLegend to showChildrenInLegend.

    See also isShowChildrenInLegend.

    Esri::ArcGISRuntime::BuildingSublayerListModel *BuildingSceneLayer::sublayers() const

    Returns the hierarchical collection of sublayers in this layer.

    It usually contains an Overview BuildingComponentSublayer and a Full Model BuildingGroupSublayer. However, some building scene layers may contain only the Full Model BuildingGroupSublayer or the discipline building group sublayers directly inside the layer.

    QUrl BuildingSceneLayer::url() const

    Returns the URL of the building scene layer.

    See also BuildingSceneLayer(const QUrl&, QObject*).

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