Files
qt5-legatus-legacy/Lts/Viewer/SituationMap/EvalApps/Viewshed3D/ViewshedLocation.h
T
2026-08-13 18:33:10 +02:00

100 lines
2.7 KiB
C++
Executable File

/**
* @RDE_HEADER@
* Declaration/Definition
* $Id$
* $HeadURL$
* $Author$
*/
// [WriteFile Name=ViewshedLocation, Category=Analysis]
// [Legal]
// Copyright 2017 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]
#ifndef VIEWSHEDLOCATION_H
#define VIEWSHEDLOCATION_H
#include <QObject>
#include <QColor>
namespace Esri
{
namespace ArcGISRuntime
{
class SceneGraphicsView;
class LocationViewshed;
class AnalysisOverlay;
}
}
class ViewshedLocation : public QObject
{
Q_OBJECT
public:
explicit ViewshedLocation(QObject* parent = nullptr);
~ViewshedLocation() = default;
// void componentComplete() Q_DECL_OVERRIDE;
void init(Esri::ArcGISRuntime::SceneGraphicsView* sceneView);
Q_PROPERTY(bool viewshedVisible READ isViewshedVisible WRITE setViewshedVisible NOTIFY viewshedVisibleChanged)
Q_PROPERTY(bool frustumVisible READ isFrustumOutlineVisible WRITE setFrustumOutlineVisible NOTIFY frustumVisibleChanged)
Q_PROPERTY(double minDistance READ minDistance WRITE setMinDistance NOTIFY minDistanceChanged)
Q_PROPERTY(double maxDistance READ maxDistance WRITE setMaxDistance NOTIFY maxDistanceChanged)
bool isViewshedVisible() const;
void setViewshedVisible(bool viewshedVisible);
bool isFrustumOutlineVisible() const;
void setFrustumOutlineVisible(bool frustumVisible);
double minDistance() const;
void setMinDistance(double minDistance);
double maxDistance() const;
void setMaxDistance(double maxDistance);
signals:
void viewshedVisibleChanged();
void frustumVisibleChanged();
void minDistanceChanged();
void maxDistanceChanged();
private:
void connectSignals();
void setInitialViewpoint();
void createViewshed(double x, double y);
Esri::ArcGISRuntime::SceneGraphicsView *m_sceneView = nullptr;
Esri::ArcGISRuntime::LocationViewshed *m_locationViewshed[3] = { nullptr, nullptr, nullptr };
Esri::ArcGISRuntime::AnalysisOverlay *m_analysisOverlay = nullptr;
bool m_viewshedVisible = true;
bool m_frustumVisible = false;
double m_minDistance = 50;
double m_maxDistance = 1000;
double m_horizontalAngle = 45;
double m_veriticalAngle = 90;
double m_heading = 0;
double m_pitch = 90;
bool m_calculating = false;
};
#endif // VIEWSHEDLOCATION_H