<commit_before>// [WriteFile Name=Animate3DSamples, Category=Scenes]
// [Legal]
// Copyright 2016 Esri.

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0

// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// [Legal]

import QtQuick 2.6
import QtQuick.Controls 1.4
import QtQuick.Extras 1.4
import Esri.ArcGISRuntime 100.0
import Esri.ArcGISExtras 1.1

Rectangle {
    id: rootRectangle
    clip: true

    width: 800
    height: 600

    property real scaleFactor: System.displayScaleFactor
    property url dataPath: System.resolvedPath(System.userHomePath) +  "/ArcGIS/Runtime/Data/3D"

    property int missionSize: currentMissionModel.count
    property bool missionReady: missionSize > 0
    property alias following: followButton.checked

    property string headingAtt: "HEADING";
    property string pitchAtt: "PITCH";
    property string rollAtt: "ROLL";
    property string angleAtt: "ANGLE";

    /**
     * Create SceneView that contains a Scene with the Imagery Basemap
     */

    // Create a scene view
    SceneView {
        id: sceneView
        anchors.fill: parent

        // create a scene...scene is a default property of sceneview
        // and thus will get added to the sceneview
        Scene {
            // add a basemap
            BasemapImagery {}

            // add a surface...surface is a default property of scene
            Surface {
                // add an arcgis tiled elevation source...elevation source is a default property of surface
                ArcGISTiledElevationSource {
                    url: "http://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"
                }
            }

            onLoadStatusChanged: {
                if (loadStatus !== Enums.LoadStatusLoaded)
                    return;

                graphic3d.attributes.insertAttribute(headingAtt, 0.0);
                graphic3d.attributes.insertAttribute(pitchAtt, 0.0);
                graphic3d.attributes.insertAttribute(rollAtt, 0.0);
            }
        }

        GraphicsOverlay {
            id: sceneOverlay

            LayerSceneProperties {
                surfacePlacement: Enums.SurfacePlacementAbsolute
            }

            SimpleRenderer {
                id: sceneRenderer
                RendererSceneProperties {
                    id: renderProps
                    headingExpression: headingAtt
                    pitchExpression: pitchAtt
                    rollExpression: rollAtt
                }
            }

            Graphic {
                id: graphic3d

                SimpleMarkerSceneSymbol {
                    id: coneSymbol
                    style: Enums.SimpleMarkerSceneSymbolStyleCone
                    color: "blue"
                    height: 75
                    width: 75
                    anchorPosition: Enums.SceneSymbolAnchorPositionBottom
                }

//                ModelSceneSymbol {
//                    id: mms
//                    url: dataPath + "/SkyCrane/SkyCrane.lwo"
//                    scale: 0.01
//                    heading: 180
//                }
            }
        }

        MouseArea {
            anchors.fill: parent
            onPressed: mouse.accepted = followButton.checked
            onWheel: wheel.accepted = followButton.checked
        }
    }

    ListModel {
        id: missionsModel
        ListElement{ name: "Grand Canyon"}
        ListElement{ name: "Hawaii"}
        ListElement{ name: "Pyrenees"}
        ListElement{ name: "Snowdon"}
    }

    ListModel {
        id: currentMissionModel
    }
<commit_msg>declaratively set attributes for graphic<commit_after>// [WriteFile Name=Animate3DSamples, Category=Scenes]
// [Legal]
// Copyright 2016 Esri.

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0

// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// [Legal]

import QtQuick 2.6
import QtQuick.Controls 1.4
import QtQuick.Extras 1.4
import Esri.ArcGISRuntime 100.0
import Esri.ArcGISExtras 1.1

Rectangle {
    id: rootRectangle
    clip: true

    width: 800
    height: 600

    property real scaleFactor: System.displayScaleFactor
    property url dataPath: System.resolvedPath(System.userHomePath) +  "/ArcGIS/Runtime/Data/3D"

    property int missionSize: currentMissionModel.count
    property bool missionReady: missionSize > 0
    property alias following: followButton.checked

    property string headingAtt: "HEADING";
    property string pitchAtt: "PITCH";
    property string rollAtt: "ROLL";
    property string angleAtt: "ANGLE";

    /**
     * Create SceneView that contains a Scene with the Imagery Basemap
     */

    // Create a scene view
    SceneView {
        id: sceneView
        anchors.fill: parent

        // create a scene...scene is a default property of sceneview
        // and thus will get added to the sceneview
        Scene {
            // add a basemap
            BasemapImagery {}

            // add a surface...surface is a default property of scene
            Surface {
                // add an arcgis tiled elevation source...elevation source is a default property of surface
                ArcGISTiledElevationSource {
                    url: "http://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"
                }
            }
        }

        GraphicsOverlay {
            id: sceneOverlay

            LayerSceneProperties {
                surfacePlacement: Enums.SurfacePlacementAbsolute
            }

            SimpleRenderer {
                id: sceneRenderer
                RendererSceneProperties {
                    id: renderProps
                    headingExpression: headingAtt
                    pitchExpression: pitchAtt
                    rollExpression: rollAtt
                }
            }

            Graphic {
                id: graphic3d

                SimpleMarkerSceneSymbol {
                    id: coneSymbol
                    style: Enums.SimpleMarkerSceneSymbolStyleCone
                    color: "blue"
                    height: 75
                    width: 75
                    anchorPosition: Enums.SceneSymbolAnchorPositionBottom
                }

                attributes {
                    attributesJson: {"HEASING":0,"PITCH":0,"ROLL":0}
                }

//                ModelSceneSymbol {
//                    id: mms
//                    url: dataPath + "/SkyCrane/SkyCrane.lwo"
//                    scale: 0.01
//                    heading: 180
//                }
            }
        }

        MouseArea {
            anchors.fill: parent
            onPressed: mouse.accepted = followButton.checked
            onWheel: wheel.accepted = followButton.checked
        }
    }

    ListModel {
        id: missionsModel
        ListElement{ name: "Grand Canyon"}
        ListElement{ name: "Hawaii"}
        ListElement{ name: "Pyrenees"}
        ListElement{ name: "Snowdon"}
    }

    ListModel {
        id: currentMissionModel
    }

{'fraction_non_alphanumeric': 0.07193426042983565, 'fraction_numerical': 0.012389380530973451, 'mean_word_length': 1.684424838819138, 'pattern_counts': {'":': 3, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3111679', 'n_tokens_mistral': 2143, 'n_tokens_neox': 1935, 'n_words': 594}