DistanceCompositeSceneSymbol Class

  • DistanceCompositeSceneSymbol
  • class Esri::ArcGISRuntime::DistanceCompositeSceneSymbol

    A dynamic composite 3D symbol that changes symbology according to the distance to the camera. More...

    Header: #include <DistanceCompositeSceneSymbol.h>
    Since: Esri::ArcGISRuntime 100.0
    Inherits: Esri::ArcGISRuntime::Symbol

    This class was introduced in Esri::ArcGISRuntime 100.0.

    Public Functions

    DistanceCompositeSceneSymbol(QObject *parent = nullptr)
    virtual ~DistanceCompositeSceneSymbol() override
    Esri::ArcGISRuntime::DistanceSymbolRangeListModel *ranges() const

    Detailed Description

    Sometimes it is useful to display a single feature (or graphic) using symbology that changes depending upon how far away it is from the Camera. DistanceCompositeSceneSymbol, a type of Symbol, provides this capability in a 3D SceneView.

    The DistanceCompositeSceneSymbol contains a list of symbols, each with a distance range at which the symbol is appropriately viewed. To create and populate a DistanceCompositeSceneSymbol, create it using the constructor, then create DistanceSymbolRange objects and append them to ranges. Because ranges is a DistanceSymbolRangeListModel that inherits from QAbstractListModel, you can use it with other Qt Framework classes, such as using it with a QListView to display its content.

    A common use for DistanceCompositeSceneSymbol is to display features with increasing visual meaning or detail as the camera gets closer. A aircraft in flight at a great distance could be represented as a point feature, at mid-distance as a cone whose point is oriented toward the direction of flight, or as a detailed 3D aircraft model at close distances. In this scenario, you could define a simple point symbol for distances from 1,000,000 to 60,000 meters, a 3D cone symbol for 59,999 to 5,000 meters, and a 3D model symbol of an aircraft for 4,999 to 0 meters.

    You can use varied combinations of symbols with overlapping ranges to create composite symbols whose elements appear and disappear independently as camera distance changes. Composite symbols can provide more information about close-by feature while avoiding clutter caused by displaying the additional information for far-away features. You could expand our previous example by appending to ranges a DistanceSymbolRange object with a text symbol showing the aircraft tail number. By setting the distance range for this text symbol to 40,000 to 0 meters, the label would display with the cone symbol at some camera distances (40,000 to 5,000 meters) and always display with the model symbol. The tail number would not display at all beyond 40,000 meters.

    Example:

    Create a DistanceCompositeSceneSymbol that consists of a SimpleMarkerSymbol, a SimpleMarkerSceneSymbol, and a ModelSceneSymbol.

    DistanceSymbolRange* dsrModel = new DistanceSymbolRange(mms, 0, 999, this); // ModelSceneSymbol
    DistanceSymbolRange* dsrCone = new DistanceSymbolRange(smss, 1000, 1999, this); // SimpleMarkerSceneSymbol
    DistanceSymbolRange* dsrCircle = new DistanceSymbolRange(sms, 2000, 0, this); // SimpleMarkerSymbol
    
    DistanceCompositeSceneSymbol* compositeSceneSymbol = new DistanceCompositeSceneSymbol(this);
    
    compositeSceneSymbol->ranges()->append(dsrModel);
    compositeSceneSymbol->ranges()->append(dsrCone);
    compositeSceneSymbol->ranges()->append(dsrCircle);

    Member Function Documentation

    DistanceCompositeSceneSymbol::DistanceCompositeSceneSymbol(QObject *parent = nullptr)

    Constructor with an optional parent.

    [override virtual] DistanceCompositeSceneSymbol::~DistanceCompositeSceneSymbol()

    Destructor.

    Esri::ArcGISRuntime::DistanceSymbolRangeListModel *DistanceCompositeSceneSymbol::ranges() const

    Returns a list model containing the symbol/range combinations in this object.

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