├── .gitattributes ├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── ALL_BUILD ├── ALL_BUILD.vcxproj ├── ALL_BUILD.vcxproj.filters └── readme.txt ├── Atlas.sln ├── Atlas ├── Atlas.cpp ├── Atlas.h ├── Atlas.rc ├── Atlas.sln ├── Atlas.vcxproj ├── Atlas.vcxproj.filters ├── AtlasSplashScreen.cpp ├── AtlasSplashScreen.h ├── atlas.ico ├── main.cpp ├── resource.h └── resources │ ├── earth_files │ ├── geocentric.earth │ ├── projected.earth │ └── world.tif │ ├── fonts │ ├── arial.ttf │ └── simhei.ttf │ ├── icons │ ├── 3dglasses.png │ ├── ArcGIS.png │ ├── USGSTMS.png │ ├── addshp.png │ ├── angle.png │ ├── area.png │ ├── atlas.png │ ├── bulldozer.png │ ├── center.png │ ├── compare.png │ ├── compass.png │ ├── construct.png │ ├── contour.png │ ├── cow.png │ ├── crowd.png │ ├── cube.png │ ├── curve.png │ ├── drawline.png │ ├── drawpolygon.png │ ├── exit.png │ ├── find.png │ ├── fog.png │ ├── gdal.png │ ├── height.png │ ├── hide.png │ ├── hide_all.png │ ├── image.png │ ├── layer.png │ ├── loading.gif │ ├── mark.png │ ├── model.png │ ├── move.png │ ├── new.png │ ├── oblique_model.png │ ├── ogc.png │ ├── open.ico │ ├── pathroam.png │ ├── playback.png │ ├── point_cloud.png │ ├── rain.png │ ├── record.png │ ├── road.png │ ├── rotate.png │ ├── ruler.png │ ├── satellite.png │ ├── save.ico │ ├── save_as.ico │ ├── screenshot.png │ ├── settings.png │ ├── show_all.png │ ├── show_all_layers.png │ ├── smoke.png │ ├── snow.png │ ├── sunlight.png │ ├── terrain.png │ ├── tile.png │ ├── tree.png │ ├── triangulation.png │ ├── visibility.png │ ├── vision.png │ ├── weather.png │ └── window.png │ ├── images │ └── atlas_big.png │ ├── models │ ├── arrow.osgb │ ├── cessna.osg │ ├── cow.osgb │ ├── dumptruck.osg │ ├── man.osgb │ ├── redmark.osgb │ └── tree.osgb │ ├── scripts │ ├── a.path │ ├── fly.path │ ├── info.xml │ └── style.xml │ ├── shaders │ ├── basicShader.frag │ ├── basicShader.vert │ ├── depthMap.frag │ ├── depthMap.vert │ ├── depthVisualizer.frag │ ├── depthVisualizer.vert │ ├── flattenShader.frag │ ├── flattenShader.vert │ ├── slope.frag │ ├── slope.vert │ ├── visibilityShader.frag │ └── visibilityShader.vert │ ├── styles │ └── Atlas.qss │ ├── translations │ ├── atlas_zh.qm │ └── atlas_zh.ts │ └── widgets │ ├── branch-closed.png │ ├── branch-end.png │ ├── branch-more.png │ ├── branch-open.png │ ├── checkbox_checked.png │ ├── checkbox_unchecked.png │ ├── close_dockwidget_hover.png │ ├── close_dockwidget_normal.png │ ├── close_dockwidget_pressed.png │ ├── menu_dockwidget_hover.png │ ├── menu_dockwidget_normal.png │ ├── menu_dockwidget_pressed.png │ ├── pin_dockwidget_hover.png │ ├── pin_dockwidget_normal.png │ ├── pin_dockwidget_pressed.png │ ├── unpin_dockwidget_hover.png │ ├── unpin_dockwidget_normal.png │ ├── unpin_dockwidget_pressed.png │ └── vline.png ├── CMakeLists.txt ├── CMakeModules └── FindOsgEarth.cmake ├── LICENSE ├── NameSpace.h ├── README.md ├── codestyle └── uncrustify.cfg ├── core ├── AtlasMainWindow │ ├── AtlasMainWindow.cpp │ ├── AtlasMainWindow.h │ ├── AtlasMainWindow.ui │ ├── AtlasMainWindow.vcxproj │ ├── AtlasMainWindow.vcxproj.filters │ ├── NXDockWidget.cpp │ ├── NXDockWidget.h │ ├── NXDockWidgetTabBar.cpp │ ├── NXDockWidgetTabBar.h │ ├── NXDockWidgetTabButton.cpp │ ├── NXDockWidgetTabButton.h │ ├── NXDockWidgetTitle.cpp │ ├── NXDockWidgetTitle.h │ └── atlasmainwindow_global.h ├── DataManager │ ├── DataFormats.h │ ├── DataManager.cpp │ ├── DataManager.h │ ├── DataManager.vcxproj │ ├── DataManager.vcxproj.filters │ ├── DataManager_global.h │ ├── DataRecord.cpp │ ├── DataRecord.h │ ├── DataTree.cpp │ ├── DataTree.h │ ├── FeatureStyleSettingDlg.cpp │ ├── FeatureStyleSettingDlg.h │ ├── FeatureStyleSettingDlg.ui │ ├── FindNode.hpp │ ├── FontVisitor.cpp │ ├── FontVisitor.h │ └── StyleTab.ui ├── MapController │ ├── MapController.cpp │ ├── MapController.h │ ├── MapController.vcxproj │ ├── MapController.vcxproj.filters │ └── MapController_global.h ├── MousePicker │ ├── MousePicker.cpp │ ├── MousePicker.h │ ├── MousePicker.vcxproj │ ├── MousePicker.vcxproj.filters │ └── MousePicker_global.h ├── PluginInterface │ ├── PluginInterface.cpp │ ├── PluginInterface.h │ ├── PluginInterface.vcxproj │ ├── PluginInterface.vcxproj.filters │ └── PluginInterface_global.h ├── PluginManager │ ├── PluginManager.cpp │ ├── PluginManager.h │ ├── PluginManager.vcxproj │ ├── PluginManager.vcxproj.filters │ └── PluginManager_global.h ├── SettingsManager │ ├── SettingsManager.cpp │ ├── SettingsManager.h │ ├── SettingsManager.vcxproj │ ├── SettingsManager.vcxproj.filters │ └── SettingsManager_global.h └── ViewerWidget │ ├── Compass.cpp │ ├── Compass.h │ ├── ViewerWidget.cpp │ ├── ViewerWidget.h │ ├── ViewerWidget.vcxproj │ ├── ViewerWidget.vcxproj.filters │ └── ViewerWidget_global.h ├── deploy.bat ├── docs ├── README.cn.md ├── build_guide.md ├── plugin_guide.md └── plugins.md ├── libs ├── CMakeLists.txt └── CrowdSim │ ├── CMakeLists.txt │ ├── CrowdSim.cpp │ ├── CrowdSim.h │ ├── CrowdSim.vcxproj │ ├── CrowdSim.vcxproj.filters │ ├── PathPlanner.cpp │ ├── PathPlanner.h │ ├── agent.cpp │ ├── agent.h │ ├── cell.cpp │ ├── cell.h │ ├── config.h │ ├── grid.cpp │ ├── grid.h │ ├── libpedsim │ ├── ped_agent.cpp │ ├── ped_agent.h │ ├── ped_includes.h │ ├── ped_obstacle.cpp │ ├── ped_obstacle.h │ ├── ped_outputwriter.cpp │ ├── ped_outputwriter.h │ ├── ped_scene.cpp │ ├── ped_scene.h │ ├── ped_tree.cpp │ ├── ped_tree.h │ ├── ped_vector.cpp │ ├── ped_vector.h │ ├── ped_waypoint.cpp │ └── ped_waypoint.h │ ├── micropather.cpp │ ├── micropather.h │ ├── obstacle.cpp │ ├── obstacle.h │ ├── scene.cpp │ ├── scene.h │ ├── tree.cpp │ ├── tree.h │ ├── waypoint.cpp │ └── waypoint.h ├── plugins ├── AddArcGISData │ ├── AddArcGISData.cpp │ ├── AddArcGISData.h │ ├── AddArcGISData.json │ ├── AddArcGISData.vcxproj │ ├── AddArcGISData.vcxproj.filters │ └── CMakeLists.txt ├── AddGDALData │ ├── AddGDALData.cpp │ ├── AddGDALData.h │ ├── AddGDALData.json │ ├── AddGDALData.vcxproj │ ├── AddGDALData.vcxproj.filters │ └── CMakeLists.txt ├── AddModel │ ├── AddModel.cpp │ ├── AddModel.h │ ├── AddModel.json │ ├── AddModel.vcxproj │ ├── AddModel.vcxproj.filters │ └── CMakeLists.txt ├── AddOGCData │ ├── AddOGCData.cpp │ ├── AddOGCData.h │ ├── AddOGCData.json │ ├── AddOGCData.vcxproj │ ├── AddOGCData.vcxproj.filters │ ├── CMakeLists.txt │ ├── MultiChooseDlg.cpp │ └── MultiChooseDlg.h ├── AddObliqueModel │ ├── AddObliqueModel.cpp │ ├── AddObliqueModel.h │ ├── AddObliqueModel.json │ ├── AddObliqueModel.vcxproj │ ├── AddObliqueModel.vcxproj.filters │ ├── CMakeLists.txt │ ├── LoadThread.cpp │ └── LoadThread.h ├── AddPointCloud │ ├── AddPointCloud.cpp │ ├── AddPointCloud.h │ ├── AddPointCloud.json │ ├── AddPointCloud.vcxproj │ ├── AddPointCloud.vcxproj.filters │ └── CMakeLists.txt ├── AddTMSData │ ├── AddTMSData.cpp │ ├── AddTMSData.h │ ├── AddTMSData.json │ ├── AddTMSData.vcxproj │ ├── AddTMSData.vcxproj.filters │ └── CMakeLists.txt ├── AddXYZData │ ├── AddXYZData.cpp │ ├── AddXYZData.h │ ├── AddXYZData.json │ ├── AddXYZData.vcxproj │ ├── AddXYZData.vcxproj.filters │ └── CMakeLists.txt ├── CrowdSimulation │ ├── CMakeLists.txt │ ├── CrowdSimRenderer.cpp │ ├── CrowdSimRenderer.h │ ├── CrowdSimulation.cpp │ ├── CrowdSimulation.h │ ├── CrowdSimulation.json │ ├── CrowdSimulation.vcxproj │ └── CrowdSimulation.vcxproj.filters ├── DiffAnalysis │ ├── CMakeLists.txt │ ├── DiffAnalysis.cpp │ ├── DiffAnalysis.h │ ├── DiffAnalysis.json │ ├── DiffAnalysis.vcxproj │ ├── DiffAnalysis.vcxproj.filters │ ├── DiffVisitor.cpp │ └── DiffVisitor.h ├── DrawLine │ ├── CMakeLists.txt │ ├── DrawLine.cpp │ ├── DrawLine.h │ ├── DrawLine.json │ ├── DrawLine.vcxproj │ ├── DrawLine.vcxproj.filters │ └── DrawLine_global.h ├── DrawPolygon │ ├── CMakeLists.txt │ ├── DrawPolygon.cpp │ ├── DrawPolygon.h │ ├── DrawPolygon.json │ ├── DrawPolygon.vcxproj │ ├── DrawPolygon.vcxproj.filters │ └── DrawPolygon_global.h ├── DrawSurfaceLine │ ├── CMakeLists.txt │ ├── DrawSurfaceLine.cpp │ ├── DrawSurfaceLine.h │ ├── DrawSurfaceLine.json │ ├── DrawSurfaceLine.vcxproj │ ├── DrawSurfaceLine.vcxproj.filters │ └── DrawSurfaceLine_global.h ├── DrawSurfacePolygon │ ├── CMakeLists.txt │ ├── DrawSurfacePolygon.cpp │ ├── DrawSurfacePolygon.h │ ├── DrawSurfacePolygon.json │ ├── DrawSurfacePolygon.vcxproj │ ├── DrawSurfacePolygon.vcxproj.filters │ └── DrawSurfacePolygon_global.h ├── DrawVector │ ├── CMakeLists.txt │ ├── DrawVector.cpp │ ├── DrawVector.h │ ├── DrawVector.json │ ├── DrawVector.vcxproj │ └── DrawVector.vcxproj.filters ├── EarthDataInterface │ ├── CMakeLists.txt │ ├── EarthDataInterface.cpp │ ├── EarthDataInterface.h │ ├── EarthDataInterface.json │ ├── EarthDataInterface.vcxproj │ ├── EarthDataInterface.vcxproj.filters │ ├── EarthDataInterface_global.h │ ├── ModelLayerManager.cpp │ ├── ModelLayerManager.h │ ├── urlDialog.cpp │ ├── urlDialog.h │ └── urlDialog.ui ├── Locator │ ├── CMakeLists.txt │ ├── Locator.cpp │ ├── Locator.h │ ├── Locator.json │ ├── Locator.vcxproj │ └── Locator.vcxproj.filters ├── MeasureArea │ ├── CMakeLists.txt │ ├── MeasureArea.cpp │ ├── MeasureArea.h │ ├── MeasureArea.json │ ├── MeasureArea.vcxproj │ └── MeasureArea.vcxproj.filters ├── MeasureHeight │ ├── CMakeLists.txt │ ├── MeasureHeight.cpp │ ├── MeasureHeight.h │ ├── MeasureHeight.json │ ├── MeasureHeight.vcxproj │ └── MeasureHeight.vcxproj.filters ├── MeasureLine │ ├── CMakeLists.txt │ ├── MeasureLine.cpp │ ├── MeasureLine.h │ ├── MeasureLine.json │ ├── MeasureLine.vcxproj │ └── MeasureLine.vcxproj.filters ├── MeasureTerrainArea │ ├── AreaVisitor.cpp │ ├── AreaVisitor.h │ ├── CMakeLists.txt │ ├── MeasureTerrainArea.cpp │ ├── MeasureTerrainArea.h │ ├── MeasureTerrainArea.json │ ├── MeasureTerrainArea.vcxproj │ ├── MeasureTerrainArea.vcxproj.filters │ └── MeasureTerrainArea_global.h ├── MeasureTerrainVolume │ ├── CMakeLists.txt │ ├── MeasureTerrainVolume.cpp │ ├── MeasureTerrainVolume.h │ ├── MeasureTerrainVolume.json │ ├── MeasureTerrainVolume.vcxproj │ ├── MeasureTerrainVolume.vcxproj.filters │ ├── VolumeVisitor.cpp │ └── VolumeVisitor.h ├── MeshMode │ ├── CMakeLists.txt │ ├── MeshMode.cpp │ ├── MeshMode.h │ ├── MeshMode.json │ ├── MeshMode.vcxproj │ └── MeshMode.vcxproj.filters ├── ModelFlatten │ ├── CMakeLists.txt │ ├── FlattenProcess.h │ ├── FlattenVisitor.hpp │ ├── ModelFlatten.cpp │ ├── ModelFlatten.h │ ├── ModelFlatten.json │ ├── ModelFlatten.vcxproj │ └── ModelFlatten.vcxproj.filters ├── MultiView │ ├── CMakeLists.txt │ ├── MultiView.cpp │ ├── MultiView.h │ ├── MultiView.json │ ├── MultiView.vcxproj │ └── MultiView.vcxproj.filters ├── OpenSky-Network │ ├── CMakeLists.txt │ ├── OpenSkyNetwork.cpp │ ├── OpenSkyNetwork.h │ ├── OpenSkyNetwork.json │ ├── dataptree.cpp │ ├── dataptree.h │ ├── openskyfetcher.cpp │ ├── openskyfetcher.h │ ├── plane2d.cpp │ ├── plane2d.h │ └── res │ │ ├── opensky-network.png │ │ └── opensky.png ├── OrthoMap │ ├── CMakeLists.txt │ ├── OrthoMap.cpp │ ├── OrthoMap.h │ ├── OrthoMap.json │ ├── OrthoMap.vcxproj │ ├── OrthoMap.vcxproj.filters │ ├── PosterPrinter.cpp │ ├── PosterPrinter.h │ ├── SaveOrthoDSMDialog.cpp │ ├── SaveOrthoDSMDialog.h │ ├── SaveOrthoProjDialog.cpp │ ├── SaveOrthoProjDialog.h │ └── SaveOrthoProjDialog.ui ├── ScreenShot │ ├── CMakeLists.txt │ ├── CaptureImageCallback.cpp │ ├── CaptureImageCallback.h │ ├── ScreenShot.cpp │ ├── ScreenShot.h │ ├── ScreenShot.json │ ├── ScreenShot.vcxproj │ └── ScreenShot.vcxproj.filters ├── SetRefPlane │ ├── CMakeLists.txt │ ├── MeasureVolumePlaneSetDlg.cpp │ ├── MeasureVolumePlaneSetDlg.h │ ├── MeasureVolumePlaneSetDlg.ui │ ├── SetRefPlane.cpp │ ├── SetRefPlane.h │ ├── SetRefPlane.json │ ├── SetRefPlane.vcxproj │ ├── SetRefPlane.vcxproj.filters │ └── SetRefPlane_global.h ├── ShowWeather │ ├── CMakeLists.txt │ ├── ShowWeather.cpp │ ├── ShowWeather.h │ ├── ShowWeather.json │ ├── ShowWeather.vcxproj │ └── ShowWeather.vcxproj.filters ├── SlopAnalysis │ ├── CMakeLists.txt │ ├── SlopAnalysis.cpp │ ├── SlopAnalysis.h │ ├── SlopAnalysis.json │ ├── SlopAnalysis.vcxproj │ └── SlopAnalysis.vcxproj.filters ├── Template │ ├── CMakeLists.txt │ ├── Template.cpp │ ├── Template.h │ ├── Template.json │ └── res │ │ └── Template.svg ├── TileSelect │ ├── CMakeLists.txt │ ├── TileSelect.cpp │ ├── TileSelect.h │ ├── TileSelect.json │ ├── TileSelect.vcxproj │ ├── TileSelect.vcxproj.filters │ ├── TileSelectDialog.cpp │ ├── TileSelectDialog.h │ ├── TileSelectDialog.ui │ └── TileSelect_global.h ├── VRMode │ ├── CMakeLists.txt │ ├── CMakeModules │ │ └── FindOpenVR.cmake │ ├── VRMode.cpp │ ├── VRMode.h │ ├── VRMode.json │ ├── VRMode.vcxproj │ ├── VRMode.vcxproj.filters │ ├── openvrdevice.cpp │ ├── openvrdevice.h │ ├── openvreventhandler.cpp │ ├── openvreventhandler.h │ ├── openvrupdateslavecallback.cpp │ ├── openvrupdateslavecallback.h │ ├── openvrviewer.cpp │ └── openvrviewer.h ├── VisibilityTest │ ├── CMakeLists.txt │ ├── VisibilityTest.cpp │ ├── VisibilityTest.h │ ├── VisibilityTest.json │ ├── VisibilityTest.vcxproj │ └── VisibilityTest.vcxproj.filters └── VisibilityTestArea │ ├── CMakeLists.txt │ ├── VisibilityTestArea.cpp │ ├── VisibilityTestArea.h │ ├── VisibilityTestArea.json │ ├── VisibilityTestArea.vcxproj │ └── VisibilityTestArea.vcxproj.filters ├── resource.qrc └── templates ├── AtlasPlugin.zip ├── AtlasPluginExtension ├── AtlasPluginExtension.csproj ├── Properties │ └── AssemblyInfo.cs ├── index.html ├── source.extension.vsixmanifest └── stylesheet.css ├── AtlasPluginTemplate.sln ├── AtlasPluginTemplate ├── AtlasPluginTemplate.csproj ├── AtlasPluginTemplate.ico ├── AtlasPluginTemplate.vstemplate ├── Basic.vcxproj ├── Basic.vcxproj.filters ├── Basic_global.h └── Properties │ └── AssemblyInfo.cs └── AtlasPluginWizard ├── AtlasPluginWizard.csproj ├── Properties └── AssemblyInfo.cs └── Wizard.cs /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Environment (please complete the following information):** 27 | - OS: [e.g. Windows 10 1803] 28 | - Version [e.g. 0.0.1] 29 | 30 | **Log file** 31 | If necessary, upload or paste your whole log file. You can find it at 32 | - Windows : C:\Users\$username\AppData\Roaming\Atlas\Atlas\AtlasLog.txt 33 | - *nix : /tmp/Atlas/Atlas/AtlasLog.txt 34 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /ALL_BUILD/ALL_BUILD.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ALL_BUILD/readme.txt: -------------------------------------------------------------------------------- 1 | This project makes sure every thing that's needed for a Release run will be copied to the release dir. -------------------------------------------------------------------------------- /Atlas/Atlas.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/Atlas.rc -------------------------------------------------------------------------------- /Atlas/Atlas.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Atlas", "Atlas\Atlas.vcxproj", "{B12702AD-ABFB-343A-A199-8E24837244A3}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x64.ActiveCfg = Debug|x64 17 | {B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x64.Build.0 = Debug|x64 18 | {B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x86.ActiveCfg = Debug|Win32 19 | {B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x86.Build.0 = Debug|Win32 20 | {B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x64.ActiveCfg = Release|x64 21 | {B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x64.Build.0 = Release|x64 22 | {B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x86.ActiveCfg = Release|Win32 23 | {B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | VisualSVNWorkingCopyRoot = . 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /Atlas/AtlasSplashScreen.cpp: -------------------------------------------------------------------------------- 1 | #include "AtlasSplashScreen.h" 2 | 3 | AtlasSplashScreen::AtlasSplashScreen(QPixmap& pixmap) 4 | { 5 | int imageSize = 350; 6 | int margin = 20; 7 | 8 | nowStep = 0; 9 | progressBar = new QProgressBar(this); 10 | progressBar->setGeometry(margin, imageSize - margin, imageSize - margin, margin); 11 | progressBar->setTextVisible(false); 12 | 13 | rePixmap = pixmap.scaledToHeight(imageSize, Qt::SmoothTransformation); 14 | this->setPixmap(rePixmap); 15 | 16 | splashFont.setFamily("Arial"); 17 | splashFont.setBold(true); 18 | splashFont.setPixelSize(15); 19 | splashFont.setStretch(125); 20 | 21 | this->setFont(splashFont); 22 | 23 | } 24 | 25 | AtlasSplashScreen::~AtlasSplashScreen() 26 | { 27 | } 28 | 29 | void AtlasSplashScreen::setTotalInitSteps(int num) { 30 | progressBar->setRange(0, num); 31 | totalSteps = num; 32 | } 33 | 34 | void AtlasSplashScreen::setNowInitName(const QString& name) 35 | { 36 | nowStep++; 37 | progressBar->setValue(nowStep); 38 | this->showMessage(tr("%1\n").arg(name), 39 | Qt::AlignHCenter | Qt::AlignBottom, Qt::white); 40 | } 41 | -------------------------------------------------------------------------------- /Atlas/AtlasSplashScreen.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | class AtlasSplashScreen : public QSplashScreen 6 | { 7 | Q_OBJECT 8 | 9 | public: 10 | explicit AtlasSplashScreen(QPixmap& pixmap); 11 | ~AtlasSplashScreen(); 12 | 13 | private: 14 | QFont splashFont; 15 | QPixmap rePixmap; 16 | QProgressBar *progressBar; 17 | int totalSteps, nowStep; 18 | 19 | private slots: 20 | void setTotalInitSteps(int num); 21 | void setNowInitName(const QString& name); 22 | 23 | }; 24 | 25 | -------------------------------------------------------------------------------- /Atlas/atlas.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/atlas.ico -------------------------------------------------------------------------------- /Atlas/main.cpp: -------------------------------------------------------------------------------- 1 | #include "Atlas.h" 2 | #include "AtlasSplashScreen.h" 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | int main(int argc, char *argv[]) 9 | { 10 | // A trick to get higher fps than 30 11 | QSurfaceFormat format = QSurfaceFormat::defaultFormat(); 12 | format.setSwapInterval(0); 13 | QSurfaceFormat::setDefaultFormat(format); 14 | 15 | QApplication app(argc, argv); 16 | 17 | // Load an application style 18 | QFile styleFile("resources/styles/Atlas.qss"); 19 | 20 | if (styleFile.open(QFile::ReadOnly)) 21 | { 22 | QString style(styleFile.readAll()); 23 | app.setStyleSheet(style); 24 | } 25 | 26 | // Show splash screen 27 | QPixmap a("./resources/images/atlas_big.png"); 28 | AtlasSplashScreen *splash = new AtlasSplashScreen(a); 29 | Atlas w; 30 | QObject::connect(&w, SIGNAL(sendTotalInitSteps(int)), splash, SLOT(setTotalInitSteps(int))); 31 | QObject::connect(&w, SIGNAL(sendNowInitName(const QString&)), splash, SLOT(setNowInitName(const QString&))); 32 | 33 | splash->show(); 34 | w.initAll(); 35 | 36 | // Begin application 37 | w.showMaximized(); 38 | splash->finish(&w); 39 | delete splash; 40 | 41 | return app.exec(); 42 | } 43 | -------------------------------------------------------------------------------- /Atlas/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resource.h -------------------------------------------------------------------------------- /Atlas/resources/earth_files/geocentric.earth: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | ../../cache 12 | 1000 13 | 14 | 15 | 16 | 17 | ./world.tif 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Atlas/resources/earth_files/projected.earth: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | plate-carre 5 | 9 | 10 | 11 | ../../cache 12 | 1000 13 | 14 | 15 | 16 | 17 | http://[abc].tile.openstreetmap.org/{z}/{x}/{y}.png 18 | spherical-mercator 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /Atlas/resources/earth_files/world.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/earth_files/world.tif -------------------------------------------------------------------------------- /Atlas/resources/fonts/arial.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/fonts/arial.ttf -------------------------------------------------------------------------------- /Atlas/resources/fonts/simhei.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/fonts/simhei.ttf -------------------------------------------------------------------------------- /Atlas/resources/icons/3dglasses.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/3dglasses.png -------------------------------------------------------------------------------- /Atlas/resources/icons/ArcGIS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/ArcGIS.png -------------------------------------------------------------------------------- /Atlas/resources/icons/USGSTMS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/USGSTMS.png -------------------------------------------------------------------------------- /Atlas/resources/icons/addshp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/addshp.png -------------------------------------------------------------------------------- /Atlas/resources/icons/angle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/angle.png -------------------------------------------------------------------------------- /Atlas/resources/icons/area.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/area.png -------------------------------------------------------------------------------- /Atlas/resources/icons/atlas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/atlas.png -------------------------------------------------------------------------------- /Atlas/resources/icons/bulldozer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/bulldozer.png -------------------------------------------------------------------------------- /Atlas/resources/icons/center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/center.png -------------------------------------------------------------------------------- /Atlas/resources/icons/compare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/compare.png -------------------------------------------------------------------------------- /Atlas/resources/icons/compass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/compass.png -------------------------------------------------------------------------------- /Atlas/resources/icons/construct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/construct.png -------------------------------------------------------------------------------- /Atlas/resources/icons/contour.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/contour.png -------------------------------------------------------------------------------- /Atlas/resources/icons/cow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/cow.png -------------------------------------------------------------------------------- /Atlas/resources/icons/crowd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/crowd.png -------------------------------------------------------------------------------- /Atlas/resources/icons/cube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/cube.png -------------------------------------------------------------------------------- /Atlas/resources/icons/curve.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/curve.png -------------------------------------------------------------------------------- /Atlas/resources/icons/drawline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/drawline.png -------------------------------------------------------------------------------- /Atlas/resources/icons/drawpolygon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/drawpolygon.png -------------------------------------------------------------------------------- /Atlas/resources/icons/exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/exit.png -------------------------------------------------------------------------------- /Atlas/resources/icons/find.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/find.png -------------------------------------------------------------------------------- /Atlas/resources/icons/fog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/fog.png -------------------------------------------------------------------------------- /Atlas/resources/icons/gdal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/gdal.png -------------------------------------------------------------------------------- /Atlas/resources/icons/height.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/height.png -------------------------------------------------------------------------------- /Atlas/resources/icons/hide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/hide.png -------------------------------------------------------------------------------- /Atlas/resources/icons/hide_all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/hide_all.png -------------------------------------------------------------------------------- /Atlas/resources/icons/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/image.png -------------------------------------------------------------------------------- /Atlas/resources/icons/layer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/layer.png -------------------------------------------------------------------------------- /Atlas/resources/icons/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/loading.gif -------------------------------------------------------------------------------- /Atlas/resources/icons/mark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/mark.png -------------------------------------------------------------------------------- /Atlas/resources/icons/model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/model.png -------------------------------------------------------------------------------- /Atlas/resources/icons/move.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/move.png -------------------------------------------------------------------------------- /Atlas/resources/icons/new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/new.png -------------------------------------------------------------------------------- /Atlas/resources/icons/oblique_model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/oblique_model.png -------------------------------------------------------------------------------- /Atlas/resources/icons/ogc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/ogc.png -------------------------------------------------------------------------------- /Atlas/resources/icons/open.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/open.ico -------------------------------------------------------------------------------- /Atlas/resources/icons/pathroam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/pathroam.png -------------------------------------------------------------------------------- /Atlas/resources/icons/playback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/playback.png -------------------------------------------------------------------------------- /Atlas/resources/icons/point_cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/point_cloud.png -------------------------------------------------------------------------------- /Atlas/resources/icons/rain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/rain.png -------------------------------------------------------------------------------- /Atlas/resources/icons/record.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/record.png -------------------------------------------------------------------------------- /Atlas/resources/icons/road.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/road.png -------------------------------------------------------------------------------- /Atlas/resources/icons/rotate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/rotate.png -------------------------------------------------------------------------------- /Atlas/resources/icons/ruler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/ruler.png -------------------------------------------------------------------------------- /Atlas/resources/icons/satellite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/satellite.png -------------------------------------------------------------------------------- /Atlas/resources/icons/save.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/save.ico -------------------------------------------------------------------------------- /Atlas/resources/icons/save_as.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/save_as.ico -------------------------------------------------------------------------------- /Atlas/resources/icons/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/screenshot.png -------------------------------------------------------------------------------- /Atlas/resources/icons/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/settings.png -------------------------------------------------------------------------------- /Atlas/resources/icons/show_all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/show_all.png -------------------------------------------------------------------------------- /Atlas/resources/icons/show_all_layers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/show_all_layers.png -------------------------------------------------------------------------------- /Atlas/resources/icons/smoke.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/smoke.png -------------------------------------------------------------------------------- /Atlas/resources/icons/snow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/snow.png -------------------------------------------------------------------------------- /Atlas/resources/icons/sunlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/sunlight.png -------------------------------------------------------------------------------- /Atlas/resources/icons/terrain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/terrain.png -------------------------------------------------------------------------------- /Atlas/resources/icons/tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/tile.png -------------------------------------------------------------------------------- /Atlas/resources/icons/tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/tree.png -------------------------------------------------------------------------------- /Atlas/resources/icons/triangulation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/triangulation.png -------------------------------------------------------------------------------- /Atlas/resources/icons/visibility.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/visibility.png -------------------------------------------------------------------------------- /Atlas/resources/icons/vision.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/vision.png -------------------------------------------------------------------------------- /Atlas/resources/icons/weather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/weather.png -------------------------------------------------------------------------------- /Atlas/resources/icons/window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/icons/window.png -------------------------------------------------------------------------------- /Atlas/resources/images/atlas_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/images/atlas_big.png -------------------------------------------------------------------------------- /Atlas/resources/models/arrow.osgb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/models/arrow.osgb -------------------------------------------------------------------------------- /Atlas/resources/models/cow.osgb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/models/cow.osgb -------------------------------------------------------------------------------- /Atlas/resources/models/man.osgb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/models/man.osgb -------------------------------------------------------------------------------- /Atlas/resources/models/redmark.osgb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/models/redmark.osgb -------------------------------------------------------------------------------- /Atlas/resources/models/tree.osgb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/models/tree.osgb -------------------------------------------------------------------------------- /Atlas/resources/scripts/a.path: -------------------------------------------------------------------------------- 1 | 0 610953.625 3040366 100.215522766113 0.438891762866393 -0.279407109053795 -0.45861968001383 0.720398276651355 2 | 23.5720920562744 611151.125 3040458.25 110.504684448242 0.424178922692593 -0.395498448713504 -0.555548205124208 0.595835053006983 3 | 44.5236587524414 611350.9375 3040472.25 149.057373046875 0.414644857743623 -0.393327120946109 -0.564736998404464 0.595344892065206 4 | 63.0008697509766 611521.375 3040481.25 178.270477294922 0.336847332315598 -0.203682106752687 -0.475657229877112 0.786636938979021 5 | 83.094367980957 611652.4375 3040550 42.362663269043 0 0 0 0 6 | -------------------------------------------------------------------------------- /Atlas/resources/scripts/fly.path: -------------------------------------------------------------------------------- 1 | 0 111013.5 -279601 100 -0 -0 -0.885424984292385 0.464782311615696 2 | 7.90115737915039 111143.5625 -279690.75 100 -0 -0 -0.868145218445895 0.496310265549211 3 | 14.4794273376465 111256.9375 -279757.5 100 0 0 0 0 4 | -------------------------------------------------------------------------------- /Atlas/resources/scripts/info.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | PROJCS["CGCS_2000_3_Degree_GK_CM_120E", 5 | GEOGCS["GCS_CGCS_2000", 6 | DATUM["CGCS_2000", 7 | SPHEROID["CGCS_2000",6378137,298.257222101]], 8 | PRIMEM["Greenwich",0], 9 | UNIT["degree",0.0174532925199433]], 10 | PROJECTION["Transverse_Mercator"], 11 | PARAMETER["latitude_of_origin",0], 12 | PARAMETER["central_meridian",120], 13 | PARAMETER["scale_factor",1], 14 | PARAMETER["false_easting",500000], 15 | PARAMETER["false_northing",0], 16 | UNIT["metre",1, 17 | AUTHORITY["EPSG","9001"]]] 18 | 19 | 20 | 605998.377246828400530,3254001.634820304811001 21 | 2.000000000000000,-2.000000000000000 22 | 23 | AREA_OR_POINT=Area 24 | DataType=Generic 25 | 26 | 27 | COMPRESSION=LZW 28 | INTERLEAVE=BAND 29 | 30 | 31 | 32 | 605998.377, 3254001.635 33 | 605998.377, 3251999.635 34 | 608000.377, 3254001.635 35 | 608000.377, 3251999.635 36 |
606999.377, 3253000.635
37 |
38 | 39 | 40 | 128,128 41 | Float32 42 | Gray 43 | 44 | -3.40282306073709653e+38 45 |
46 | -------------------------------------------------------------------------------- /Atlas/resources/scripts/style.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Atlas/resources/shaders/basicShader.frag: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | out vec4 FragColor; 4 | 5 | in vec2 texCoords; 6 | 7 | uniform sampler2D baseTexture; 8 | 9 | void main() 10 | { 11 | vec3 color = texture(baseTexture, texCoords).rgb; 12 | 13 | FragColor = vec4(color, 1.0); 14 | } -------------------------------------------------------------------------------- /Atlas/resources/shaders/basicShader.vert: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | out vec2 texCoords; 4 | 5 | void main() 6 | { 7 | texCoords = gl_MultiTexCoord0; 8 | gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; 9 | } 10 | -------------------------------------------------------------------------------- /Atlas/resources/shaders/depthMap.frag: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | in float lightDistance; 3 | uniform float far_plane; 4 | 5 | void main() 6 | { 7 | // Mapping to [0, 1] 8 | gl_FragDepth = lightDistance; 9 | } 10 | -------------------------------------------------------------------------------- /Atlas/resources/shaders/depthMap.vert: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | in vec4 gl_Vertex; 4 | out float lightDistance; 5 | 6 | uniform mat4 osg_ModelViewProjectionMatrix; 7 | uniform mat4 osg_ViewMatrixInverse; 8 | uniform vec3 lightPos; 9 | uniform mat4 inverse_view; 10 | 11 | uniform float near_plane; 12 | uniform float far_plane; 13 | 14 | void main() 15 | { 16 | // get distance between fragment and light source 17 | vec3 worldPos = (inverse_view * gl_ModelViewMatrix * gl_Vertex).xyz; 18 | lightDistance = length(worldPos - lightPos); 19 | lightDistance = ((1 / lightDistance) - (1 / near_plane)) / (1 / far_plane - 1 / near_plane); 20 | 21 | gl_Position = osg_ModelViewProjectionMatrix * gl_Vertex; 22 | } -------------------------------------------------------------------------------- /Atlas/resources/shaders/depthVisualizer.frag: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | #extension GL_NV_shadow_samplers_cube : enable 3 | out vec4 FragColor; 4 | 5 | in vec3 texCoords; 6 | 7 | uniform samplerCube depthMap; 8 | uniform samplerCube colorMap; 9 | 10 | const float near_plane = 0.1; 11 | const float far_plane = 1000.0; 12 | 13 | float LinearizeDepth(float z) 14 | { 15 | float z_n = 2.0 * z - 1.0; 16 | return 2.0 * near_plane * far_plane / (far_plane + near_plane - z_n * (far_plane - near_plane)); 17 | }; 18 | 19 | void main() 20 | { 21 | // vec3 color = vec3(LinearizeDepth(textureCube(depthMap, texCoords).r)) / far_plane; 22 | vec3 color = vec3(textureCube(depthMap, texCoords).r); 23 | // vec3 color = vec3(textureCube(colorMap, texCoords)); 24 | 25 | FragColor = vec4(color, 1.0); 26 | } 27 | -------------------------------------------------------------------------------- /Atlas/resources/shaders/depthVisualizer.vert: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | in vec4 gl_Vertex; 4 | 5 | uniform mat4 osg_ModelViewMatrix; 6 | uniform mat4 osg_ViewMatrixInverse; 7 | uniform vec3 center; 8 | 9 | out vec3 texCoords; 10 | 11 | void main() 12 | { 13 | vec3 worldPos = (osg_ViewMatrixInverse * osg_ModelViewMatrix * gl_Vertex).xyz; 14 | texCoords = normalize(worldPos - center); 15 | gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; 16 | } 17 | -------------------------------------------------------------------------------- /Atlas/resources/shaders/flattenShader.frag: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | uniform vec2 boundary[16]; 3 | uniform float nVert; 4 | uniform sampler2D tex; 5 | in vec2 texCoords; 6 | in vec3 fragPos; 7 | 8 | bool pnpoly(vec2 test) 9 | { 10 | bool c = false; 11 | if (nVert >= 3) 12 | { 13 | int i, j; 14 | for (i = 0, j = int(nVert) - 1; i < int(nVert); j = i++) { 15 | if (((boundary[i].y>test.y) != (boundary[j].y>test.y)) && 16 | (test.x < (boundary[j].x - boundary[i].x) * (test.y - boundary[i].y) / (boundary[j].y - boundary[i].y) + boundary[i].x)) 17 | c = !c; 18 | } 19 | } 20 | return c; 21 | } 22 | 23 | bool is_hole(vec3 pos) 24 | { 25 | return pnpoly(pos.xy); 26 | } 27 | 28 | void main(void) 29 | { 30 | 31 | if (is_hole(fragPos.xyz)) 32 | discard; 33 | else 34 | gl_FragColor = texture2D(tex, texCoords); 35 | "} -------------------------------------------------------------------------------- /Atlas/resources/shaders/flattenShader.vert: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | out vec2 texCoords; 3 | out vec3 fragPos; 4 | void main() 5 | { 6 | texCoords = gl_MultiTexCoord0.st; 7 | texCoords2 = gl_MultiTexCoord1.st; 8 | gl_Position = ftransform(); 9 | fragPos = gl_Position.xyz; 10 | } -------------------------------------------------------------------------------- /Atlas/resources/shaders/slope.frag: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | in vec3 normal; 4 | out vec4 fragColor; 5 | uniform vec4 slopeColors[5]; 6 | 7 | vec4 Normal2Gray(vec3 n) { 8 | float degree = abs(acos((n.z / length(n)))) * 180 / 3.14159; 9 | vec4 color; 10 | if (degree < 2) 11 | color = slopeColors[0]; 12 | else if (degree < 6) 13 | color = slopeColors[1]; 14 | else if (degree < 15) 15 | color = slopeColors[2]; 16 | else if (degree < 30) 17 | color = slopeColors[3]; 18 | else 19 | color = slopeColors[4]; 20 | return color; 21 | } 22 | 23 | void main() 24 | { 25 | fragColor = Normal2Gray(normal); 26 | } -------------------------------------------------------------------------------- /Atlas/resources/shaders/slope.vert: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | uniform mat4 osg_ModelViewProjectionMatrix; 4 | 5 | in vec4 osg_Vertex; 6 | in vec3 gl_Normal; 7 | out vec3 normal; 8 | 9 | void main() 10 | { 11 | normal = gl_Normal; 12 | gl_Position = osg_ModelViewProjectionMatrix * osg_Vertex; 13 | } -------------------------------------------------------------------------------- /Atlas/resources/shaders/visibilityShader.frag: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | out vec4 FragColor; 3 | 4 | in vec3 worldPos; 5 | in vec3 normal; 6 | in vec2 texCoords; 7 | in float lightDistance; 8 | 9 | uniform vec3 lightPos; 10 | uniform vec4 visibleColor; 11 | uniform vec4 invisibleColor; 12 | 13 | uniform sampler2D baseTexture; 14 | uniform samplerCube shadowMap; 15 | 16 | uniform float near_plane; 17 | uniform float far_plane; 18 | uniform float user_area; 19 | 20 | float linearizeDepth(float z) 21 | { 22 | float z_n = 2.0 * z - 1.0; 23 | return 2.0 * near_plane * far_plane / (far_plane + near_plane - z_n * (far_plane - near_plane)); 24 | }; 25 | 26 | // Return 1 for shadowed, 0 visible 27 | bool isShadowed(vec3 lightDir) 28 | { 29 | float bias = max(0.01 * (1.0 - dot(normal, lightDir)), 0.001) * far_plane; 30 | 31 | float z = linearizeDepth(texture(shadowMap, lightDir).r); 32 | return lightDistance - bias > z; 33 | } 34 | 35 | void main() 36 | { 37 | vec3 baseColor = texture(baseTexture, texCoords).rgb; 38 | 39 | if (length(lightPos.xy - worldPos.xy) > user_area) 40 | FragColor = vec4(baseColor, 1.0); 41 | else 42 | { 43 | vec3 lightDir = normalize(lightPos - worldPos); 44 | float normDif = max(dot(lightDir, normal), 0.0); 45 | 46 | vec3 lighting; 47 | // Render as visible only if it can be seen by light source 48 | if (normDif > 0.0 && isShadowed(-lightDir) == false) 49 | lighting = visibleColor.rgb * baseColor; 50 | else 51 | lighting = invisibleColor.rgb * baseColor; 52 | 53 | FragColor = vec4(lighting, 1.0); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Atlas/resources/shaders/visibilityShader.vert: -------------------------------------------------------------------------------- 1 | #version 330 core 2 | 3 | in vec4 gl_Vertex; 4 | in vec3 gl_Normal; 5 | in vec2 gl_MultiTexCoord0; 6 | 7 | uniform mat4 osg_ModelViewProjectionMatrix; 8 | uniform mat4 osg_ViewMatrixInverse; 9 | uniform vec3 lightPos; 10 | 11 | out vec3 worldPos; 12 | out vec3 normal; 13 | out vec2 texCoords; 14 | out float lightDistance; 15 | 16 | void main() 17 | { 18 | worldPos = (osg_ViewMatrixInverse * gl_ModelViewMatrix * gl_Vertex).xyz; 19 | lightDistance = length(worldPos - lightPos); 20 | 21 | normal = normalize( gl_Normal ); 22 | texCoords = gl_MultiTexCoord0; 23 | gl_Position = osg_ModelViewProjectionMatrix * gl_Vertex; 24 | } 25 | -------------------------------------------------------------------------------- /Atlas/resources/translations/atlas_zh.qm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/translations/atlas_zh.qm -------------------------------------------------------------------------------- /Atlas/resources/widgets/branch-closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/widgets/branch-closed.png -------------------------------------------------------------------------------- /Atlas/resources/widgets/branch-end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/widgets/branch-end.png -------------------------------------------------------------------------------- /Atlas/resources/widgets/branch-more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/widgets/branch-more.png -------------------------------------------------------------------------------- /Atlas/resources/widgets/branch-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/widgets/branch-open.png -------------------------------------------------------------------------------- /Atlas/resources/widgets/checkbox_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/widgets/checkbox_checked.png -------------------------------------------------------------------------------- /Atlas/resources/widgets/checkbox_unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/widgets/checkbox_unchecked.png -------------------------------------------------------------------------------- /Atlas/resources/widgets/close_dockwidget_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/widgets/close_dockwidget_hover.png -------------------------------------------------------------------------------- /Atlas/resources/widgets/close_dockwidget_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/widgets/close_dockwidget_normal.png -------------------------------------------------------------------------------- /Atlas/resources/widgets/close_dockwidget_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/widgets/close_dockwidget_pressed.png -------------------------------------------------------------------------------- /Atlas/resources/widgets/menu_dockwidget_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/widgets/menu_dockwidget_hover.png -------------------------------------------------------------------------------- /Atlas/resources/widgets/menu_dockwidget_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/widgets/menu_dockwidget_normal.png -------------------------------------------------------------------------------- /Atlas/resources/widgets/menu_dockwidget_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/widgets/menu_dockwidget_pressed.png -------------------------------------------------------------------------------- /Atlas/resources/widgets/pin_dockwidget_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/widgets/pin_dockwidget_hover.png -------------------------------------------------------------------------------- /Atlas/resources/widgets/pin_dockwidget_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/widgets/pin_dockwidget_normal.png -------------------------------------------------------------------------------- /Atlas/resources/widgets/pin_dockwidget_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/widgets/pin_dockwidget_pressed.png -------------------------------------------------------------------------------- /Atlas/resources/widgets/unpin_dockwidget_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/widgets/unpin_dockwidget_hover.png -------------------------------------------------------------------------------- /Atlas/resources/widgets/unpin_dockwidget_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/widgets/unpin_dockwidget_normal.png -------------------------------------------------------------------------------- /Atlas/resources/widgets/unpin_dockwidget_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/widgets/unpin_dockwidget_pressed.png -------------------------------------------------------------------------------- /Atlas/resources/widgets/vline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/Atlas/resources/widgets/vline.png -------------------------------------------------------------------------------- /NameSpace.h: -------------------------------------------------------------------------------- 1 | #ifndef NAMESPACE_H 2 | #define NAMESPACE_H 3 | 4 | #define MAX_SUBVIEW 2 5 | 6 | // Define what to ignore in node traversal 7 | enum TraversalOption 8 | { 9 | INTERSECT_IGNORE = 0x00000004, 10 | TRAVERSAL_IGNORE = 0x00000010 11 | }; 12 | 13 | // Define window splits visibility used in node mask 14 | // and viewer widget 15 | enum WindowVisibility 16 | { 17 | SHOW_IN_NO_WINDOW = 0x0fffffff, 18 | SHOW_IN_ALL_WINDOW = ~SHOW_IN_NO_WINDOW, 19 | SHOW_IN_WINDOW_1 = 0x10000000, 20 | }; 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /core/AtlasMainWindow/NXDockWidgetTabBar.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | class NXDockWidgetTabButton; 6 | class NXDockWidget; 7 | 8 | /*! 9 | */ 10 | class NXDockWidgetTabBar : public QToolBar 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit NXDockWidgetTabBar(Qt::DockWidgetArea area); 16 | ~NXDockWidgetTabBar(); 17 | 18 | public: 19 | void addDockWidget(NXDockWidget* dockWidget); 20 | bool removeDockWidget(NXDockWidget* dockWidget); 21 | 22 | void insertSpacing(); 23 | void removeSpacing(); 24 | 25 | private: 26 | void dockWidgetButton_clicked(bool checked); 27 | 28 | signals: 29 | void signal_dockWidgetButton_clicked(NXDockWidget* dockWidget); 30 | 31 | private: 32 | Qt::DockWidgetArea _area; 33 | QWidget* _spacer; 34 | QMap _tabs; 35 | }; -------------------------------------------------------------------------------- /core/AtlasMainWindow/NXDockWidgetTabButton.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | /*! Button on dockwidget tab to open up dockwidget 6 | */ 7 | class NXDockWidgetTabButton : public QPushButton 8 | { 9 | Q_OBJECT 10 | public: 11 | NXDockWidgetTabButton(const QString& text, Qt::DockWidgetArea area); 12 | ~NXDockWidgetTabButton(); 13 | 14 | public: 15 | void setAction(QAction* action) { _action = action; } 16 | QAction* getAction() const { return _action; } 17 | 18 | private: 19 | void setText_(const QString& text); 20 | QStyleOptionButton getStyleOption() const; 21 | 22 | protected: 23 | virtual void paintEvent(QPaintEvent* event) override; 24 | virtual void resizeEvent(QResizeEvent* event) override; 25 | virtual QSize sizeHint() const override; 26 | 27 | private: 28 | QAction* _action; 29 | Qt::DockWidgetArea _area; 30 | Qt::Orientation _orientation; 31 | bool _mirrored; 32 | }; 33 | 34 | Qt::Orientation areaToOrientation(Qt::DockWidgetArea area); -------------------------------------------------------------------------------- /core/AtlasMainWindow/NXDockWidgetTitle.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | class QPushButton; 7 | 8 | class NXDockWidgetTitle : public QFrame 9 | { 10 | Q_OBJECT 11 | public: 12 | NXDockWidgetTitle(); 13 | ~NXDockWidgetTitle(); 14 | 15 | public: 16 | QString getText() const { return _textLabel->text(); } 17 | void setText(const QString& text) { _textLabel->setText(text); } 18 | 19 | void setFloating(bool state); 20 | void setAutoHideEnadled(bool state); 21 | 22 | QPoint menuPos() const; 23 | 24 | protected: 25 | virtual void mousePressEvent(QMouseEvent* event) override; 26 | virtual void mouseReleaseEvent(QMouseEvent* event) override; 27 | virtual void mouseMoveEvent(QMouseEvent* event) override; 28 | 29 | signals: 30 | void menuButton_pressed(); 31 | void autoHideButton_pressed(); 32 | void closeButton_pressed(); 33 | 34 | private: 35 | QPushButton* _menuButton; 36 | QPushButton* _autoHideButton; 37 | QPushButton* _closeButton; 38 | 39 | bool _LMPressed; 40 | QLabel* _textLabel; 41 | bool _autoHideEnabled; 42 | }; -------------------------------------------------------------------------------- /core/AtlasMainWindow/atlasmainwindow_global.h: -------------------------------------------------------------------------------- 1 | #ifndef ATLASMAINWINDOW_GLOBAL_H 2 | #define ATLASMAINWINDOW_GLOBAL_H 3 | 4 | #include 5 | 6 | #ifdef ATLASMAINWINDOW_LIB 7 | # define ATLASMAINWINDOW_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define ATLASMAINWINDOW_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // ATLASMAINWINDOW_GLOBAL_H 13 | -------------------------------------------------------------------------------- /core/DataManager/DataFormats.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | typedef QPair attrib; 8 | typedef QVector feature; -------------------------------------------------------------------------------- /core/DataManager/DataManager_global.h: -------------------------------------------------------------------------------- 1 | #ifndef DATAMANAGER_GLOBAL_H 2 | #define DATAMANAGER_GLOBAL_H 3 | 4 | #include 5 | 6 | #ifdef DATAMANAGER_LIB 7 | # define DATAMANAGER_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define DATAMANAGER_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // DATAMANAGER_GLOBAL_H 13 | -------------------------------------------------------------------------------- /core/DataManager/DataRecord.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "DataManager_global.h" 4 | 5 | #include "../../NameSpace.h" 6 | 7 | #include 8 | 9 | #include 10 | #include 11 | 12 | namespace osgEarth { 13 | class GeoExtent; 14 | class Layer; 15 | } 16 | 17 | class DATAMANAGER_EXPORT DataRecord : public QTreeWidgetItem 18 | { 19 | public: 20 | // Dummy node 21 | DataRecord(const QString& name, DataRecord* parent); 22 | 23 | // osg node: given bounding box 24 | DataRecord(const QString& name, osg::Node* node, DataRecord* parent, const osg::BoundingSphere* bs = NULL); 25 | 26 | // OSGEarth layer: given extent 27 | DataRecord(const QString& name, osgEarth::Layer* layer, DataRecord* parent, const osgEarth::GeoExtent* extent = NULL, int mask = 0xffffffff); 28 | 29 | // OSGEarth layer: given bounding box 30 | DataRecord(const QString& name, osgEarth::Layer* layer, DataRecord* parent, const osg::BoundingSphere* bs, int mask = 0xffffffff); 31 | 32 | ~DataRecord(); 33 | 34 | DataRecord* parent() const; 35 | DataRecord* child(int index) const; 36 | 37 | // Getters 38 | osg::Node* node(); 39 | osgEarth::Layer* layer(); 40 | bool isLayer() const; 41 | 42 | const osg::BoundingSphere* bounding() const; 43 | const osgEarth::GeoExtent* extent() const; 44 | 45 | int mask() const; 46 | void setMask(int mask); 47 | 48 | void setHidden(bool hidden); 49 | 50 | void addChild(DataRecord* child); 51 | 52 | void adjustVisibility(); 53 | 54 | private: 55 | union { 56 | osg::ref_ptr const _node; 57 | osg::ref_ptr const _layer; 58 | }; 59 | 60 | const osg::BoundingSphere* _bs; 61 | const osgEarth::GeoExtent* _extent; 62 | bool const _isLayer; 63 | int _mask; 64 | }; 65 | -------------------------------------------------------------------------------- /core/DataManager/FeatureStyleSettingDlg.cpp: -------------------------------------------------------------------------------- 1 | #include "FeatureStyleSettingDlg.h" 2 | 3 | #include 4 | 5 | FeatureStyleSettingDlg::FeatureStyleSettingDlg(QWidget *parent) 6 | : QDialog(parent) 7 | { 8 | _ui.setupUi(this); 9 | 10 | _ui.iconComboBox->insertItem(0, QIcon("Resources/circle1.png"), "", "geometry"); 11 | _ui.iconComboBox->insertItem(1, QIcon("Resources/rec1.png"), "","Resources/rec.png"); 12 | _ui.iconComboBox->insertItem(2, QIcon("Resources/star1.png"), "", "Resources/star.png"); 13 | 14 | 15 | connect(_ui.okButton, SIGNAL(clicked()), SLOT(OkButtonClicked())); 16 | connect(_ui.cancelButton, SIGNAL(clicked()), SLOT(CancelBtClicked())); 17 | 18 | _ui.lyHeightTextEdit->setPlaceholderText("0"); 19 | } 20 | 21 | FeatureStyleSettingDlg::~FeatureStyleSettingDlg() 22 | { 23 | 24 | } 25 | 26 | void FeatureStyleSettingDlg::setLayerStyle(std::string gemtype, float layerHeight, const QString& layerName,float layerHeightPre) 27 | { 28 | if (QString::fromStdString(gemtype).contains("Point")|| QString::fromStdString(gemtype).contains("Icon")) 29 | _ui.iconComboBox->setEnabled(true); 30 | else 31 | _ui.iconComboBox->setEnabled(false); 32 | 33 | _ui.lyHeightTextEdit->setPlaceholderText(QString::number(layerHeightPre, 'f', 1)); 34 | 35 | _ui.lyHeightTextEdit->setText(""); 36 | } 37 | 38 | void FeatureStyleSettingDlg::OkButtonClicked() 39 | { 40 | int index = _ui.iconComboBox->currentIndex(); 41 | QVariant va=_ui.iconComboBox->itemData(index); 42 | _iconPath = va.value(); 43 | 44 | _layerHeight = _ui.lyHeightTextEdit->toPlainText().toFloat(); 45 | 46 | this->accept(); 47 | } 48 | void FeatureStyleSettingDlg::CancelBtClicked() 49 | { 50 | this->hide(); 51 | } -------------------------------------------------------------------------------- /core/DataManager/FeatureStyleSettingDlg.h: -------------------------------------------------------------------------------- 1 | #ifndef FEATURESTYLESETTINGDLG_H 2 | #define FEATURESTYLESETTINGDLG_H 3 | 4 | #include 5 | #include "ui_FeatureStyleSettingDlg.h" 6 | #include 7 | 8 | class FeatureStyleSettingDlg : public QDialog 9 | { 10 | Q_OBJECT 11 | 12 | public: 13 | FeatureStyleSettingDlg(QWidget *parent = 0); 14 | ~FeatureStyleSettingDlg(); 15 | 16 | void setLayerStyle(std::string gemtype,float layerHeight,const QString& layerName, float layerHeightPre); 17 | 18 | QString getIconPath() { return _iconPath; } 19 | float getLayerHeight() { return _layerHeight; } 20 | public slots: 21 | void OkButtonClicked(); 22 | void CancelBtClicked(); 23 | 24 | private: 25 | Ui::FeatureStyleSettingDlg _ui; 26 | 27 | QString _iconPath; 28 | float _layerHeight; 29 | }; 30 | 31 | #endif // FEATURESTYLESETTINGDLG_H 32 | -------------------------------------------------------------------------------- /core/DataManager/FindNode.hpp: -------------------------------------------------------------------------------- 1 | #ifndef FINDNODE_H 2 | #define FINDNODE_H 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | static osg::Node* findNodeInNode(const std::string &searchName, osg::Node *currNode) 10 | { 11 | osg::Group *currGroup = NULL; 12 | osg::Node *foundNode = NULL; 13 | 14 | if (!currNode) 15 | { 16 | return NULL; 17 | } 18 | 19 | if (currNode->getName() == searchName) 20 | { 21 | return currNode; 22 | } 23 | 24 | currGroup = currNode->asGroup(); 25 | 26 | if (currGroup) 27 | { 28 | for (unsigned int i = 0; i < currGroup->getNumChildren(); i++) 29 | { 30 | foundNode = findNodeInNode(searchName, currGroup->getChild(i)); 31 | 32 | if (foundNode) 33 | { 34 | return foundNode; 35 | } 36 | } 37 | 38 | return NULL; 39 | } 40 | else 41 | { 42 | return NULL; 43 | } 44 | } 45 | 46 | #endif // FINDNODE_H 47 | -------------------------------------------------------------------------------- /core/DataManager/FontVisitor.cpp: -------------------------------------------------------------------------------- 1 | #include "FontVisitor.h" 2 | 3 | #include 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | FontVisitor::FontVisitor( osgText::Font* font, float size) 10 | : NodeVisitor( NodeVisitor::TRAVERSE_ALL_CHILDREN ) 11 | { 12 | setFont(font, size); 13 | } 14 | 15 | FontVisitor::FontVisitor(QFontInfo& font) 16 | : NodeVisitor( NodeVisitor::TRAVERSE_ALL_CHILDREN ) 17 | { 18 | setFont(font); 19 | } 20 | 21 | void FontVisitor::apply( osg::Geode &geode ) 22 | { 23 | for( unsigned int geodeIdx = 0; geodeIdx < geode.getNumDrawables(); geodeIdx++ ) { 24 | if ( strcmp(geode.getDrawable(geodeIdx)->className(), "Text") == 0) 25 | { 26 | osgText::Text *curText = (osgText::Text*)geode.getDrawable( geodeIdx ); 27 | curText->setCharacterSize(_size); 28 | } 29 | } 30 | } 31 | 32 | void FontVisitor::setFont(QFontInfo& fontInfo) 33 | { 34 | QString fontName = fontInfo.family(); 35 | if (fontInfo.bold()) fontName.append("b"); 36 | if (fontInfo.italic()) fontName.append("i"); 37 | if (!(_font = osgText::readFontFile((fontName + ".ttf").toStdString())).valid()) 38 | if (!(_font = osgText::readFontFile((fontName + ".ttc").toStdString())).valid()) 39 | _font = osgText::Font::getDefaultFont(); 40 | _font->setMinFilterHint(osg::Texture::LINEAR); 41 | _font->setMagFilterHint(osg::Texture::LINEAR); 42 | _size = fontInfo.pointSizeF(); 43 | } 44 | 45 | void FontVisitor::setFont(osgText::Font* font, float size /*= 25.0f*/) 46 | { 47 | if (font != NULL) 48 | _font = font; 49 | else 50 | { 51 | _font = osgText::Font::getDefaultFont(); 52 | _font->setMinFilterHint(osg::Texture::LINEAR); 53 | _font->setMagFilterHint(osg::Texture::LINEAR); 54 | } 55 | _size = size; 56 | } 57 | -------------------------------------------------------------------------------- /core/DataManager/FontVisitor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | 7 | namespace osgText { 8 | class Font; 9 | } 10 | 11 | 12 | class FontVisitor : public osg::NodeVisitor 13 | { 14 | public : 15 | FontVisitor( osgText::Font* font = NULL, float size = 25.0f); 16 | FontVisitor( QFontInfo& font); 17 | 18 | virtual ~FontVisitor(){} 19 | 20 | virtual void apply( osg::Geode &geode ); 21 | 22 | void setFont(QFontInfo& fontInfo); 23 | 24 | void setFont(osgText::Font* font, float size = 25.0f); 25 | 26 | private : 27 | osg::ref_ptr _font; 28 | float _size; 29 | }; -------------------------------------------------------------------------------- /core/MapController/MapController_global.h: -------------------------------------------------------------------------------- 1 | #ifndef MAPCONTROLLER_GLOBAL_H 2 | #define MAPCONTROLLER_GLOBAL_H 3 | 4 | #include 5 | 6 | #ifdef MAPCONTROLLER_LIB 7 | # define MAPCONTROLLER_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define MAPCONTROLLER_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // MAPCONTROLLER_GLOBAL_H 13 | -------------------------------------------------------------------------------- /core/MousePicker/MousePicker_global.h: -------------------------------------------------------------------------------- 1 | #ifndef MOUSEPICKER_GLOBAL_H 2 | #define MOUSEPICKER_GLOBAL_H 3 | 4 | #include 5 | 6 | #ifdef MOUSEPICKER_LIB 7 | # define MOUSEPICKER_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define MOUSEPICKER_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // MOUSEPICKER_GLOBAL_H 13 | -------------------------------------------------------------------------------- /core/PluginInterface/PluginInterface_global.h: -------------------------------------------------------------------------------- 1 | #ifndef PLUGININTERFACE_GLOBAL_H 2 | #define PLUGININTERFACE_GLOBAL_H 3 | 4 | #include 5 | 6 | #ifdef PLUGININTERFACE_LIB 7 | # define PLUGININTERFACE_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define PLUGININTERFACE_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // PLUGININTERFACE_GLOBAL_H 13 | -------------------------------------------------------------------------------- /core/PluginManager/PluginManager.h: -------------------------------------------------------------------------------- 1 | #ifndef PLUGINMANAGER_H 2 | #define PLUGINMANAGER_H 3 | 4 | #include "PluginManager_global.h" 5 | 6 | #include "../../NameSpace.h" 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | class PluginInterface; 15 | class ViewerWidget; 16 | class DataManager; 17 | struct PluginEntry; 18 | 19 | QT_BEGIN_NAMESPACE 20 | class QToolBar; 21 | class QMenu; 22 | class QTreeWidgetItem; 23 | QT_END_NAMESPACE 24 | 25 | 26 | class PLUGINMANAGER_EXPORT PluginManager : public QObject 27 | { 28 | Q_OBJECT 29 | 30 | public: 31 | struct PluginGroup { 32 | QString groupName; 33 | QToolBar* toolBar; 34 | QMenu* menu; 35 | }; 36 | 37 | public: 38 | PluginManager(QObject *parent, DataManager* dataManager, ViewerWidget* viewer); 39 | ~PluginManager(); 40 | void registerPluginGroup(const QString& name, QToolBar* toolBar, QMenu* menu); 41 | void loadPlugins(); 42 | 43 | public slots: 44 | void loadContextMenu(QMenu* contextMenu, QTreeWidgetItem* selectedItem); 45 | 46 | signals: 47 | void sendNowInitName(const QString&); 48 | 49 | protected: 50 | PluginEntry* getOrCreatePluginEntry(const QString& pluginName); 51 | 52 | void parseDependency(const QString& fileName, const QDir& pluginsDir); 53 | 54 | void loadPlugin(PluginEntry* pluginEntry); 55 | void registerPlugin(PluginInterface* plugin); 56 | PluginInterface* instantiate(QObject* instance); 57 | 58 | private: 59 | QMap _pluginGroups; 60 | QMap _pluginEntries; 61 | QVector _readyToLoad; 62 | QVector _loadedPlugins; 63 | ViewerWidget* _viewerWidget; 64 | DataManager* _dataManager; 65 | }; 66 | 67 | #endif // PLUGINMANAGER_H 68 | -------------------------------------------------------------------------------- /core/PluginManager/PluginManager_global.h: -------------------------------------------------------------------------------- 1 | #ifndef PLUGINMANAGER_GLOBAL_H 2 | #define PLUGINMANAGER_GLOBAL_H 3 | 4 | #include 5 | 6 | #ifdef PLUGINMANAGER_LIB 7 | # define PLUGINMANAGER_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define PLUGINMANAGER_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // PLUGINMANAGER_GLOBAL_H 13 | -------------------------------------------------------------------------------- /core/SettingsManager/SettingsManager.h: -------------------------------------------------------------------------------- 1 | #ifndef SETTINGSMANAGER_H 2 | #define SETTINGSMANAGER_H 3 | #include "SettingsManager_global.h" 4 | 5 | #include "../NameSpace.h" 6 | 7 | #include 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | QT_BEGIN_NAMESPACE 14 | class QMenu; 15 | QT_END_NAMESPACE 16 | 17 | namespace osgEarth { 18 | class SpatialReference; 19 | } 20 | 21 | class SETTINGSMANAGER_EXPORT SettingsManager : public QObject 22 | { 23 | Q_OBJECT 24 | 25 | public: 26 | SettingsManager(QObject* parent = nullptr); 27 | ~SettingsManager(); 28 | 29 | void setOrAddSetting(const QString& key, const QVariant& value); 30 | QVariant getOrAddSetting(const QString& key, const QVariant& defaultValue); 31 | 32 | void setupUi(QMenu* menu); 33 | 34 | void setGlobalSRS(const osgEarth::SpatialReference * globalSRS); 35 | const osgEarth::SpatialReference* getGlobalSRS(); 36 | 37 | public slots: 38 | void reset(); 39 | 40 | private: 41 | QSettings _globalSettings; 42 | const osgEarth::SpatialReference* _globalSRS; 43 | }; 44 | 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /core/SettingsManager/SettingsManager_global.h: -------------------------------------------------------------------------------- 1 | #ifndef SETTINGSMANAGER_GLOBAL_H 2 | #define SETTINGSMANAGER_GLOBAL_H 3 | 4 | #include 5 | 6 | #ifdef SETTINGSMANAGER_LIB 7 | # define SETTINGSMANAGER_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define SETTINGSMANAGER_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // SETTINGSMANAGER_GLOBAL_H 13 | -------------------------------------------------------------------------------- /core/ViewerWidget/Compass.cpp: -------------------------------------------------------------------------------- 1 | #include "Compass.h" 2 | 3 | #include 4 | #include 5 | 6 | Compass::Compass() 7 | { 8 | } 9 | 10 | Compass::Compass(const Compass& copy, osg::CopyOp copyop) 11 | : osg::Camera(copy, copyop), 12 | _plateTransform(copy._plateTransform), 13 | _needleTransform(copy._needleTransform), 14 | _mainCamera(copy._mainCamera) 15 | { 16 | } 17 | 18 | Compass::~Compass() 19 | { 20 | } 21 | 22 | void Compass::traverse(osg::NodeVisitor& nv) 23 | { 24 | if (_mainCamera.valid() && nv.getVisitorType() == osg::NodeVisitor::CULL_VISITOR) 25 | { 26 | osg::Matrix matrix = _mainCamera->getViewMatrix(); 27 | matrix.setTrans(osg::Vec3()); 28 | 29 | osg::Vec3 northVec = osg::Y_AXIS * matrix; 30 | northVec.z() = 0.0f; 31 | northVec.normalize(); 32 | 33 | osg::Vec3 axis = osg::Y_AXIS ^ northVec; 34 | float angle = atan2(axis.length(), osg::Y_AXIS*northVec); 35 | axis.normalize(); 36 | 37 | if (_plateTransform.valid()) 38 | _plateTransform->setMatrix(osg::Matrix::rotate(angle, axis)); 39 | } 40 | 41 | _plateTransform->accept(nv); 42 | //_needleTransform->accept(nv); 43 | osg::Camera::traverse(nv); 44 | } -------------------------------------------------------------------------------- /core/ViewerWidget/Compass.h: -------------------------------------------------------------------------------- 1 | #ifndef COMPASS 2 | #define COMPASS 3 | 4 | #include 5 | #include 6 | 7 | class Compass : public osg::Camera 8 | { 9 | public: 10 | Compass(); 11 | Compass(const Compass& copy, osg::CopyOp copyop = osg::CopyOp::SHALLOW_COPY); 12 | META_Node(osg, Compass); 13 | 14 | /** Set the plate of the compass inside the camera projection range. */ 15 | void setPlate(osg::MatrixTransform* plate) { _plateTransform = plate; } 16 | osg::MatrixTransform* getPlate() { return _plateTransform.get(); } 17 | const osg::MatrixTransform* getPlate() const { return _plateTransform.get(); } 18 | 19 | /** Set the needle of the compass inside the camera projection range. */ 20 | void setNeedle(osg::MatrixTransform* needle) { _needleTransform = needle; } 21 | osg::MatrixTransform* getNeedle() { return _needleTransform.get(); } 22 | const osg::MatrixTransform* getNeedle() const { return _needleTransform.get(); } 23 | 24 | /** Set the main camera for the compass; otherwise there will be no effect. */ 25 | void setMainCamera(osg::Camera* camera) { _mainCamera = camera; } 26 | osg::Camera* getMainCamera() { return _mainCamera.get(); } 27 | const osg::Camera* getMainCamera() const { return _mainCamera.get(); } 28 | 29 | virtual void traverse(osg::NodeVisitor& nv); 30 | 31 | protected: 32 | virtual ~Compass(); 33 | 34 | osg::ref_ptr _plateTransform; 35 | osg::ref_ptr _needleTransform; 36 | osg::observer_ptr _mainCamera; 37 | }; 38 | 39 | #endif //COMPASS -------------------------------------------------------------------------------- /core/ViewerWidget/ViewerWidget_global.h: -------------------------------------------------------------------------------- 1 | #ifndef VIEWERWIDGET_GLOBAL_H 2 | #define VIEWERWIDGET_GLOBAL_H 3 | 4 | #include 5 | 6 | #ifdef VIEWERWIDGET_LIB 7 | # define VIEWERWIDGET_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define VIEWERWIDGET_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // VIEWERWIDGET_GLOBAL_H 13 | -------------------------------------------------------------------------------- /libs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | add_subdirectory(CrowdSim) 3 | -------------------------------------------------------------------------------- /libs/CrowdSim/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_LIB_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ../ 19 | ../../libs 20 | ) 21 | 22 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h ${CMAKE_CURRENT_SOURCE_DIR}/libpedsim/*.h) 23 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/libpedsim/*.cpp) 24 | 25 | set(${PROJECT_NAME}_HDRS 26 | ${HFiles} 27 | ) 28 | 29 | set(${PROJECT_NAME}_SRCS 30 | ${CppFiles} 31 | ${UiFiles} 32 | ) 33 | 34 | set(${PROJECT_NAME}_JSONS 35 | ${JsonFiles} 36 | ) 37 | 38 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 39 | 40 | target_link_libraries(${PROJECT_NAME} 41 | 42 | ) 43 | -------------------------------------------------------------------------------- /libs/CrowdSim/CrowdSim.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #pragma warning(disable:4251) 4 | 5 | #include "scene.h" 6 | 7 | #include "config.h" 8 | 9 | namespace Ped { 10 | class Agent; 11 | class Waypoint; 12 | class Obstacle; 13 | } 14 | 15 | class PathPlanner; 16 | 17 | class CrowdSim 18 | { 19 | public: 20 | CrowdSim(Ped::Config& config); 21 | ~CrowdSim(); 22 | 23 | // Add obstacle as line 24 | void addObstacle(double x1, double y1, double x2, double y2); 25 | 26 | // Add a group of agents scattered in a rectangle 27 | Ped::AgentGroup* addAgentGroup(int numAgents, double x, double y, double dx, double dy); 28 | 29 | std::vector addAgents(Ped::AgentGroup* agentGroup, int numAgents, double x, double y, double dx, double dy); 30 | 31 | // Asign way points to the last agent group 32 | void addWaypoint(Ped::AgentGroup* agentGroup, double x, double y, double r); 33 | 34 | void updateScene(); 35 | 36 | void moveAllAgents() { _scene->moveAgents(_config.simh); } 37 | 38 | int findPath(Ped::AgentGroup* agentGroup, Ped::Waypoint* start, Ped::Waypoint* end); 39 | 40 | int findPath(Ped::AgentGroup* agentGroup, double xStart, double yStart, double xEnd, double yEnd); 41 | 42 | void cleanUp() { _scene->cleanup(); } 43 | 44 | Ped::Scene* getScene() { return _scene; } 45 | 46 | void init(double x, double y, double w, double h); 47 | 48 | void reset(); 49 | 50 | void resetPather(); 51 | 52 | private: 53 | Ped::Config& _config; 54 | Ped::Scene* _scene; 55 | PathPlanner* _pathPlanner; 56 | std::vector _agentGroups; 57 | }; 58 | 59 | -------------------------------------------------------------------------------- /libs/CrowdSim/cell.cpp: -------------------------------------------------------------------------------- 1 | #include "cell.h" 2 | using namespace Ped; 3 | 4 | namespace Ped { 5 | const Tvector pathDirections[8] = { 6 | Tvector(-0.707f, -0.707f), 7 | Tvector(.0f, -1.f), 8 | Tvector(0.707f, -0.707f), 9 | Tvector(1.f, .0f), 10 | Tvector(0.707f, 0.707f), 11 | Tvector(.0f, 1.f), 12 | Tvector(-0.707f, 0.707f), 13 | Tvector(-1.f, .0f), 14 | }; 15 | 16 | const Tvector flowDirections[4] = { 17 | Tvector(.0f, -1.f), 18 | Tvector(1.f, .0f), 19 | Tvector(.0f, 1.f), 20 | Tvector(-1.f, .0f), 21 | }; 22 | 23 | const int cellNeighbourIndex[9][2] = { 24 | { -1, -1 }, 25 | { 0, -1 }, 26 | { 1, -1 }, 27 | { 1, 0 }, 28 | { 1, 1 }, 29 | { 0, 1 }, 30 | { -1, 1 }, 31 | { -1, 0 }, 32 | { 0, 0 } 33 | }; 34 | } 35 | 36 | float Cell::width, Cell::height, Cell::area; 37 | 38 | float Ped::Cell::maxDensity = 0; 39 | 40 | Cell::Cell(float x, float y) : 41 | _x(x), _y(y), _center{ x + width / 2 , y + height / 2 } 42 | { 43 | } 44 | 45 | Ped::Cell::Cell(float x, float y, int idX, int idY) : 46 | _x(x), _y(y), _center{ x + width / 2 , y + height / 2 }, _idX(idX), _idY(idY) 47 | { 48 | } 49 | 50 | void Ped::Cell::setSize(float w, float h) 51 | { 52 | width = w; 53 | height = h; 54 | area = w * h; 55 | } 56 | 57 | bool Ped::Cell::setNextCellInPath(const Cell* destination, Cell* next) 58 | { 59 | // Assume that path planning is stable, then no need to update 60 | // when the path has been planned 61 | if (_nextCellInPath.find(destination) != _nextCellInPath.end()) 62 | return false; 63 | 64 | _nextCellInPath[destination] = next; 65 | return true; 66 | } -------------------------------------------------------------------------------- /libs/CrowdSim/config.h: -------------------------------------------------------------------------------- 1 | #ifndef _config_h_ 2 | #define _config_h_ 3 | 4 | namespace Ped { 5 | class Config { 6 | 7 | public: 8 | float simWallForce = 1.0f; 9 | float simPedForce = 5.0f; 10 | float maxLookAheadTime = 2.0f; // Max time range for agents to predict density changes 11 | float densityRestricted = 1.0f; // Agents feels pressure if density exceeds this 12 | float densityUnpassable = 4.0f; // Agents cannot move in if density exceeds this 13 | float willLimit = 3.0f; // Agents will not change prefered direction if their will is lower than this 14 | double simh = 0.15; // Simulation step size 15 | int generateNumber = 5; 16 | float inertiaLimit = 0.2f; // Min acceleration that allows agents to change directions 17 | float maxAcceleration = 1.5f; // Max acceleration that agents can adopt 18 | }; 19 | 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /libs/CrowdSim/libpedsim/ped_includes.h: -------------------------------------------------------------------------------- 1 | // 2 | // pedsim - A microscopic pedestrian simulation system. 3 | // Copyright (c) by Christian Gloor 4 | // 5 | 6 | #ifndef _ped_includes_h_ 7 | #define _ped_includes_h_ 1 8 | 9 | #include "ped_agent.h" 10 | #include "ped_obstacle.h" 11 | #include "ped_waypoint.h" 12 | #include "ped_scene.h" 13 | #include "ped_outputwriter.h" 14 | 15 | namespace Ped { 16 | const double LIBEXPORT LIBPEDSIM_VERSION = 2.4; 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /libs/CrowdSim/libpedsim/ped_vector.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // pedsim - A microscopic pedestrian simulation system. 3 | // Copyright (c) by Christian Gloor 4 | // 5 | 6 | #include "ped_vector.h" 7 | 8 | #include 9 | #include 10 | 11 | #ifdef _WIN32 12 | static const double M_PI = 3.14159265358979323846; 13 | #endif 14 | 15 | bool operator==(const Ped::Tvector& vector1In, const Ped::Tvector& vector2In) { 16 | return (vector1In.x == vector2In.x) 17 | && (vector1In.y == vector2In.y) 18 | && (vector1In.z == vector2In.z); 19 | } 20 | 21 | 22 | bool operator!=(const Ped::Tvector& vector1In, const Ped::Tvector& vector2In) { 23 | return (vector1In.x != vector2In.x) 24 | || (vector1In.y != vector2In.y) 25 | || (vector1In.z != vector2In.z); 26 | } 27 | 28 | 29 | Ped::Tvector operator+(const Ped::Tvector& vector1In, const Ped::Tvector& vector2In) { 30 | return Ped::Tvector( 31 | vector1In.x + vector2In.x, 32 | vector1In.y + vector2In.y, 33 | vector1In.z + vector2In.z); 34 | } 35 | 36 | 37 | Ped::Tvector operator-(const Ped::Tvector& vector1In, const Ped::Tvector& vector2In) { 38 | return Ped::Tvector( 39 | vector1In.x - vector2In.x, 40 | vector1In.y - vector2In.y, 41 | vector1In.z - vector2In.z); 42 | } 43 | 44 | 45 | Ped::Tvector operator-(const Ped::Tvector& vectorIn) { 46 | return Ped::Tvector( 47 | -vectorIn.x, 48 | -vectorIn.y, 49 | -vectorIn.z); 50 | } 51 | 52 | 53 | Ped::Tvector operator*(double factor, const Ped::Tvector& vector) { 54 | return vector.scaled(factor); 55 | } 56 | 57 | double Ped::Tvector::angleTo(const Tvector &other) const 58 | { 59 | double angleThis = polarAngle(); 60 | double angleOther = other.polarAngle(); 61 | 62 | // compute angle 63 | double diffAngle = angleOther - angleThis; 64 | // → normalize angle 65 | if (diffAngle > M_PI) diffAngle -= 2 * M_PI; 66 | else if (diffAngle <= -M_PI) diffAngle += 2 * M_PI; 67 | 68 | return diffAngle; 69 | } 70 | -------------------------------------------------------------------------------- /libs/CrowdSim/obstacle.cpp: -------------------------------------------------------------------------------- 1 | #include "obstacle.h" 2 | 3 | using namespace Ped; 4 | 5 | Obstacle::Obstacle(double pax, double pay, double pbx, double pby) : Tobstacle(pax, pay, pbx, pby) 6 | { 7 | }; 8 | 9 | void Obstacle::setPosition(double pax, double pay, double pbx, double pby) 10 | { 11 | Tobstacle::setPosition(pax, pay, pbx, pby); 12 | }; 13 | 14 | -------------------------------------------------------------------------------- /libs/CrowdSim/obstacle.h: -------------------------------------------------------------------------------- 1 | #ifndef _obstacle_h_ 2 | #define _obstacle_h_ 3 | 4 | #pragma warning(disable:4251) 5 | 6 | #include "libpedsim/ped_obstacle.h" 7 | 8 | using namespace std; 9 | 10 | /// \author chgloor 11 | /// \date 2012-01-17 12 | namespace Ped { 13 | class Obstacle : public Tobstacle { 14 | private: 15 | 16 | public: 17 | Obstacle(double ax, double ay, double bx, double by); 18 | 19 | void setPosition(double ax, double ay, double bx, double by); 20 | }; 21 | } 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /libs/CrowdSim/scene.cpp: -------------------------------------------------------------------------------- 1 | #include "scene.h" 2 | 3 | //#include 4 | using namespace Ped; 5 | 6 | #include "grid.h" 7 | 8 | //void Scene::addAgent(Agent *a) { 9 | // // add agent to scene 10 | // // (take responsibility for object deletion) 11 | // agents.push_back(a); 12 | // a->setscene(this); 13 | // if (tree != NULL) 14 | // tree->addAgent(a); 15 | //} 16 | 17 | void Ped::Scene::update() 18 | { 19 | grid->updateCellAttributes(); 20 | } 21 | 22 | void Ped::Scene::moveAgents(double h) 23 | { 24 | // update timestep 25 | timestep++; 26 | 27 | // first update forces 28 | for (Tagent* agent : agents) 29 | agent->computeForces(); 30 | 31 | grid->resetCellChangeList(); 32 | 33 | // then move agents according to their forces 34 | for (Tagent* agent : agents) 35 | agent->move(h); 36 | } 37 | 38 | void Scene::addAgent(Ped::Tagent * a) 39 | { 40 | Ped::Tscene::addAgent(a); 41 | grid->addAgent(static_cast(a)); 42 | } 43 | 44 | void Scene::moveAgent(const Ped::Tagent * a) 45 | { 46 | Ped::Tscene::moveAgent(a); 47 | grid->moveAgent(static_cast(a)); 48 | } 49 | 50 | Ped::Scene::Scene(double x, double y, double w, double h) : Tscene(x, y, w, h) 51 | { 52 | //tree = new Tree(this, 0, x, y, w, h); 53 | grid = new Grid(x, y, w, h); 54 | } 55 | 56 | Ped::Scene::~Scene() 57 | { 58 | delete grid; 59 | } 60 | 61 | void Ped::Scene::addObstacle(Tobstacle* o) 62 | { 63 | Ped::Tscene::addObstacle(o); 64 | grid->addObstacle(o); 65 | } 66 | -------------------------------------------------------------------------------- /libs/CrowdSim/scene.h: -------------------------------------------------------------------------------- 1 | #ifndef SCENE_H 2 | #define SCENE_H 3 | 4 | #pragma warning(disable:4251) 5 | 6 | #include "libpedsim/ped_scene.h" 7 | 8 | #include "config.h" 9 | //#include "tree.h" 10 | #include "agent.h" 11 | 12 | using namespace std; 13 | 14 | class PathPlanner; 15 | 16 | namespace Ped { 17 | class Grid; 18 | class Cell; 19 | 20 | class Scene : public Tscene { 21 | friend class Agent; 22 | friend class Tagent; 23 | //friend class Tree; 24 | 25 | public: 26 | Scene(double x, double y, double w, double h); 27 | 28 | ~Scene(); 29 | 30 | virtual void update(); 31 | virtual void addAgent(Tagent* a); 32 | virtual void addObstacle(Tobstacle* o); 33 | virtual void moveAgents(double h); 34 | 35 | Grid* getGrid() { return grid; } 36 | 37 | void setPathPlanner(PathPlanner* planner) { pathPlanner = planner; } 38 | PathPlanner* getPathPlanner() { return pathPlanner; } 39 | 40 | protected: 41 | void moveAgent(const Tagent *a); 42 | 43 | protected: 44 | Grid* grid; 45 | PathPlanner* pathPlanner; 46 | //void addAgent(Agent *a); 47 | 48 | //protected: 49 | // void moveAgent(const Agent *a) { 50 | // Ped::Tscene::moveAgent(a); 51 | // } 52 | }; 53 | } 54 | 55 | #endif -------------------------------------------------------------------------------- /libs/CrowdSim/tree.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // pedsim - A microscopic pedestrian simulation system. 3 | // Copyright (c) 2003 - 2012 by Christian Gloor 4 | // 5 | 6 | #include "tree.h" 7 | #include "config.h" 8 | #include "scene.h" 9 | 10 | #include 11 | 12 | using namespace std; 13 | using namespace Ped; 14 | 15 | 16 | /// Description: set intial values 17 | /// \date 2012-01-28 18 | Tree::Tree(Scene *pedscene, int pdepth, double px, double py, double pw, double ph) : Ped::Ttree(pedscene, pdepth, px, py, pw, ph) { 19 | scene = pedscene; 20 | }; 21 | 22 | 23 | /// Destructor: removes the graphics from the screen, too. 24 | /// \date 2012-01-28 25 | Tree::~Tree() { 26 | } 27 | 28 | /// \date 2012-02-05 29 | int Tree::cut() { 30 | return Ttree::cut(); 31 | } 32 | 33 | /// New addChildren method. Does basically the same as the base method, but passes the graphicsscene to the children. 34 | /// \date 2012-02-04 35 | void Tree::addChildren() { 36 | tree1 = new Tree(scene, static_cast(getdepth()) + 1, getx(), gety(), 0.5 * getw(), 0.5 * geth()); 37 | tree2 = new Tree(scene, static_cast(getdepth()) + 1, getx() + 0.5 * getw(), gety(), 0.5 * getw(), 0.5 * geth()); 38 | tree3 = new Tree(scene, static_cast(getdepth()) + 1, getx() + 0.5 * getw(), gety() + 0.5 * geth(), 0.5 * getw(), 0.5 * geth()); 39 | tree4 = new Tree(scene, static_cast(getdepth()) + 1, getx(), gety() + 0.5 * geth(), 0.5 * getw(), 0.5 * geth()); 40 | } 41 | 42 | -------------------------------------------------------------------------------- /libs/CrowdSim/tree.h: -------------------------------------------------------------------------------- 1 | #ifndef _tree_h_ 2 | #define _tree_h_ 3 | 4 | #pragma warning(disable:4251) 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | using namespace std; 11 | 12 | #include "libpedsim/ped_tree.h" 13 | 14 | namespace Ped { 15 | class Scene; 16 | 17 | class Tree : public Ped::Ttree { 18 | private: 19 | Scene *scene; 20 | 21 | public: 22 | 23 | Tree(Scene *pedscene, int depth, double x, double y, double w, double h); 24 | virtual ~Tree(); 25 | 26 | virtual void addChildren(); 27 | 28 | int cut(); 29 | }; 30 | } 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /libs/CrowdSim/waypoint.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // pedsim - A microscopic pedestrian simulation system. 3 | // Copyright (c) 2003 - 2012 by Christian Gloor 4 | // 5 | 6 | #include "waypoint.h" 7 | #include "config.h" 8 | 9 | #include 10 | 11 | using namespace std; 12 | using namespace Ped; 13 | 14 | 15 | /// Description: set intial values 16 | /// \date 2012-01-07 17 | Waypoint::Waypoint(double px, double py, double pr) : Twaypoint(px, py, pr) { 18 | }; 19 | 20 | 21 | /// \date 2012-01-07 22 | Waypoint::Waypoint() : Twaypoint() { 23 | }; 24 | 25 | 26 | /// returns the force into the direction of the waypoint 27 | /// \date 2012-01-10 28 | Ped::Tvector Waypoint::getForce(double myx, double myy, double fromx, double fromy, bool *reached) { 29 | 30 | return Twaypoint::getForce(myx, myy, fromx, fromy, reached); 31 | } 32 | -------------------------------------------------------------------------------- /libs/CrowdSim/waypoint.h: -------------------------------------------------------------------------------- 1 | #ifndef _waypoint_h_ 2 | #define _waypoint_h_ 3 | 4 | #pragma warning(disable:4251) 5 | 6 | #include 7 | 8 | #include "libpedsim/ped_waypoint.h" 9 | #include "libpedsim/ped_vector.h" 10 | 11 | using namespace std; 12 | 13 | /// Class that descripts an waypoint object 14 | /// \author chgloor 15 | /// \date 2012-01-07 16 | namespace Ped { 17 | class Waypoint : public Ped::Twaypoint { 18 | private: 19 | 20 | public: 21 | Waypoint(); 22 | Waypoint(double x, double y, double r); 23 | Ped::Tvector getForce(double myx, double myy, double fromx, double fromy, bool *reached); ///< returns the force into the direction of the waypoint 24 | }; 25 | } 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /plugins/AddArcGISData/AddArcGISData.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | QT_BEGIN_NAMESPACE 6 | class QToolBar; 7 | class QAction; 8 | class QMenu; 9 | QT_END_NAMESPACE 10 | 11 | class AddArcGISData : public EarthDataInterface 12 | { 13 | Q_OBJECT 14 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "AddArcGISData.json") 15 | Q_INTERFACES(PluginInterface) 16 | 17 | public: 18 | AddArcGISData(); 19 | ~AddArcGISData(); 20 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 21 | 22 | public slots: 23 | void addImage(); 24 | void addTerrain(); 25 | void addFeature(); 26 | }; 27 | -------------------------------------------------------------------------------- /plugins/AddArcGISData/AddArcGISData.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "AddArcGISData", 3 | "Version": "0.0.1", 4 | "Dependencies": [ 5 | { 6 | "Name": "EarthDataInterface", 7 | "Version": "0.0.1" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /plugins/AddArcGISData/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ../ 19 | ../../drivers/ 20 | ) 21 | 22 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 23 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 24 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 25 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 26 | 27 | set(${PROJECT_NAME}_HDRS 28 | ${HFiles} 29 | ) 30 | 31 | set(${PROJECT_NAME}_SRCS 32 | ${CppFiles} 33 | ${UiFiles} 34 | ) 35 | 36 | set(${PROJECT_NAME}_JSONS 37 | ${JsonFiles} 38 | ) 39 | 40 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 41 | 42 | target_link_libraries(${PROJECT_NAME} 43 | EarthDataInterface 44 | ) 45 | -------------------------------------------------------------------------------- /plugins/AddGDALData/AddGDALData.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | QT_BEGIN_NAMESPACE 6 | class QToolBar; 7 | class QAction; 8 | class QMenu; 9 | QT_END_NAMESPACE 10 | 11 | class AddGDALData: public EarthDataInterface 12 | { 13 | Q_OBJECT 14 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "AddGDALData.json") 15 | Q_INTERFACES(PluginInterface) 16 | 17 | public: 18 | AddGDALData(); 19 | 20 | ~AddGDALData(); 21 | 22 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 23 | 24 | public slots: 25 | void addImage(); 26 | 27 | void addTerrain(); 28 | 29 | void addFeature(); 30 | }; 31 | -------------------------------------------------------------------------------- /plugins/AddGDALData/AddGDALData.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "AddGDALData", 3 | "Version": "0.0.1", 4 | "Dependencies": [ 5 | { 6 | "Name": "EarthDataInterface", 7 | "Version": "0.0.1" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /plugins/AddGDALData/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ../ 19 | ) 20 | 21 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 22 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 23 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 24 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 25 | 26 | set(${PROJECT_NAME}_HDRS 27 | ${HFiles} 28 | ) 29 | 30 | set(${PROJECT_NAME}_SRCS 31 | ${CppFiles} 32 | ${UiFiles} 33 | ) 34 | 35 | set(${PROJECT_NAME}_JSONS 36 | ${JsonFiles} 37 | ) 38 | 39 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 40 | 41 | target_link_libraries(${PROJECT_NAME} 42 | EarthDataInterface 43 | ) 44 | -------------------------------------------------------------------------------- /plugins/AddModel/AddModel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | namespace osg { 6 | class Node; 7 | class PositionAttitudeTransform; 8 | } 9 | 10 | namespace osgEarth { 11 | namespace Annotation { 12 | class ModelNode; 13 | } 14 | } 15 | 16 | QT_BEGIN_NAMESPACE 17 | class QToolBar; 18 | class QAction; 19 | class QMenu; 20 | QT_END_NAMESPACE 21 | 22 | class AddModel : public EarthDataInterface 23 | { 24 | Q_OBJECT 25 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "AddModel.json") 26 | Q_INTERFACES(PluginInterface) 27 | 28 | public: 29 | AddModel(); 30 | ~AddModel(); 31 | 32 | virtual void onLeftButton(); 33 | virtual void onRightButton(); 34 | virtual void onMouseMove(); 35 | virtual void finish(); 36 | virtual bool loadModel(std::string filePath); 37 | virtual void setupUi(QToolBar* toolBar, QMenu* menu); 38 | 39 | public slots: 40 | virtual void toggle(bool checked = true) override; 41 | 42 | protected: 43 | osg::ref_ptr _modelNode; 44 | QString _filepath; 45 | 46 | QAction* _modelAction1; 47 | QAction* _modelAction2; 48 | QAction* _modelAction3; 49 | QAction* _modelFromFileAction; 50 | }; 51 | 52 | -------------------------------------------------------------------------------- /plugins/AddModel/AddModel.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "AddModel", 3 | "Version": "0.0.1", 4 | "Dependencies": [ 5 | { 6 | "Name": "EarthDataInterface", 7 | "Version": "0.0.1" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /plugins/AddModel/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ../ 19 | ) 20 | 21 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 22 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 23 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 24 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 25 | 26 | set(${PROJECT_NAME}_HDRS 27 | ${HFiles} 28 | ) 29 | 30 | set(${PROJECT_NAME}_SRCS 31 | ${CppFiles} 32 | ${UiFiles} 33 | ) 34 | 35 | set(${PROJECT_NAME}_JSONS 36 | ${JsonFiles} 37 | ) 38 | 39 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 40 | 41 | target_link_libraries(${PROJECT_NAME} 42 | -losg 43 | -losgDB 44 | -losgUtil 45 | -losgGA 46 | -losgViewer 47 | -losgText 48 | 49 | ) 50 | -------------------------------------------------------------------------------- /plugins/AddOGCData/AddOGCData.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | QT_BEGIN_NAMESPACE 6 | class QToolBar; 7 | class QAction; 8 | class QMenu; 9 | QT_END_NAMESPACE 10 | 11 | class AddOGCData: public EarthDataInterface 12 | { 13 | Q_OBJECT 14 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "AddOGCData.json") 15 | Q_INTERFACES(PluginInterface) 16 | 17 | public: 18 | AddOGCData(); 19 | 20 | ~AddOGCData(); 21 | 22 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 23 | 24 | public slots: 25 | void addImage(); 26 | 27 | void addTerrain(); 28 | 29 | void addFeature(); 30 | }; 31 | -------------------------------------------------------------------------------- /plugins/AddOGCData/AddOGCData.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "AddOGCData", 3 | "Version": "0.0.1", 4 | "Dependencies": [ 5 | { 6 | "Name": "EarthDataInterface", 7 | "Version": "0.0.1" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /plugins/AddOGCData/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ../ 19 | ) 20 | 21 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 22 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 23 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 24 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 25 | 26 | set(${PROJECT_NAME}_HDRS 27 | ${HFiles} 28 | ) 29 | 30 | set(${PROJECT_NAME}_SRCS 31 | ${CppFiles} 32 | ${UiFiles} 33 | ) 34 | 35 | set(${PROJECT_NAME}_JSONS 36 | ${JsonFiles} 37 | ) 38 | 39 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 40 | 41 | target_link_libraries(${PROJECT_NAME} 42 | EarthDataInterface 43 | ) 44 | -------------------------------------------------------------------------------- /plugins/AddOGCData/MultiChooseDlg.cpp: -------------------------------------------------------------------------------- 1 | #include "MultiChooseDlg.h" 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | MultiChooseDlg::MultiChooseDlg(QWidget *parent, QStringList& itemToChoose) 8 | : QDialog(parent) 9 | { 10 | setWindowTitle(tr("Layers")); 11 | 12 | _table = new QTableWidget(this); 13 | _table->setRowCount(itemToChoose.size()); 14 | _table->setColumnCount(2); 15 | _table->verticalHeader()->hide(); 16 | _table->horizontalHeader()->hide(); 17 | _table->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); 18 | 19 | _table->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding); 20 | _table->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents); 21 | 22 | for (int i = 0; i < itemToChoose.size(); i++) 23 | { 24 | QTableWidgetItem* tableItem = new QTableWidgetItem(itemToChoose[i]); 25 | _table->setItem(i, 0, tableItem); 26 | _table->setCellWidget(i, 1, new QCheckBox); 27 | } 28 | 29 | _table->adjustSize(); 30 | } 31 | 32 | MultiChooseDlg::~MultiChooseDlg() 33 | { 34 | 35 | } 36 | 37 | QStringList MultiChooseDlg::getCheckedItems() 38 | { 39 | QStringList checkedItems; 40 | 41 | for (int i = 0; i < _table->rowCount(); i++) 42 | { 43 | if (((QCheckBox*)_table->cellWidget(i, 1))->isChecked()) 44 | { 45 | checkedItems.push_back(_table->item(i, 0)->text()); 46 | } 47 | } 48 | return checkedItems; 49 | } 50 | -------------------------------------------------------------------------------- /plugins/AddOGCData/MultiChooseDlg.h: -------------------------------------------------------------------------------- 1 | #ifndef MULTICHOOSEDLG_H 2 | #define MULTICHOOSEDLG_H 3 | 4 | #include 5 | #include 6 | 7 | QT_BEGIN_NAMESPACE 8 | class QTableWidget; 9 | QT_END_NAMESPACE 10 | 11 | class MultiChooseDlg : public QDialog 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | MultiChooseDlg(QWidget *parent, QStringList& itemToChoose); 17 | ~MultiChooseDlg(); 18 | QStringList getCheckedItems(); 19 | 20 | private: 21 | QTableWidget* _table; 22 | }; 23 | 24 | #endif // MULTICHOOSEDLG_H 25 | -------------------------------------------------------------------------------- /plugins/AddObliqueModel/AddObliqueModel.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | QT_BEGIN_NAMESPACE 8 | class QToolBar; 9 | class QAction; 10 | class QMenu; 11 | QT_END_NAMESPACE 12 | 13 | class AddObliqueModel : public EarthDataInterface 14 | { 15 | Q_OBJECT 16 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "AddObliqueModel.json") 17 | Q_INTERFACES(PluginInterface) 18 | 19 | public: 20 | AddObliqueModel(); 21 | ~AddObliqueModel(); 22 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 23 | 24 | protected slots: 25 | void addObliqueModel(); 26 | 27 | protected: 28 | void loadObliqueModel(const QString& pathXML); 29 | void onLoadingDone(const QString& nodeName, osg::Node *model, const osgEarth::GeoPoint &geoOrigin); 30 | 31 | private: 32 | QMutex _loadingLock; 33 | }; 34 | -------------------------------------------------------------------------------- /plugins/AddObliqueModel/AddObliqueModel.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "AddObliqueModel", 3 | "Version": "0.0.1", 4 | "Dependencies": [ 5 | { 6 | "Name": "EarthDataInterface", 7 | "Version": "0.0.1" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /plugins/AddObliqueModel/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | find_package(Qt5Xml CONFIG REQUIRED) 15 | 16 | include_directories( 17 | ${Qt5Core_INCLUDE_DIRS} 18 | ${Qt5Widgets_INCLUDE_DIRS} 19 | ${Qt5Xml_INCLUDE_DIRS} 20 | ../ 21 | ) 22 | 23 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 24 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 25 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 26 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 27 | 28 | set(${PROJECT_NAME}_HDRS 29 | ${HFiles} 30 | ) 31 | 32 | set(${PROJECT_NAME}_SRCS 33 | ${CppFiles} 34 | ${UiFiles} 35 | ) 36 | 37 | set(${PROJECT_NAME}_JSONS 38 | ${JsonFiles} 39 | ) 40 | 41 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 42 | 43 | target_link_libraries(${PROJECT_NAME} 44 | 45 | ) 46 | -------------------------------------------------------------------------------- /plugins/AddObliqueModel/LoadThread.cpp: -------------------------------------------------------------------------------- 1 | #include "LoadThread.h" 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | LoadThread::LoadThread(QMutex& loadingLock, osg::Group* model, const QFileInfoList& allFileList) 8 | : _loadingLock(loadingLock) 9 | , _model(model) 10 | , _allFileList(allFileList) 11 | { 12 | } 13 | 14 | void LoadThread::run() 15 | { 16 | _loadingLock.lock(); 17 | 18 | int i = 0; 19 | float pbUnit = qAbs( (100 - 10.0f - 1.0f) / (_allFileList.length() - 1)); 20 | 21 | foreach(QFileInfo fileInfo, _allFileList) 22 | { 23 | float pbValue = 10 + i * pbUnit; 24 | i += 1; 25 | emit progress(pbValue); 26 | 27 | osg::ref_ptr node = osgDB::readNodeFile(fileInfo.absoluteFilePath().toLocal8Bit().toStdString()); 28 | if (!node.valid()) 29 | continue; 30 | QString nodestrpath = fileInfo.absoluteFilePath(); 31 | node->setName(nodestrpath.toLocal8Bit().toStdString()); 32 | _model->addChild(node); 33 | } 34 | 35 | emit progress(99); 36 | emit done(); 37 | 38 | _loadingLock.unlock(); 39 | } 40 | -------------------------------------------------------------------------------- /plugins/AddObliqueModel/LoadThread.h: -------------------------------------------------------------------------------- 1 | #ifndef LOADTHREAD_H 2 | #define LOADTHREAD_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include 10 | 11 | namespace osg { 12 | class Group; 13 | class Node; 14 | } 15 | 16 | class LoadThread : public QThread 17 | { 18 | Q_OBJECT 19 | 20 | public: 21 | LoadThread(QMutex& loadingLock, osg::Group* model, const QFileInfoList& allFileList); 22 | 23 | void run(); 24 | 25 | signals: 26 | void progress(int); 27 | void done(); 28 | 29 | private: 30 | QFileInfoList _allFileList; 31 | osg::Group* _model; 32 | QMutex& _loadingLock; 33 | }; 34 | 35 | #endif // LOADTHREAD_H 36 | -------------------------------------------------------------------------------- /plugins/AddPointCloud/AddPointCloud.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | QT_BEGIN_NAMESPACE 6 | class QToolBar; 7 | class QAction; 8 | class QMenu; 9 | QT_END_NAMESPACE 10 | 11 | class AddPointCloud : public PluginInterface 12 | { 13 | Q_OBJECT 14 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "AddPointCloud.json") 15 | Q_INTERFACES(PluginInterface) 16 | 17 | public: 18 | AddPointCloud(); 19 | ~AddPointCloud(); 20 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 21 | 22 | protected: 23 | void setupStyleTab(); 24 | 25 | protected slots: 26 | void addPointCloud(); 27 | void setPointSize(int size); 28 | 29 | protected: 30 | void loadPointCloudModel(const QString& fileName); 31 | 32 | private: 33 | float _pointSize; 34 | }; 35 | -------------------------------------------------------------------------------- /plugins/AddPointCloud/AddPointCloud.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "AddPointCloud", 3 | "Version": "0.0.1", 4 | "Dependencies": [] 5 | } 6 | -------------------------------------------------------------------------------- /plugins/AddPointCloud/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ) 19 | 20 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 21 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 22 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 23 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 24 | 25 | set(${PROJECT_NAME}_HDRS 26 | ${HFiles} 27 | ) 28 | 29 | set(${PROJECT_NAME}_SRCS 30 | ${CppFiles} 31 | ${UiFiles} 32 | ) 33 | 34 | set(${PROJECT_NAME}_JSONS 35 | ${JsonFiles} 36 | ) 37 | 38 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 39 | 40 | target_link_libraries(${PROJECT_NAME} 41 | 42 | ) 43 | -------------------------------------------------------------------------------- /plugins/AddTMSData/AddTMSData.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | QT_BEGIN_NAMESPACE 6 | class QToolBar; 7 | class QAction; 8 | class QMenu; 9 | QT_END_NAMESPACE 10 | 11 | class AddTMSData: public EarthDataInterface 12 | { 13 | Q_OBJECT 14 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "AddTMSData.json") 15 | Q_INTERFACES(PluginInterface) 16 | 17 | public: 18 | AddTMSData(); 19 | ~AddTMSData(); 20 | 21 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 22 | 23 | public slots: 24 | void addImage(); 25 | void addTerrain(); 26 | }; 27 | -------------------------------------------------------------------------------- /plugins/AddTMSData/AddTMSData.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "AddTMSData", 3 | "Version": "0.0.1", 4 | "Dependencies": [ 5 | { 6 | "Name": "EarthDataInterface", 7 | "Version": "0.0.1" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /plugins/AddTMSData/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_AUTOUIC ON) 10 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 11 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 12 | 13 | find_package(Qt5Core CONFIG REQUIRED) 14 | find_package(Qt5Widgets CONFIG REQUIRED) 15 | 16 | include_directories( 17 | ${Qt5Core_INCLUDE_DIRS} 18 | ${Qt5Widgets_INCLUDE_DIRS} 19 | ../ 20 | ../../drivers 21 | ) 22 | 23 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 24 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 25 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 26 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 27 | 28 | set(${PROJECT_NAME}_HDRS 29 | ${HFiles} 30 | ) 31 | 32 | set(${PROJECT_NAME}_SRCS 33 | ${CppFiles} 34 | ${UiFiles} 35 | ) 36 | 37 | set(${PROJECT_NAME}_JSONS 38 | ${JsonFiles} 39 | ) 40 | 41 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 42 | 43 | target_link_libraries(${PROJECT_NAME} 44 | EarthDataInterface 45 | ) 46 | -------------------------------------------------------------------------------- /plugins/AddXYZData/AddXYZData.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | QT_BEGIN_NAMESPACE 6 | class QToolBar; 7 | class QAction; 8 | class QMenu; 9 | QT_END_NAMESPACE 10 | 11 | class AddXYZData : public EarthDataInterface 12 | { 13 | Q_OBJECT 14 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "AddXYZData.json") 15 | Q_INTERFACES(PluginInterface) 16 | 17 | public: 18 | AddXYZData(); 19 | ~AddXYZData(); 20 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 21 | 22 | public slots: 23 | void addImage(); 24 | void addTerrain(); 25 | }; 26 | -------------------------------------------------------------------------------- /plugins/AddXYZData/AddXYZData.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "AddXYZData", 3 | "Version": "0.0.1", 4 | "Dependencies": [ 5 | { 6 | "Name": "EarthDataInterface", 7 | "Version": "0.0.1" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /plugins/AddXYZData/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_AUTOUIC ON) 10 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 11 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 12 | 13 | find_package(Qt5Core CONFIG REQUIRED) 14 | find_package(Qt5Widgets CONFIG REQUIRED) 15 | 16 | include_directories( 17 | ${Qt5Core_INCLUDE_DIRS} 18 | ${Qt5Widgets_INCLUDE_DIRS} 19 | ../ 20 | ) 21 | 22 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 23 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 24 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 25 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 26 | 27 | set(${PROJECT_NAME}_HDRS 28 | ${HFiles} 29 | ) 30 | 31 | set(${PROJECT_NAME}_SRCS 32 | ${CppFiles} 33 | ${UiFiles} 34 | ) 35 | 36 | set(${PROJECT_NAME}_JSONS 37 | ${JsonFiles} 38 | ) 39 | 40 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 41 | 42 | target_link_libraries(${PROJECT_NAME} 43 | EarthDataInterface 44 | ) 45 | -------------------------------------------------------------------------------- /plugins/CrowdSimulation/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ../ 19 | ../../libs 20 | ) 21 | 22 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 23 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 24 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 25 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 26 | 27 | set(${PROJECT_NAME}_HDRS 28 | ${HFiles} 29 | ) 30 | 31 | set(${PROJECT_NAME}_SRCS 32 | ${CppFiles} 33 | ${UiFiles} 34 | ) 35 | 36 | set(${PROJECT_NAME}_JSONS 37 | ${JsonFiles} 38 | ) 39 | 40 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 41 | 42 | target_link_libraries(${PROJECT_NAME} 43 | DrawSurfaceLine 44 | CrowdSim 45 | ) 46 | -------------------------------------------------------------------------------- /plugins/CrowdSimulation/CrowdSimulation.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "CrowdSimulation", 3 | "Version": "0.0.1", 4 | "Dependencies": [ 5 | { 6 | "Name": "DrawSurfaceLine", 7 | "Version": "0.0.1" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /plugins/DiffAnalysis/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ../ 19 | ) 20 | 21 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 22 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 23 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 24 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 25 | 26 | set(${PROJECT_NAME}_HDRS 27 | ${HFiles} 28 | ) 29 | 30 | set(${PROJECT_NAME}_SRCS 31 | ${CppFiles} 32 | ${UiFiles} 33 | ) 34 | 35 | set(${PROJECT_NAME}_JSONS 36 | ${JsonFiles} 37 | ) 38 | 39 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 40 | 41 | target_link_libraries(${PROJECT_NAME} 42 | DrawSurfacePolygon 43 | ) 44 | -------------------------------------------------------------------------------- /plugins/DiffAnalysis/DiffAnalysis.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "DiffAnalysis", 3 | "Version": "0.0.1", 4 | "Dependencies": [ 5 | { 6 | "Name": "DrawSurfacePolygon", 7 | "Version": "0.0.1" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /plugins/DiffAnalysis/DiffVisitor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace osgUtil { 10 | class LineSegmentIntersector; 11 | } 12 | 13 | class DiffVisitor : 14 | public osg::NodeVisitor 15 | { 16 | public: 17 | DiffVisitor(osg::Vec2Array* boundary, osg::Node* scene, bool loadDeepestPLOD = false); 18 | virtual ~DiffVisitor(); 19 | 20 | void apply(osg::PagedLOD& plod); 21 | 22 | void apply(osg::Geode& geode); 23 | 24 | bool pointInPolygon(osg::Vec3& point); 25 | 26 | bool samePoint(const osg::Vec3& point1, const osg::Vec3& point2); 27 | 28 | void updateMatrix(osg::Node& node) 29 | { 30 | osg::Matrix trans = osg::computeLocalToWorld(node.getParentalNodePaths().front()); 31 | if (!trans.isIdentity()) 32 | _localToWorld = trans; 33 | } 34 | 35 | osg::Vec3Array* getDifferentPoints() 36 | { 37 | return _differentPoints; 38 | } 39 | 40 | void setWorldOffset(osg::Vec3& offset) 41 | { 42 | _worldOffset = offset; 43 | } 44 | 45 | protected: 46 | osg::ref_ptr _boundary; 47 | bool _deepestLevel; 48 | bool _affected; 49 | bool _loadHighestPLOD; 50 | std::map _traversed; 51 | 52 | osg::Vec3 _worldOffset; 53 | osg::Matrix _localToWorld; 54 | osg::ref_ptr _differentPoints; 55 | 56 | osg::ref_ptr _intersector; 57 | osgUtil::IntersectionVisitor _iv; 58 | osg::Node* _scene; 59 | }; 60 | 61 | -------------------------------------------------------------------------------- /plugins/DrawLine/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ) 19 | 20 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 21 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 22 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 23 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 24 | 25 | set(${PROJECT_NAME}_HDRS 26 | ${HFiles} 27 | ) 28 | 29 | set(${PROJECT_NAME}_SRCS 30 | ${CppFiles} 31 | ${UiFiles} 32 | ) 33 | 34 | set(${PROJECT_NAME}_JSONS 35 | ${JsonFiles} 36 | ) 37 | 38 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 39 | 40 | target_link_libraries(${PROJECT_NAME} 41 | 42 | ) 43 | -------------------------------------------------------------------------------- /plugins/DrawLine/DrawLine.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "DrawLine_global.h" 3 | #include 4 | #include 5 | 6 | QT_BEGIN_NAMESPACE 7 | class QToolBar; 8 | class QAction; 9 | class QMenu; 10 | QT_END_NAMESPACE 11 | 12 | class DRAWLINE_EXPORT DrawLine : public PluginInterface 13 | { 14 | Q_OBJECT 15 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "DrawLine.json") 16 | Q_INTERFACES(PluginInterface) 17 | 18 | public: 19 | DrawLine(); 20 | ~DrawLine(); 21 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 22 | 23 | virtual void onLeftButton(); 24 | virtual void onMouseMove(); 25 | virtual void onRightButton(); 26 | virtual void onDoubleClick(); 27 | 28 | protected: 29 | void newLine(); 30 | 31 | protected: 32 | osg::ref_ptr _lineGeometry; 33 | osg::ref_ptr _verticsLine; 34 | QAction* _action; 35 | }; 36 | -------------------------------------------------------------------------------- /plugins/DrawLine/DrawLine.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "DrawLine", 3 | "Version": "0.0.1", 4 | "Dependencies": [] 5 | } 6 | -------------------------------------------------------------------------------- /plugins/DrawLine/DrawLine_global.h: -------------------------------------------------------------------------------- 1 | #ifndef DRAWLINE_GLOBAL_H 2 | #define DRAWLINE_GLOBAL_H 3 | 4 | #include 5 | 6 | #ifdef DRAWLINE_LIB 7 | # define DRAWLINE_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define DRAWLINE_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // DRAWLINE_GLOBAL_H 13 | -------------------------------------------------------------------------------- /plugins/DrawPolygon/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ) 19 | 20 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 21 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 22 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 23 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 24 | 25 | set(${PROJECT_NAME}_HDRS 26 | ${HFiles} 27 | ) 28 | 29 | set(${PROJECT_NAME}_SRCS 30 | ${CppFiles} 31 | ${UiFiles} 32 | ) 33 | 34 | set(${PROJECT_NAME}_JSONS 35 | ${JsonFiles} 36 | ) 37 | 38 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 39 | 40 | target_link_libraries(${PROJECT_NAME} 41 | DrawSurfaceLine 42 | ) 43 | -------------------------------------------------------------------------------- /plugins/DrawPolygon/DrawPolygon.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "DrawPolygon_global.h" 3 | #include 4 | #include 5 | 6 | QT_BEGIN_NAMESPACE 7 | class QToolBar; 8 | class QAction; 9 | class QMenu; 10 | QT_END_NAMESPACE 11 | 12 | class DRAWPOLYGON_EXPORT DrawPolygon : public PluginInterface 13 | { 14 | Q_OBJECT 15 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "DrawPolygon.json") 16 | Q_INTERFACES(PluginInterface) 17 | 18 | public: 19 | DrawPolygon(); 20 | ~DrawPolygon(); 21 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 22 | 23 | virtual void onLeftButton(); 24 | virtual void onMouseMove(); 25 | virtual void onRightButton(); 26 | virtual void onDoubleClick(); 27 | 28 | virtual osg::ref_ptr createPolygon(); 29 | 30 | protected: 31 | QAction* _action; 32 | 33 | osg::ref_ptr _polyVecArray; 34 | osg::ref_ptr _currentPolygon; 35 | }; 36 | -------------------------------------------------------------------------------- /plugins/DrawPolygon/DrawPolygon.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "DrawPolygon", 3 | "Version": "0.0.1", 4 | "Dependencies": [] 5 | } 6 | -------------------------------------------------------------------------------- /plugins/DrawPolygon/DrawPolygon_global.h: -------------------------------------------------------------------------------- 1 | #ifndef DRAWPOLYGON_GLOBAL_H 2 | #define DRAWPOLYGON_GLOBAL_H 3 | 4 | #include 5 | 6 | #ifdef DRAWPOLYGON_LIB 7 | # define DRAWPOLYGON_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define DRAWPOLYGON_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // DRAWPOLYGON_GLOBAL_H 13 | -------------------------------------------------------------------------------- /plugins/DrawSurfaceLine/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ) 19 | 20 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 21 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 22 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 23 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 24 | 25 | set(${PROJECT_NAME}_HDRS 26 | ${HFiles} 27 | ) 28 | 29 | set(${PROJECT_NAME}_SRCS 30 | ${CppFiles} 31 | ${UiFiles} 32 | ) 33 | 34 | set(${PROJECT_NAME}_JSONS 35 | ${JsonFiles} 36 | ) 37 | 38 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 39 | 40 | target_link_libraries(${PROJECT_NAME} 41 | 42 | ) 43 | -------------------------------------------------------------------------------- /plugins/DrawSurfaceLine/DrawSurfaceLine.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "DrawSurfaceLine", 3 | "Version": "0.0.1" 4 | } 5 | -------------------------------------------------------------------------------- /plugins/DrawSurfaceLine/DrawSurfaceLine_global.h: -------------------------------------------------------------------------------- 1 | #ifndef DRAWSURFACELINE_GLOBAL_H 2 | #define DRAWSURFACELINE_GLOBAL_H 3 | 4 | #include 5 | 6 | #ifdef DRAWSURFACELINE_LIB 7 | # define DRAWSURFACELINE_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define DRAWSURFACELINE_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // DRAWSURFACELINE_GLOBAL_H 13 | -------------------------------------------------------------------------------- /plugins/DrawSurfacePolygon/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ../ 19 | ) 20 | 21 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 22 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 23 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 24 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 25 | 26 | set(${PROJECT_NAME}_HDRS 27 | ${HFiles} 28 | ) 29 | 30 | set(${PROJECT_NAME}_SRCS 31 | ${CppFiles} 32 | ${UiFiles} 33 | ) 34 | 35 | set(${PROJECT_NAME}_JSONS 36 | ${JsonFiles} 37 | ) 38 | 39 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 40 | 41 | target_link_libraries(${PROJECT_NAME} 42 | DrawSurfaceLine 43 | ) 44 | -------------------------------------------------------------------------------- /plugins/DrawSurfacePolygon/DrawSurfacePolygon.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "DrawSurfacePolygon_global.h" 3 | #include 4 | #include 5 | 6 | #include 7 | 8 | QT_BEGIN_NAMESPACE 9 | class QToolBar; 10 | class QAction; 11 | class QMenu; 12 | QT_END_NAMESPACE 13 | 14 | namespace osg { 15 | class StateSet; 16 | class Geometry; 17 | } 18 | 19 | class DRAWSURFACEPOLYGON_EXPORT DrawSurfacePolygon : public DrawSurfaceLine 20 | { 21 | Q_OBJECT 22 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "DrawSurfacePolygon.json") 23 | Q_INTERFACES(PluginInterface) 24 | 25 | public: 26 | DrawSurfacePolygon(); 27 | ~DrawSurfacePolygon(); 28 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 29 | 30 | protected: 31 | virtual void onLeftButton(); 32 | virtual void onRightButton(); 33 | virtual void onDoubleClick(); 34 | virtual void onMouseMove(); 35 | virtual void drawOverlay(); 36 | 37 | virtual osg::ref_ptr tesselatedPolygon(osg::Vec3Array* polygon); 38 | 39 | protected: 40 | static QMap _polygs; 41 | static int _numSubDraw; 42 | 43 | osg::ref_ptr _state; 44 | osg::ref_ptr _lastLine; 45 | osg::ref_ptr _contourPoints; 46 | osg::ref_ptr _drawnOverlay; 47 | 48 | osg::Vec3 _center; 49 | QMap _centerPoints; 50 | 51 | double _Xmin, _Xmax, _Ymin, _Ymax; 52 | double _overlayAlpha; 53 | const float SUBGRAPH_HEIGHT = 10000.0f; 54 | 55 | QVector _contour; 56 | 57 | private: 58 | QAction* _action; 59 | }; 60 | -------------------------------------------------------------------------------- /plugins/DrawSurfacePolygon/DrawSurfacePolygon.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "DrawSurfacePolygon", 3 | "Version": "0.0.1", 4 | "Dependencies": [ 5 | { 6 | "Name": "DrawSurfaceLine", 7 | "Version": "0.0.1" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /plugins/DrawSurfacePolygon/DrawSurfacePolygon_global.h: -------------------------------------------------------------------------------- 1 | #ifndef DRAWSURFACEPOLYGON_GLOBAL_H 2 | #define DRAWSURFACEPOLYGON_GLOBAL_H 3 | 4 | #include 5 | 6 | #ifdef DRAWSURFACEPOLYGON_LIB 7 | # define DRAWSURFACEPOLYGON_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define DRAWSURFACEPOLYGON_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // DRAWSURFACEPOLYGON_GLOBAL_H 13 | -------------------------------------------------------------------------------- /plugins/DrawVector/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ) 19 | 20 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 21 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 22 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 23 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 24 | 25 | set(${PROJECT_NAME}_HDRS 26 | ${HFiles} 27 | ) 28 | 29 | set(${PROJECT_NAME}_SRCS 30 | ${CppFiles} 31 | ${UiFiles} 32 | ) 33 | 34 | set(${PROJECT_NAME}_JSONS 35 | ${JsonFiles} 36 | ) 37 | 38 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 39 | 40 | target_link_libraries(${PROJECT_NAME} 41 | 42 | ) 43 | -------------------------------------------------------------------------------- /plugins/DrawVector/DrawVector.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "DrawVector", 3 | "Version": "0.0.1", 4 | "Dependencies": [] 5 | } 6 | -------------------------------------------------------------------------------- /plugins/EarthDataInterface/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_AUTOUIC ON) 10 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 11 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 12 | 13 | find_package(Qt5Core CONFIG REQUIRED) 14 | find_package(Qt5Widgets CONFIG REQUIRED) 15 | 16 | include_directories( 17 | ${Qt5Core_INCLUDE_DIRS} 18 | ${Qt5Widgets_INCLUDE_DIRS} 19 | ) 20 | 21 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 22 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 23 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 24 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 25 | 26 | set(${PROJECT_NAME}_HDRS 27 | ${HFiles} 28 | ) 29 | 30 | set(${PROJECT_NAME}_SRCS 31 | ${CppFiles} 32 | ${UiFiles} 33 | ) 34 | 35 | set(${PROJECT_NAME}_JSONS 36 | ${JsonFiles} 37 | ) 38 | 39 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 40 | 41 | target_link_libraries(${PROJECT_NAME} 42 | 43 | ) 44 | -------------------------------------------------------------------------------- /plugins/EarthDataInterface/EarthDataInterface.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "EarthDataInterface", 3 | "Version": "0.0.1", 4 | "Dependencies": [] 5 | } 6 | -------------------------------------------------------------------------------- /plugins/EarthDataInterface/EarthDataInterface_global.h: -------------------------------------------------------------------------------- 1 | #ifndef EARTHDATAINTERFACE_GLOBAL_H 2 | #define EARTHDATAINTERFACE_GLOBAL_H 3 | 4 | #include 5 | 6 | #ifdef EARTHDATAINTERFACE_LIB 7 | # define EARTHDATAINTERFACE_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define EARTHDATAINTERFACE_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // EARTHDATAINTERFACE_GLOBAL_H 13 | -------------------------------------------------------------------------------- /plugins/EarthDataInterface/ModelLayerManager.h: -------------------------------------------------------------------------------- 1 | #ifndef MODELLAYERMANAGER_H 2 | #define MODELLAYERMANAGER_H 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | #include "../../NameSpace.h" 10 | #include 11 | 12 | #include 13 | 14 | #include 15 | 16 | #include 17 | 18 | class SettingsManager; 19 | namespace osgEarth 20 | { 21 | class ModelLayer; 22 | 23 | namespace Symbology 24 | { 25 | class Style; 26 | } 27 | } 28 | 29 | class ModelLayerManager: public QObject 30 | { 31 | Q_OBJECT 32 | 33 | public: 34 | 35 | ModelLayerManager(const PluginInterface::StyleConfig &style); 36 | 37 | ~ModelLayerManager(); 38 | 39 | osg::ref_ptr changeLayerStyle(std::string path, const QString& gemtype, std::string iconPath, float layerHeight); 40 | 41 | osg::ref_ptr createModelLabelLayer(const QString& layerPath, std::string fieldName, float height); 42 | 43 | QVector getVectorMetaData(const QString& path, QStringList &fieldList); 44 | 45 | void getFeatureAttribute(const QString& path, QVector &attributeList, QStringList &featureFieldList, 46 | osgEarth::Symbology::Style *style); 47 | 48 | char * getSRS() 49 | { 50 | return _origlSRS; 51 | } 52 | 53 | QString& getGemType() 54 | { 55 | return _gemtype; 56 | } 57 | 58 | private: 59 | char *_origlSRS; 60 | QString _gemtype; 61 | PluginInterface::StyleConfig _style; 62 | }; 63 | 64 | #endif // MODELLAYERMANAGER_H 65 | -------------------------------------------------------------------------------- /plugins/EarthDataInterface/urlDialog.cpp: -------------------------------------------------------------------------------- 1 | #include "urlDialog.h" 2 | 3 | #include "ui_urlDialog.h" 4 | 5 | #include 6 | 7 | urlDialog::urlDialog(QMap examples, QWidget * parent) 8 | : QDialog(parent) 9 | , _examples(examples) 10 | { 11 | _ui = new Ui_urlDialog(); 12 | _ui->setupUi(this); 13 | 14 | _ui->comboBox->addItem(""); 15 | _ui->comboBox->addItems(examples.keys()); 16 | 17 | connect(_ui->comboBox, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(pickExample(const QString&))); 18 | connect(_ui->urlEdit, SIGNAL(textEdited(const QString&)), this, SLOT(resetComboBox(const QString&))); 19 | } 20 | 21 | urlDialog::~urlDialog() 22 | { 23 | 24 | } 25 | 26 | QString urlDialog::getUrl() 27 | { 28 | return _ui->urlEdit->text(); 29 | } 30 | 31 | void urlDialog::resetComboBox(const QString&) 32 | { 33 | _ui->comboBox->setCurrentIndex(0); 34 | } 35 | 36 | void urlDialog::pickExample(const QString& name) 37 | { 38 | if (!name.isEmpty()) 39 | _ui->urlEdit->setText(_examples[name]); 40 | } 41 | -------------------------------------------------------------------------------- /plugins/EarthDataInterface/urlDialog.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef URLDIALOG_HPP 3 | #define URLDIALOG_HPP 4 | 5 | #include 6 | #include 7 | 8 | #include "EarthDataInterface_global.h" 9 | 10 | class Ui_urlDialog; 11 | 12 | class EARTHDATAINTERFACE_EXPORT urlDialog : public QDialog { 13 | Q_OBJECT 14 | 15 | public: 16 | urlDialog(QMap examples, QWidget * parent = nullptr); 17 | ~urlDialog(); 18 | 19 | QString getUrl(); 20 | 21 | private slots: 22 | void pickExample(const QString& name); 23 | void resetComboBox(const QString&); 24 | 25 | private: 26 | Ui_urlDialog* _ui; 27 | QMap _examples; 28 | }; 29 | 30 | #endif // URLDIALOG_HPP -------------------------------------------------------------------------------- /plugins/Locator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ) 19 | 20 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 21 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 22 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 23 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 24 | 25 | set(${PROJECT_NAME}_HDRS 26 | ${HFiles} 27 | ) 28 | 29 | set(${PROJECT_NAME}_SRCS 30 | ${CppFiles} 31 | ${UiFiles} 32 | ) 33 | 34 | set(${PROJECT_NAME}_JSONS 35 | ${JsonFiles} 36 | ) 37 | 38 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 39 | 40 | target_link_libraries(${PROJECT_NAME} 41 | 42 | ) 43 | -------------------------------------------------------------------------------- /plugins/Locator/Locator.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | QT_BEGIN_NAMESPACE 6 | class QToolBar; 7 | class QAction; 8 | class QMenu; 9 | class QLineEdit; 10 | QT_END_NAMESPACE 11 | 12 | class Locator: public PluginInterface 13 | { 14 | Q_OBJECT 15 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "Locator.json") 16 | Q_INTERFACES(PluginInterface) 17 | 18 | public: 19 | Locator(); 20 | 21 | ~Locator(); 22 | 23 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 24 | 25 | virtual bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa) override; 26 | 27 | public slots: 28 | void flyToQueriedCoord(); 29 | 30 | private: 31 | void setupQueryDock(); 32 | 33 | protected: 34 | QAction *_action; 35 | QLineEdit *_coordQueryX; 36 | QLineEdit *_coordQueryY; 37 | }; 38 | -------------------------------------------------------------------------------- /plugins/Locator/Locator.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "Locator", 3 | "Version": "0.0.1", 4 | "Dependencies": [] 5 | } 6 | -------------------------------------------------------------------------------- /plugins/MeasureArea/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ../ 19 | ) 20 | 21 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 22 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 23 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 24 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 25 | 26 | set(${PROJECT_NAME}_HDRS 27 | ${HFiles} 28 | ) 29 | 30 | set(${PROJECT_NAME}_SRCS 31 | ${CppFiles} 32 | ${UiFiles} 33 | ) 34 | 35 | set(${PROJECT_NAME}_JSONS 36 | ${JsonFiles} 37 | ) 38 | 39 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 40 | 41 | target_link_libraries(${PROJECT_NAME} 42 | DrawPolygon 43 | ) 44 | -------------------------------------------------------------------------------- /plugins/MeasureArea/MeasureArea.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | QT_BEGIN_NAMESPACE 6 | class QToolBar; 7 | class QAction; 8 | class QMenu; 9 | QT_END_NAMESPACE 10 | 11 | class MeasureArea : public DrawPolygon 12 | { 13 | Q_OBJECT 14 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "MeasureArea.json") 15 | Q_INTERFACES(PluginInterface) 16 | 17 | public: 18 | MeasureArea(); 19 | ~MeasureArea(); 20 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 21 | virtual void onDoubleClick(); 22 | float calcuSpatialPolygonArea(); 23 | }; 24 | -------------------------------------------------------------------------------- /plugins/MeasureArea/MeasureArea.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "MeasureArea", 3 | "Version": "0.0.1", 4 | "Dependencies": [ 5 | { 6 | "Name": "DrawPolygon", 7 | "Version": "0.0.1" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /plugins/MeasureHeight/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ) 19 | 20 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 21 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 22 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 23 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 24 | 25 | set(${PROJECT_NAME}_HDRS 26 | ${HFiles} 27 | ) 28 | 29 | set(${PROJECT_NAME}_SRCS 30 | ${CppFiles} 31 | ${UiFiles} 32 | ) 33 | 34 | set(${PROJECT_NAME}_JSONS 35 | ${JsonFiles} 36 | ) 37 | 38 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 39 | 40 | target_link_libraries(${PROJECT_NAME} 41 | 42 | ) 43 | -------------------------------------------------------------------------------- /plugins/MeasureHeight/MeasureHeight.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | QT_BEGIN_NAMESPACE 6 | class QToolBar; 7 | class QAction; 8 | class QMenu; 9 | QT_END_NAMESPACE 10 | 11 | namespace osgText { 12 | class Text; 13 | } 14 | 15 | namespace osg { 16 | class Geometry; 17 | } 18 | 19 | class MeasureHeight : public PluginInterface 20 | { 21 | Q_OBJECT 22 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "MeasureHeight.json") 23 | Q_INTERFACES(PluginInterface) 24 | 25 | public: 26 | MeasureHeight(); 27 | ~MeasureHeight(); 28 | virtual void setupUi(QToolBar *toolBar, QMenu* menu) override; 29 | 30 | protected: 31 | virtual void onLeftButton(); 32 | virtual void onRightButton(); 33 | virtual void onMouseMove(); 34 | void updateLines(); 35 | void updateText(); 36 | 37 | protected: 38 | osg::ref_ptr _hLineUp; 39 | osg::ref_ptr _hLineLow; 40 | osg::ref_ptr _vLine; 41 | osg::ref_ptr _text; 42 | 43 | osg::Vec3 _startPoint; 44 | osg::Vec3 _highPoint; 45 | osg::Vec3 _lowPoint; 46 | osg::Vec3 _hDir; 47 | osg::Vec3 _vDir; 48 | double _height; 49 | 50 | private: 51 | QAction* _action; 52 | }; 53 | -------------------------------------------------------------------------------- /plugins/MeasureHeight/MeasureHeight.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "MeasureHeight", 3 | "Version": "0.0.1" 4 | } 5 | -------------------------------------------------------------------------------- /plugins/MeasureLine/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ../ 19 | ) 20 | 21 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 22 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 23 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 24 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 25 | 26 | set(${PROJECT_NAME}_HDRS 27 | ${HFiles} 28 | ) 29 | 30 | set(${PROJECT_NAME}_SRCS 31 | ${CppFiles} 32 | ${UiFiles} 33 | ) 34 | 35 | set(${PROJECT_NAME}_JSONS 36 | ${JsonFiles} 37 | ) 38 | 39 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 40 | 41 | target_link_libraries(${PROJECT_NAME} 42 | DrawLine 43 | ) 44 | -------------------------------------------------------------------------------- /plugins/MeasureLine/MeasureLine.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | QT_BEGIN_NAMESPACE 6 | class QToolBar; 7 | class QAction; 8 | class QMenu; 9 | QT_END_NAMESPACE 10 | 11 | class MeasureLine: public DrawLine 12 | { 13 | Q_OBJECT 14 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "MeasureLine.json") 15 | Q_INTERFACES(PluginInterface) 16 | 17 | public: 18 | MeasureLine(); 19 | 20 | ~MeasureLine(); 21 | 22 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 23 | 24 | virtual void onLeftButton(); 25 | 26 | virtual void onDoubleClick(); 27 | 28 | virtual void onMouseMove(); 29 | 30 | protected: 31 | double _totoalDistance; 32 | osg::ref_ptr _tmpLabel; 33 | }; 34 | -------------------------------------------------------------------------------- /plugins/MeasureLine/MeasureLine.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "MeasureLine", 3 | "Version": "0.0.1", 4 | "Dependencies": [ 5 | { 6 | "Name": "DrawLine", 7 | "Version": "0.0.1" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /plugins/MeasureTerrainArea/AreaVisitor.h: -------------------------------------------------------------------------------- 1 | #ifndef AREAVISITOR_H 2 | #define AREAVISITOR_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | class AreaVisitor : public osg::NodeVisitor 10 | { 11 | public: 12 | // 要求输入一个相对于(0,0,1)方向逆时针环绕的凸控制边界 13 | AreaVisitor(osg::Vec2Array* boundary, bool loadDeepestPLOD = false); 14 | 15 | virtual ~AreaVisitor(); 16 | 17 | void apply(osg::PagedLOD& plod); 18 | 19 | void apply(osg::Geode& geode); 20 | 21 | float calcTriangle(osg::Vec3& p1, osg::Vec3& p2, osg::Vec3& p3); 22 | 23 | bool pointInPolygon(osg::Vec3& point); 24 | 25 | float calcTriArea(osg::Vec3& p1, osg::Vec3& p2, osg::Vec3& p3) 26 | { 27 | return ((p1 - p2) ^ (p1 - p3)).length() / 2; 28 | } 29 | 30 | float getArea() {return _area;} 31 | 32 | void updateMatrix(osg::Node& node) 33 | { 34 | osg::Matrix trans = osg::computeLocalToWorld(node.getParentalNodePaths().front()); 35 | if (!trans.isIdentity()) 36 | _localToWorld = trans; 37 | } 38 | 39 | protected: 40 | osg::ref_ptr _boundary; 41 | float _area; 42 | bool _deepestLevel; 43 | bool _affected; 44 | std::string _currentFile; 45 | std::map _traversed; 46 | osg::Matrix _localToWorld; 47 | 48 | bool _loadHighestPLOD; 49 | }; 50 | 51 | #endif -------------------------------------------------------------------------------- /plugins/MeasureTerrainArea/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ../ 19 | ) 20 | 21 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 22 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 23 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 24 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 25 | 26 | set(${PROJECT_NAME}_HDRS 27 | ${HFiles} 28 | ) 29 | 30 | set(${PROJECT_NAME}_SRCS 31 | ${CppFiles} 32 | ${UiFiles} 33 | ) 34 | 35 | set(${PROJECT_NAME}_JSONS 36 | ${JsonFiles} 37 | ) 38 | 39 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 40 | 41 | target_link_libraries(${PROJECT_NAME} 42 | DrawSurfacePolygon 43 | ) 44 | -------------------------------------------------------------------------------- /plugins/MeasureTerrainArea/MeasureTerrainArea.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "MeasureTerrainArea_global.h" 3 | #include 4 | #include 5 | 6 | QT_BEGIN_NAMESPACE 7 | class QToolBar; 8 | class QAction; 9 | class QMenu; 10 | QT_END_NAMESPACE 11 | 12 | class MEASURETERRAINAREA_EXPORT MeasureTerrainArea : public DrawSurfacePolygon 13 | { 14 | Q_OBJECT 15 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "MeasureTerrainArea.json") 16 | Q_INTERFACES(PluginInterface) 17 | 18 | public: 19 | MeasureTerrainArea(); 20 | ~MeasureTerrainArea(); 21 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 22 | virtual void onDoubleClick(); 23 | virtual void onLeftButton(); 24 | 25 | protected: 26 | bool calculateArea(); 27 | void showTxtAtCenter(std::string& txt); 28 | void setBoundingPolytope(osg::Polytope& boundingPolytope, const osg::Vec3Array* ctrlPoints, const osg::Vec3& up); 29 | float areaInBoundary(osg::Node* node, osg::Vec3Array* boundary); 30 | 31 | protected: 32 | osg::ref_ptr _contour; 33 | 34 | private: 35 | QAction* _action; 36 | }; 37 | -------------------------------------------------------------------------------- /plugins/MeasureTerrainArea/MeasureTerrainArea.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "MeasureTerrainArea", 3 | "Version": "0.0.1", 4 | "Dependencies": [ 5 | { 6 | "Name": "DrawSurfacePolygon", 7 | "Version": "0.0.1" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /plugins/MeasureTerrainArea/MeasureTerrainArea_global.h: -------------------------------------------------------------------------------- 1 | #ifndef MEASURETERRAINAREA_GLOBAL_H 2 | #define MEASURETERRAINAREA_GLOBAL_H 3 | 4 | #include 5 | 6 | #ifdef MEASURETERRAINAREA_LIB 7 | # define MEASURETERRAINAREA_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define MEASURETERRAINAREA_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // MEASURETERRAINAREA_GLOBAL_H 13 | -------------------------------------------------------------------------------- /plugins/MeasureTerrainVolume/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ../ 19 | ) 20 | 21 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 22 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 23 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 24 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 25 | 26 | set(${PROJECT_NAME}_HDRS 27 | ${HFiles} 28 | ) 29 | 30 | set(${PROJECT_NAME}_SRCS 31 | ${CppFiles} 32 | ${UiFiles} 33 | ) 34 | 35 | set(${PROJECT_NAME}_JSONS 36 | ${JsonFiles} 37 | ) 38 | 39 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 40 | 41 | target_link_libraries(${PROJECT_NAME} 42 | MeasureTerrainArea 43 | SetRefPlane 44 | ) 45 | -------------------------------------------------------------------------------- /plugins/MeasureTerrainVolume/MeasureTerrainVolume.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | QT_BEGIN_NAMESPACE 6 | class QToolBar; 7 | class QAction; 8 | class QMenu; 9 | QT_END_NAMESPACE 10 | 11 | class MeasureTerrainVolume : public MeasureTerrainArea 12 | { 13 | Q_OBJECT 14 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "MeasureTerrainVolume.json") 15 | Q_INTERFACES(PluginInterface) 16 | 17 | public: 18 | MeasureTerrainVolume(); 19 | ~MeasureTerrainVolume(); 20 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 21 | 22 | virtual void onLeftButton(); 23 | virtual void onRightButton(); 24 | virtual void onDoubleClick(); 25 | virtual void onMouseMove(); 26 | 27 | bool calculateVolume(); 28 | float volInBoundary(osg::Node* node, osg::Vec3Array* boundary); 29 | 30 | protected: 31 | bool _planeDone; 32 | osg::Plane _refPlane; 33 | 34 | private: 35 | QAction* _action; 36 | }; 37 | -------------------------------------------------------------------------------- /plugins/MeasureTerrainVolume/MeasureTerrainVolume.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "MeasureTerrainVolume", 3 | "Version": "0.0.1", 4 | "Dependencies": [ 5 | { 6 | "Name": "MeasureTerrainArea", 7 | "Version": "0.0.1" 8 | }, 9 | { 10 | "Name": "SetRefPlane", 11 | "Version": "0.0.1" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /plugins/MeshMode/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ) 19 | 20 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 21 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 22 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 23 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 24 | 25 | set(${PROJECT_NAME}_HDRS 26 | ${HFiles} 27 | ) 28 | 29 | set(${PROJECT_NAME}_SRCS 30 | ${CppFiles} 31 | ${UiFiles} 32 | ) 33 | 34 | set(${PROJECT_NAME}_JSONS 35 | ${JsonFiles} 36 | ) 37 | 38 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 39 | 40 | target_link_libraries(${PROJECT_NAME} 41 | 42 | ) 43 | -------------------------------------------------------------------------------- /plugins/MeshMode/MeshMode.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | QT_BEGIN_NAMESPACE 6 | class QToolBar; 7 | class QAction; 8 | class QMenu; 9 | QT_END_NAMESPACE 10 | 11 | class MeshMode : public PluginInterface 12 | { 13 | Q_OBJECT 14 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "MeshMode.json") 15 | Q_INTERFACES(PluginInterface) 16 | 17 | public: 18 | MeshMode(); 19 | ~MeshMode(); 20 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 21 | 22 | public slots: 23 | virtual void trigger(); 24 | 25 | protected: 26 | QAction* _action; 27 | int _mode; 28 | }; 29 | -------------------------------------------------------------------------------- /plugins/MeshMode/MeshMode.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "MeshMode", 3 | "Version": "0.0.1", 4 | "Dependencies": [] 5 | } 6 | -------------------------------------------------------------------------------- /plugins/ModelFlatten/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ../ 19 | ) 20 | 21 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 22 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 23 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 24 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 25 | 26 | set(${PROJECT_NAME}_HDRS 27 | ${HFiles} 28 | ) 29 | 30 | set(${PROJECT_NAME}_SRCS 31 | ${CppFiles} 32 | ${UiFiles} 33 | ) 34 | 35 | set(${PROJECT_NAME}_JSONS 36 | ${JsonFiles} 37 | ) 38 | 39 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 40 | 41 | target_link_libraries(${PROJECT_NAME} 42 | DrawSurfacePolygon 43 | ) 44 | -------------------------------------------------------------------------------- /plugins/ModelFlatten/ModelFlatten.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | #include 6 | #include 7 | typedef std::vector> nodeList; 8 | 9 | namespace osg { 10 | class MatrixTransform; 11 | } 12 | 13 | QT_BEGIN_NAMESPACE 14 | class QToolBar; 15 | class QAction; 16 | class QMenu; 17 | QT_END_NAMESPACE 18 | 19 | class ModelFlatten : public DrawSurfacePolygon 20 | { 21 | Q_OBJECT 22 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "ModelFlatten.json") 23 | Q_INTERFACES(PluginInterface) 24 | 25 | public: 26 | ModelFlatten(); 27 | ~ModelFlatten(); 28 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 29 | 30 | virtual void loadContextMenu(QMenu * contextMenu, QTreeWidgetItem * selectedItem) override; 31 | 32 | protected: 33 | virtual void onLeftButton(); 34 | virtual void onDoubleClick(); 35 | 36 | protected: 37 | osg::ref_ptr _boundary; 38 | double _avgHeight; 39 | 40 | // A list of temporary files generated by the flatten process 41 | // It can be saved or deleted after program exits 42 | QMap _tempFileList; 43 | 44 | signals: 45 | void startProcess(osg::Group*, QStringList, osg::Vec2Array*, double); 46 | 47 | private: 48 | osg::Group* _selectedNode = NULL; 49 | QAction* _action; 50 | }; 51 | -------------------------------------------------------------------------------- /plugins/ModelFlatten/ModelFlatten.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "ModelFlatten", 3 | "Version": "0.0.1", 4 | "Dependencies": [ 5 | { 6 | "Name": "DrawSurfacePolygon", 7 | "Version": "0.0.1" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /plugins/MultiView/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ) 19 | 20 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 21 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 22 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 23 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 24 | 25 | set(${PROJECT_NAME}_HDRS 26 | ${HFiles} 27 | ) 28 | 29 | set(${PROJECT_NAME}_SRCS 30 | ${CppFiles} 31 | ${UiFiles} 32 | ) 33 | 34 | set(${PROJECT_NAME}_JSONS 35 | ${JsonFiles} 36 | ) 37 | 38 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 39 | 40 | target_link_libraries(${PROJECT_NAME} 41 | 42 | ) 43 | -------------------------------------------------------------------------------- /plugins/MultiView/MultiView.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | QT_BEGIN_NAMESPACE 6 | class QToolBar; 7 | class QAction; 8 | class QMenu; 9 | QT_END_NAMESPACE 10 | 11 | namespace osgViewer { 12 | class View; 13 | } 14 | 15 | class MultiView : public PluginInterface 16 | { 17 | Q_OBJECT 18 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "MultiView.json") 19 | Q_INTERFACES(PluginInterface) 20 | 21 | public: 22 | MultiView(); 23 | ~MultiView(); 24 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 25 | virtual void loadContextMenu(QMenu* contextMenu, QTreeWidgetItem* selectedItem) override; 26 | 27 | protected: 28 | virtual void toggle(bool checked) override; 29 | void initSubView(); 30 | 31 | public slots: 32 | void moveToWindow(); 33 | 34 | protected: 35 | QWidget* _subViewWidget; 36 | osg::ref_ptr _subView; 37 | QAction* _action; 38 | QAction* showInWindow1Action; 39 | QAction* showInWindow2Action; 40 | }; 41 | -------------------------------------------------------------------------------- /plugins/MultiView/MultiView.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "MultiView", 3 | "Version": "0.0.1", 4 | "Dependencies": [] 5 | } 6 | -------------------------------------------------------------------------------- /plugins/OpenSky-Network/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | find_package(Qt5Network REQUIRED) 15 | find_package(Qt5WebSockets REQUIRED) 16 | 17 | include_directories( 18 | ${Qt5Core_INCLUDE_DIRS} 19 | ${Qt5Widgets_INCLUDE_DIRS} 20 | ${Qt5WebSockets_INCLUDE_DIRS} 21 | ) 22 | 23 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 24 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 25 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 26 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 27 | 28 | set(${PROJECT_NAME}_HDRS 29 | ${HFiles} 30 | ) 31 | 32 | set(${PROJECT_NAME}_SRCS 33 | ${CppFiles} 34 | ${UiFiles} 35 | ) 36 | 37 | set(${PROJECT_NAME}_JSONS 38 | ${JsonFiles} 39 | ) 40 | 41 | set(resdata 42 | res/opensky-network.png 43 | res/opensky.png 44 | ) 45 | 46 | file(COPY ${resdata} DESTINATION ${DIST_RESOURCES_PATH}/OpenSkyNetwork) 47 | 48 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 49 | 50 | target_link_libraries(${PROJECT_NAME} 51 | 52 | ) 53 | -------------------------------------------------------------------------------- /plugins/OpenSky-Network/OpenSkyNetwork.cpp: -------------------------------------------------------------------------------- 1 | #include "OpenSkyNetwork.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include "dataptree.h" 9 | 10 | OpenSkyNetwork::OpenSkyNetwork() 11 | { 12 | _pluginCategory = "Draw"; 13 | _pluginName = "OpenSkyNetwork"; 14 | mOpenSkyFetcher = new OpenSkyFetcher(_mapNode[0], _mainViewer->getMainView()); 15 | } 16 | 17 | OpenSkyNetwork::~OpenSkyNetwork() 18 | { 19 | } 20 | 21 | void OpenSkyNetwork::setupUi(QToolBar *toolBar, QMenu *menu) 22 | { 23 | _action = new QAction(_mainWindow); 24 | _action->setObjectName(QStringLiteral("OpenSkyNetworkAction")); 25 | QIcon icon19; 26 | icon19.addFile(QStringLiteral("resources/OpenSkyNetwork/opensky-network.png"), QSize(), QIcon::Normal, QIcon::Off); 27 | _action->setIcon(icon19); 28 | _action->setCheckable(true); 29 | _action->setText(tr("OpenSkyNetwork")); 30 | _action->setToolTip(tr("Enable OpenSky-network")); 31 | 32 | toolBar->addAction(_action); 33 | menu->addAction(_action); 34 | 35 | connect(_action, &QAction::toggled, this, &OpenSkyNetwork::toggled); 36 | } 37 | 38 | void OpenSkyNetwork::toggled(bool checked) 39 | { 40 | if (checked) 41 | { 42 | mOpenSkyFetcher->run(); 43 | 44 | _action->setText("Disable"); 45 | } 46 | else 47 | { 48 | mOpenSkyFetcher->stopTimer(); 49 | mOpenSkyFetcher->quit(); 50 | _action->setText("Enable"); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /plugins/OpenSky-Network/OpenSkyNetwork.h: -------------------------------------------------------------------------------- 1 | #ifndef OPENSKYNETWORK_H 2 | #define OPENSKYNETWORK_H 3 | 4 | #include 5 | #include 6 | #include "openskyfetcher.h" 7 | 8 | QT_BEGIN_NAMESPACE 9 | class QToolBar; 10 | class QAction; 11 | class QMenu; 12 | QT_END_NAMESPACE 13 | 14 | class OpenSkyNetwork: public PluginInterface 15 | { 16 | Q_OBJECT 17 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "OpenSkyNetwork.json") 18 | Q_INTERFACES(PluginInterface) 19 | 20 | public: 21 | OpenSkyNetwork(); 22 | 23 | ~OpenSkyNetwork(); 24 | 25 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 26 | 27 | public slots: 28 | void toggled(bool checked); 29 | 30 | private: 31 | QAction *_action; 32 | OpenSkyFetcher *mOpenSkyFetcher; 33 | }; 34 | 35 | #endif // OPENSKYNETWORK_H 36 | -------------------------------------------------------------------------------- /plugins/OpenSky-Network/OpenSkyNetwork.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "OpenSkyNetwork", 3 | "Version": "0.0.1", 4 | "Dependencies": [] 5 | } 6 | -------------------------------------------------------------------------------- /plugins/OpenSky-Network/plane2d.cpp: -------------------------------------------------------------------------------- 1 | #include "plane2d.h" 2 | 3 | Plane2D::Plane2D(): 4 | osgEarth::GeoTransform() 5 | { 6 | } 7 | 8 | Data Plane2D::operator[](const std::string &key) 9 | { 10 | return _properties[key]; 11 | } 12 | 13 | const Data Plane2D::operator[](const std::string &key) const 14 | { 15 | return _properties[key]; 16 | } 17 | 18 | void Plane2D::addAutoTransform(osg::AutoTransform *node) 19 | { 20 | _child = node; 21 | addChild(node); 22 | } 23 | 24 | void Plane2D::setRotation(double deg) 25 | { 26 | osg::Quat q = osg::Quat(osg::DegreesToRadians(deg), osg::Vec3(0, 1, 0)) 27 | * osg::Quat(osg::DegreesToRadians(deg), osg::Vec3(1, 0, 0)) 28 | * osg::Quat(osg::DegreesToRadians(deg), osg::Vec3(0, 0, -1)); 29 | 30 | _child->setRotation(q); 31 | } 32 | -------------------------------------------------------------------------------- /plugins/OpenSky-Network/plane2d.h: -------------------------------------------------------------------------------- 1 | #ifndef PLANE2D_H 2 | #define PLANE2D_H 3 | 4 | #include 5 | #include 6 | #include "dataptree.h" 7 | 8 | class Plane2D: public osgEarth::GeoTransform 9 | { 10 | public: 11 | Plane2D(); 12 | 13 | Data operator[](const std::string &key); 14 | 15 | const Data operator[](const std::string &key) const; 16 | 17 | void addAutoTransform(osg::AutoTransform *node); 18 | 19 | void setRotation(double deg); 20 | 21 | private: 22 | mutable DataPTree _properties; 23 | osg::ref_ptr _child; 24 | }; 25 | 26 | #endif // PLANE2D_H 27 | -------------------------------------------------------------------------------- /plugins/OpenSky-Network/res/opensky-network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/plugins/OpenSky-Network/res/opensky-network.png -------------------------------------------------------------------------------- /plugins/OpenSky-Network/res/opensky.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/plugins/OpenSky-Network/res/opensky.png -------------------------------------------------------------------------------- /plugins/OrthoMap/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_AUTOUIC ON) 10 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 11 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 12 | 13 | find_package(Qt5Core CONFIG REQUIRED) 14 | find_package(Qt5Widgets CONFIG REQUIRED) 15 | 16 | include_directories( 17 | ${Qt5Core_INCLUDE_DIRS} 18 | ${Qt5Widgets_INCLUDE_DIRS} 19 | ../ 20 | ) 21 | 22 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 23 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 24 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 25 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 26 | 27 | set(${PROJECT_NAME}_HDRS 28 | ${HFiles} 29 | ) 30 | 31 | set(${PROJECT_NAME}_SRCS 32 | ${CppFiles} 33 | ${UiFiles} 34 | ) 35 | 36 | set(${PROJECT_NAME}_JSONS 37 | ${JsonFiles} 38 | ) 39 | 40 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 41 | 42 | target_link_libraries(${PROJECT_NAME} 43 | 44 | ) 45 | -------------------------------------------------------------------------------- /plugins/OrthoMap/OrthoMap.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | QT_BEGIN_NAMESPACE 6 | class QToolBar; 7 | class QAction; 8 | class QMenu; 9 | QT_END_NAMESPACE 10 | 11 | #include "SaveOrthoProjDialog.h" 12 | 13 | class OrthoMap : public DrawSurfacePolygon 14 | { 15 | Q_OBJECT 16 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "OrthoMap.json") 17 | Q_INTERFACES(PluginInterface) 18 | 19 | public: 20 | OrthoMap(); 21 | ~OrthoMap(); 22 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 23 | virtual void loadContextMenu(QMenu * contextMenu, QTreeWidgetItem * selectedItem) override; 24 | virtual void onDoubleClick(); 25 | virtual void onRightButton(); 26 | virtual void setupWorkingDialog(osg::Node* scene); 27 | 28 | public slots: 29 | virtual void toggle(bool checked) override; 30 | 31 | protected: 32 | osg::Node* _selectedNode; 33 | SaveOrthoProjDialog::ProjectionMode _mode; 34 | SaveOrthoProjDialog* _saveDialog; 35 | QAction* _orthoModelAction; 36 | QAction* _orthoAreaAction; 37 | QAction* _orthoModelDSMAction; 38 | QAction* _orthoAreaDSMAction; 39 | }; 40 | -------------------------------------------------------------------------------- /plugins/OrthoMap/OrthoMap.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "OrthoMap", 3 | "Version": "0.0.1", 4 | "Dependencies": [ 5 | { 6 | "Name": "DrawSurfacePolygon", 7 | "Version": "0.0.1" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /plugins/ScreenShot/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ) 19 | 20 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 21 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 22 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 23 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 24 | 25 | set(${PROJECT_NAME}_HDRS 26 | ${HFiles} 27 | ) 28 | 29 | set(${PROJECT_NAME}_SRCS 30 | ${CppFiles} 31 | ${UiFiles} 32 | ) 33 | 34 | set(${PROJECT_NAME}_JSONS 35 | ${JsonFiles} 36 | ) 37 | 38 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 39 | 40 | target_link_libraries(${PROJECT_NAME} 41 | 42 | ) 43 | -------------------------------------------------------------------------------- /plugins/ScreenShot/CaptureImageCallback.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include 6 | #include 7 | 8 | class CaptureImageCallback : public QObject, public osg::Camera::DrawCallback 9 | { 10 | public: 11 | CaptureImageCallback(GLenum readBuffer, const std::string& name); 12 | 13 | virtual void operator () (osg::RenderInfo& renderInfo) const; 14 | 15 | protected: 16 | GLenum _readBuffer; 17 | std::string _fileName; 18 | osg::ref_ptr _image; 19 | mutable OpenThreads::Mutex _mutex; 20 | static bool first; 21 | }; 22 | 23 | /** Do Culling only while loading PagedLODs*/ 24 | class CustomRenderer : public osgViewer::Renderer 25 | { 26 | public: 27 | CustomRenderer(osg::Camera* camera); 28 | 29 | /** Set flag to omit drawing in renderingTraversals */ 30 | void setCullOnly(bool on) { _cullOnly = on; } 31 | 32 | virtual void operator () (osg::GraphicsContext* /*context*/); 33 | 34 | virtual void cull(); 35 | 36 | bool _cullOnly; 37 | }; 38 | -------------------------------------------------------------------------------- /plugins/ScreenShot/ScreenShot.cpp: -------------------------------------------------------------------------------- 1 | #include "ScreenShot.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | #include "CaptureImageCallback.h" 10 | 11 | ScreenShot::ScreenShot() 12 | { 13 | _pluginCategory = "Effect"; 14 | _pluginName = "Screen Shot"; 15 | } 16 | 17 | ScreenShot::~ScreenShot() 18 | { 19 | 20 | } 21 | 22 | void ScreenShot::setupUi(QToolBar *toolBar, QMenu *menu) 23 | { 24 | _action = new QAction(_mainWindow); 25 | _action->setObjectName(QStringLiteral("screenShotAction")); 26 | QIcon icon19; 27 | icon19.addFile(QStringLiteral("resources/icons/screenshot.png"), QSize(), QIcon::Normal, QIcon::Off); 28 | _action->setIcon(icon19); 29 | _action->setText(tr("ScreenShot")); 30 | _action->setToolTip(tr("Save current scene screen")); 31 | 32 | toolBar->addAction(_action); 33 | menu->addAction(_action); 34 | 35 | connect(_action, SIGNAL(triggered()), this, SLOT(trigger())); 36 | } 37 | 38 | void ScreenShot::trigger() 39 | { 40 | QString saveScreenshotFileName = QFileDialog::getSaveFileName((QWidget*)parent(), tr("save file"), "", tr("JPEG file(*.jpg);;Allfile(*.*)")); 41 | if (saveScreenshotFileName.isEmpty()) 42 | return; 43 | 44 | GLenum buffer = _mainViewer->getMainView()->getCamera()->getGraphicsContext()->getTraits()->doubleBuffer ? GL_BACK : GL_FRONT; 45 | 46 | osg::ref_ptr obj = new CaptureImageCallback(buffer, saveScreenshotFileName.toLocal8Bit().toStdString()); 47 | 48 | _mainViewer->getMainView()->getCamera()->setFinalDrawCallback(obj); 49 | 50 | _mainViewer->renderingTraversals(); 51 | } 52 | -------------------------------------------------------------------------------- /plugins/ScreenShot/ScreenShot.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | QT_BEGIN_NAMESPACE 6 | class QToolBar; 7 | class QAction; 8 | class QMenu; 9 | QT_END_NAMESPACE 10 | 11 | class ScreenShot : public PluginInterface 12 | { 13 | Q_OBJECT 14 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "ScreenShot.json") 15 | Q_INTERFACES(PluginInterface) 16 | 17 | public: 18 | ScreenShot(); 19 | ~ScreenShot(); 20 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 21 | 22 | public slots: 23 | virtual void trigger(); 24 | 25 | private: 26 | QAction* _action; 27 | }; 28 | -------------------------------------------------------------------------------- /plugins/ScreenShot/ScreenShot.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "ScreenShot", 3 | "Version": "0.0.1", 4 | "Dependencies": [] 5 | } 6 | -------------------------------------------------------------------------------- /plugins/SetRefPlane/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_AUTOUIC ON) 10 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 11 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 12 | 13 | find_package(Qt5Core CONFIG REQUIRED) 14 | find_package(Qt5Widgets CONFIG REQUIRED) 15 | 16 | include_directories( 17 | ${Qt5Core_INCLUDE_DIRS} 18 | ${Qt5Widgets_INCLUDE_DIRS} 19 | ) 20 | 21 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 22 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 23 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 24 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 25 | 26 | set(${PROJECT_NAME}_HDRS 27 | ${HFiles} 28 | ) 29 | 30 | set(${PROJECT_NAME}_SRCS 31 | ${CppFiles} 32 | ${UiFiles} 33 | ) 34 | 35 | set(${PROJECT_NAME}_JSONS 36 | ${JsonFiles} 37 | ) 38 | 39 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 40 | 41 | target_link_libraries(${PROJECT_NAME} 42 | 43 | ) 44 | -------------------------------------------------------------------------------- /plugins/SetRefPlane/MeasureVolumePlaneSetDlg.h: -------------------------------------------------------------------------------- 1 | #ifndef MEASUREVOLUMEPLANESETDLG_H 2 | #define MEASUREVOLUMEPLANESETDLG_H 3 | 4 | #include 5 | #include "ui_MeasureVolumePlaneSetDlg.h" 6 | 7 | #include 8 | 9 | class MeasureVolumePlaneSetDlg : public QDialog 10 | { 11 | Q_OBJECT 12 | 13 | public: 14 | MeasureVolumePlaneSetDlg(QWidget *parent = 0); 15 | ~MeasureVolumePlaneSetDlg(); 16 | 17 | void setPlaneCoordinateInfo(osg::ref_ptr coorArr); 18 | osg::ref_ptr getPlanePoints(); 19 | 20 | private: 21 | Ui::MeasureVolumePlaneSetDlg _ui; 22 | osg::ref_ptr _planeArry; 23 | 24 | public slots: 25 | void okBtClicked(); 26 | void cancelBtClicked(); 27 | }; 28 | 29 | #endif // MEASUREVOLUMEPLANESETDLG_H 30 | -------------------------------------------------------------------------------- /plugins/SetRefPlane/SetRefPlane.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "SetRefPlane_global.h" 3 | 4 | #include 5 | #include 6 | 7 | QT_BEGIN_NAMESPACE 8 | class QToolBar; 9 | class QAction; 10 | class QMenu; 11 | QT_END_NAMESPACE 12 | 13 | class MeasureVolumePlaneSetDlg; 14 | 15 | namespace osgText { 16 | class Text; 17 | } 18 | 19 | class SETREFPLANE_EXPORT SetRefPlane : public PluginInterface 20 | { 21 | Q_OBJECT 22 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "SetRefPlane.json") 23 | Q_INTERFACES(PluginInterface) 24 | 25 | public: 26 | SetRefPlane(); 27 | ~SetRefPlane(); 28 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 29 | 30 | virtual void onLeftButton(); 31 | virtual void onMouseMove(); 32 | virtual void onRightButton(); 33 | virtual void onDoubleClick(); 34 | 35 | void createBasicPolygon(); 36 | void drawPlane(); 37 | void resetButton(); 38 | 39 | protected: 40 | QAction* _action; 41 | bool _planeDone; 42 | osg::Plane _refPlane; 43 | osg::ref_ptr _planePoints; 44 | osg::ref_ptr _buildPlaneNode; 45 | osg::ref_ptr _text; 46 | 47 | MeasureVolumePlaneSetDlg *_planeSettingDlg; 48 | 49 | public: 50 | static osg::ref_ptr _vertexBP; 51 | }; 52 | -------------------------------------------------------------------------------- /plugins/SetRefPlane/SetRefPlane.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "SetRefPlane", 3 | "Version": "0.0.1", 4 | "Dependencies": [] 5 | } 6 | -------------------------------------------------------------------------------- /plugins/SetRefPlane/SetRefPlane_global.h: -------------------------------------------------------------------------------- 1 | #ifndef SETREFPLANE_GLOBAL_H 2 | #define SETREFPLANE_GLOBAL_H 3 | 4 | #include 5 | 6 | #ifdef SETREFPLANE_LIB 7 | # define SETREFPLANE_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define SETREFPLANE_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // SETREFPLANE_GLOBAL_H 13 | -------------------------------------------------------------------------------- /plugins/ShowWeather/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ) 19 | 20 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 21 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 22 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 23 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 24 | 25 | set(${PROJECT_NAME}_HDRS 26 | ${HFiles} 27 | ) 28 | 29 | set(${PROJECT_NAME}_SRCS 30 | ${CppFiles} 31 | ${UiFiles} 32 | ) 33 | 34 | set(${PROJECT_NAME}_JSONS 35 | ${JsonFiles} 36 | ) 37 | 38 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 39 | 40 | target_link_libraries(${PROJECT_NAME} 41 | 42 | ) 43 | -------------------------------------------------------------------------------- /plugins/ShowWeather/ShowWeather.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | QT_BEGIN_NAMESPACE 6 | class QToolBar; 7 | class QAction; 8 | class QMenu; 9 | class QDockWidget; 10 | class QTabWidget; 11 | class QSpinBox; 12 | QT_END_NAMESPACE 13 | 14 | namespace osgParticle { 15 | class PrecipitationEffect; 16 | } 17 | 18 | class ShowWeather : public PluginInterface 19 | { 20 | Q_OBJECT 21 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "ShowWeather.json") 22 | Q_INTERFACES(PluginInterface) 23 | 24 | public: 25 | ShowWeather(); 26 | ~ShowWeather(); 27 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 28 | 29 | protected: 30 | virtual void toggle(bool checked) override; 31 | void initPanelTabPage(); 32 | 33 | protected slots: 34 | void showRainSimActionSlot(int rainSize); 35 | void showSnowSimActionSlot(int snowSize); 36 | 37 | protected: 38 | int _tabIndex; 39 | QDockWidget* _controlPanel; 40 | QTabWidget* _tabWidget; 41 | 42 | osg::ref_ptr _snowEffect; 43 | osg::ref_ptr _rainEffect; 44 | 45 | int _maxSnow; 46 | int _maxRain; 47 | 48 | QAction* _action; 49 | }; 50 | -------------------------------------------------------------------------------- /plugins/ShowWeather/ShowWeather.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "ShowWeather", 3 | "Version": "0.0.1", 4 | "Dependencies": [] 5 | } 6 | -------------------------------------------------------------------------------- /plugins/SlopAnalysis/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | find_package(Qt5OpenGL CONFIG REQUIRED) 15 | 16 | include_directories( 17 | ${Qt5Core_INCLUDE_DIRS} 18 | ${Qt5Widgets_INCLUDE_DIRS} 19 | ${Qt5OpenGL_INCLUDE_DIRS} 20 | ) 21 | 22 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 23 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 24 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 25 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 26 | 27 | set(${PROJECT_NAME}_HDRS 28 | ${HFiles} 29 | ) 30 | 31 | set(${PROJECT_NAME}_SRCS 32 | ${CppFiles} 33 | ${UiFiles} 34 | ) 35 | 36 | set(${PROJECT_NAME}_JSONS 37 | ${JsonFiles} 38 | ) 39 | 40 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 41 | 42 | target_link_libraries(${PROJECT_NAME} 43 | 44 | ) 45 | -------------------------------------------------------------------------------- /plugins/SlopAnalysis/SlopAnalysis.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | QT_BEGIN_NAMESPACE 6 | class QToolBar; 7 | class QAction; 8 | class QMenu; 9 | class QTreeWidgetItem; 10 | QT_END_NAMESPACE 11 | 12 | class SlopAnalysis : public PluginInterface 13 | { 14 | Q_OBJECT 15 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "SlopAnalysis.json") 16 | Q_INTERFACES(PluginInterface) 17 | 18 | public: 19 | SlopAnalysis(); 20 | ~SlopAnalysis(); 21 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 22 | 23 | public slots: 24 | virtual void toggle(bool checked) override; 25 | 26 | protected: 27 | osg::Node* _selectedNode; 28 | osg::ref_ptr _slopeProgram; 29 | 30 | private: 31 | QAction* _action; 32 | }; 33 | -------------------------------------------------------------------------------- /plugins/SlopAnalysis/SlopAnalysis.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "SlopAnalysis", 3 | "Version": "0.0.1", 4 | "Dependencies": [] 5 | } 6 | -------------------------------------------------------------------------------- /plugins/Template/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ) 19 | 20 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 21 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 22 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 23 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 24 | 25 | set(${PROJECT_NAME}_HDRS 26 | ${HFiles} 27 | ) 28 | 29 | set(${PROJECT_NAME}_SRCS 30 | ${CppFiles} 31 | ${UiFiles} 32 | ) 33 | 34 | set(${PROJECT_NAME}_JSONS 35 | ${JsonFiles} 36 | ) 37 | 38 | set(resdata 39 | res/Template.svg 40 | ) 41 | 42 | file(COPY ${resdata} DESTINATION ${DIST_RESOURCES_PATH}/Template) 43 | 44 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 45 | 46 | target_link_libraries(${PROJECT_NAME} 47 | 48 | ) 49 | -------------------------------------------------------------------------------- /plugins/Template/Template.cpp: -------------------------------------------------------------------------------- 1 | #include "Template.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | #include 10 | 11 | Template::Template() 12 | { 13 | _pluginCategory = "Draw"; 14 | _pluginName = "Template"; 15 | } 16 | 17 | Template::~Template() 18 | { 19 | } 20 | 21 | void Template::setupUi(QToolBar *toolBar, QMenu *menu) 22 | { 23 | _action = new QAction(_mainWindow); 24 | _action->setObjectName(QStringLiteral("TemplateAction")); 25 | QIcon icon19; 26 | icon19.addFile(QStringLiteral("resources/Template/Template.svg"), QSize(), QIcon::Normal, QIcon::Off); 27 | _action->setIcon(icon19); 28 | _action->setText(tr("Template")); 29 | _action->setToolTip(tr("Say Hello world!")); 30 | 31 | toolBar->addAction(_action); 32 | menu->addAction(_action); 33 | 34 | connect(_action, SIGNAL(triggered()), this, SLOT(trigger())); 35 | } 36 | 37 | void Template::trigger() 38 | { 39 | QMessageBox msgBox; 40 | 41 | msgBox.setText("Tamplate plugin, say hello "); 42 | msgBox.exec(); 43 | } 44 | -------------------------------------------------------------------------------- /plugins/Template/Template.h: -------------------------------------------------------------------------------- 1 | #ifndef TEMPLATE_H 2 | #define TEMPLATE_H 3 | 4 | #include 5 | #include 6 | 7 | QT_BEGIN_NAMESPACE 8 | class QToolBar; 9 | class QAction; 10 | class QMenu; 11 | QT_END_NAMESPACE 12 | 13 | class Template : public PluginInterface 14 | { 15 | Q_OBJECT 16 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "Template.json") 17 | Q_INTERFACES(PluginInterface) 18 | 19 | public: 20 | Template(); 21 | ~Template(); 22 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 23 | 24 | public slots: 25 | virtual void trigger(); 26 | 27 | private: 28 | QAction* _action; 29 | }; 30 | 31 | #endif // TEMPLATE_H 32 | -------------------------------------------------------------------------------- /plugins/Template/Template.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "Template", 3 | "Version": "0.0.1", 4 | "Dependencies": [] 5 | } 6 | -------------------------------------------------------------------------------- /plugins/TileSelect/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_AUTOUIC ON) 10 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 11 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 12 | 13 | find_package(Qt5Core CONFIG REQUIRED) 14 | find_package(Qt5Widgets CONFIG REQUIRED) 15 | 16 | include_directories( 17 | ${Qt5Core_INCLUDE_DIRS} 18 | ${Qt5Widgets_INCLUDE_DIRS} 19 | ) 20 | 21 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 22 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 23 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 24 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 25 | 26 | set(${PROJECT_NAME}_HDRS 27 | ${HFiles} 28 | ) 29 | 30 | set(${PROJECT_NAME}_SRCS 31 | ${CppFiles} 32 | ${UiFiles} 33 | ) 34 | 35 | set(${PROJECT_NAME}_JSONS 36 | ${JsonFiles} 37 | ) 38 | 39 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 40 | 41 | target_link_libraries(${PROJECT_NAME} 42 | 43 | ) 44 | -------------------------------------------------------------------------------- /plugins/TileSelect/TileSelect.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "TileSelect_global.h" 3 | #include 4 | #include 5 | 6 | QT_BEGIN_NAMESPACE 7 | class QToolBar; 8 | class QAction; 9 | class QMenu; 10 | class QTreeWidgetItem; 11 | QT_END_NAMESPACE 12 | 13 | namespace osg { 14 | class Geode; 15 | } 16 | 17 | class TileSelectDialog; 18 | 19 | class TILESELECT_EXPORT TileSelect : public PluginInterface 20 | { 21 | Q_OBJECT 22 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "TileSelect.json") 23 | Q_INTERFACES(PluginInterface) 24 | 25 | public: 26 | TileSelect(); 27 | ~TileSelect(); 28 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 29 | virtual void onLeftButton() override; 30 | virtual void loadContextMenu(QMenu* contextMenu, QTreeWidgetItem* selectedItem) override; 31 | 32 | signals: 33 | void tileSelected(const QString&); 34 | void tileUnSelected(const QString&); 35 | void closeTileSelectDialog(); 36 | 37 | public slots: 38 | void selectAllTilesSlots(); 39 | void unselectAllTileSlots(); 40 | 41 | protected: 42 | virtual void toggle(bool checked) override; 43 | void selectTile(osg::Node* tileNode, osg::BoundingBox boundbox, osg::Vec3 worldCenter); 44 | void initTileSelectDialog(int itemTotalCount); 45 | void toggleTileSelectDialog(osg::Node* selectedNode, bool checked); 46 | 47 | // Get bound box from cache 48 | osg::BoundingBox getBound(osg::Node* node); 49 | 50 | protected: 51 | osg::Node* _selectedNode = NULL; 52 | 53 | QList _nodeList; 54 | osg::Vec4 _selectedColor; 55 | 56 | TileSelectDialog* _tileSelectDlg = NULL; 57 | QAction* _action; 58 | 59 | static QMap _boundBuffers; 60 | }; 61 | -------------------------------------------------------------------------------- /plugins/TileSelect/TileSelect.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "TileSelect", 3 | "Version": "0.0.1", 4 | "Dependencies": [] 5 | } 6 | -------------------------------------------------------------------------------- /plugins/TileSelect/TileSelectDialog.h: -------------------------------------------------------------------------------- 1 | #ifndef TILESELECTDIALOG_H 2 | #define TILESELECTDIALOG_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class TileSelectDialog; 8 | } 9 | 10 | class TileSelectDialog : public QWidget 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | TileSelectDialog(int itemTotalCount, QWidget *parent = 0); 16 | ~TileSelectDialog(); 17 | 18 | public slots: 19 | void selectTileSlot(const QString& tileName); 20 | void unselectTileSlot(const QString& tileName); 21 | void okAllBtClicked(); 22 | void cancleAllBtClicked(); 23 | void updateLabelCount(); 24 | 25 | signals: 26 | void selectAllTile(); 27 | void unselectAllTile(); 28 | void closed(); 29 | 30 | protected: 31 | virtual void closeEvent(QCloseEvent *e) override; 32 | 33 | private: 34 | Ui::TileSelectDialog* _ui; 35 | int _itemTotalCount; 36 | }; 37 | 38 | #endif // TILESELECTDIALOG_H 39 | -------------------------------------------------------------------------------- /plugins/TileSelect/TileSelect_global.h: -------------------------------------------------------------------------------- 1 | #ifndef TILESELECT_GLOBAL_H 2 | #define TILESELECT_GLOBAL_H 3 | 4 | #include 5 | 6 | #ifdef TILESELECT_LIB 7 | # define TILESELECT_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define TILESELECT_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // TILESELECT_GLOBAL_H 13 | -------------------------------------------------------------------------------- /plugins/VRMode/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules ${CMAKE_MODULE_PATH}) 8 | 9 | FIND_PACKAGE(OpenVR) 10 | 11 | set(CMAKE_CXX_STANDARD 11) 12 | set(CMAKE_AUTOMOC ON) 13 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 14 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 15 | 16 | find_package(Qt5Core CONFIG REQUIRED) 17 | find_package(Qt5Widgets CONFIG REQUIRED) 18 | find_package(Qt5OpenGL CONFIG REQUIRED) 19 | 20 | include_directories( 21 | ${Qt5Core_INCLUDE_DIRS} 22 | ${Qt5Widgets_INCLUDE_DIRS} 23 | ${Qt5OpenGL_INCLUDE_DIRS} 24 | ${OPENVR_INCLUDE_DIRS} 25 | ../../libs 26 | ) 27 | 28 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 29 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 30 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 31 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 32 | 33 | set(${PROJECT_NAME}_HDRS 34 | ${HFiles} 35 | ) 36 | 37 | set(${PROJECT_NAME}_SRCS 38 | ${CppFiles} 39 | ${UiFiles} 40 | ) 41 | 42 | set(${PROJECT_NAME}_JSONS 43 | ${JsonFiles} 44 | ) 45 | 46 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 47 | 48 | target_link_libraries(${PROJECT_NAME} 49 | ${OPENVR_LIBRARY} 50 | ) 51 | -------------------------------------------------------------------------------- /plugins/VRMode/VRMode.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | QT_BEGIN_NAMESPACE 6 | class QToolBar; 7 | class QAction; 8 | class QMenu; 9 | QT_END_NAMESPACE 10 | 11 | namespace osg 12 | { 13 | class GraphicsContext; 14 | } 15 | 16 | namespace osgQt 17 | { 18 | class GraphicsWindowQt; 19 | class GLWidget; 20 | } 21 | 22 | namespace osgViewer 23 | { 24 | class View; 25 | class Viewer; 26 | class GraphicsWindow; 27 | } 28 | 29 | class OpenVRDevice; 30 | class VRControlCallback; 31 | 32 | class VRMode: public PluginInterface 33 | { 34 | Q_OBJECT 35 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "VRMode.json") 36 | Q_INTERFACES(PluginInterface) 37 | 38 | public: 39 | VRMode(); 40 | 41 | ~VRMode(); 42 | 43 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 44 | 45 | bool isVRRunning(); 46 | 47 | bool isVRReady(); 48 | 49 | public slots: 50 | virtual void toggle(bool checked = false); 51 | 52 | void removeVRView(); 53 | 54 | void addVRView(); 55 | 56 | void controlEvent(); 57 | 58 | signals: 59 | void aborted(); 60 | 61 | private: 62 | QAction *_action; 63 | double _fake_position_x; 64 | double _fake_position_y; 65 | bool _trigger; 66 | bool _clear; 67 | bool _VRReady; 68 | osg::ref_ptr _VRContext; 69 | osg::ref_ptr _VRGraphicsWindow; 70 | osg::ref_ptr _openVRDevice; 71 | osg::ref_ptr _VRView; 72 | QWidget *_VRWidget; 73 | osg::ref_ptr _controlCallback; 74 | }; 75 | -------------------------------------------------------------------------------- /plugins/VRMode/VRMode.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "VRMode", 3 | "Version": "0.0.1", 4 | "Dependencies": [] 5 | } 6 | -------------------------------------------------------------------------------- /plugins/VRMode/openvreventhandler.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * openvreventhandler.cpp 3 | * 4 | * Created on: Dec 18, 2015 5 | * Author: Chris Denham 6 | */ 7 | 8 | #include 9 | #include "openvreventhandler.h" 10 | #include "openvrdevice.h" 11 | 12 | bool OpenVREventHandler::handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &ad) 13 | { 14 | switch (ea.getEventType()) 15 | { 16 | case osgGA::GUIEventAdapter::KEYUP: 17 | 18 | switch (ea.getKey()) 19 | { 20 | case osgGA::GUIEventAdapter::KEY_R: 21 | m_openvrDevice->resetSensorOrientation(); 22 | break; 23 | } 24 | 25 | break; 26 | default: 27 | break; 28 | } 29 | 30 | return osgGA::GUIEventHandler::handle(ea, ad); 31 | } 32 | -------------------------------------------------------------------------------- /plugins/VRMode/openvreventhandler.h: -------------------------------------------------------------------------------- 1 | /* 2 | * openvreventhandler.h 3 | * 4 | * Created on: Dec 18, 2015 5 | * Author: Chris Denham 6 | */ 7 | 8 | #ifndef _OSG_OPENVREVENTHANDLER_H_ 9 | #define _OSG_OPENVREVENTHANDLER_H_ 10 | 11 | #include 12 | 13 | // Forward declaration 14 | class OpenVRDevice; 15 | 16 | 17 | class OpenVREventHandler: public osgGA::GUIEventHandler 18 | { 19 | public: 20 | explicit OpenVREventHandler(osg::ref_ptr device): 21 | m_openvrDevice(device), m_usePositionalTracking(true) 22 | { 23 | } 24 | 25 | virtual bool handle(const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter&); 26 | 27 | protected: 28 | osg::ref_ptr m_openvrDevice; 29 | bool m_usePositionalTracking; 30 | }; 31 | 32 | #endif /* _OSG_OPENVREVENTHANDLER_H_ */ 33 | -------------------------------------------------------------------------------- /plugins/VRMode/openvrupdateslavecallback.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * openvrupdateslavecallback.cpp 3 | * 4 | * Created on: Dec 18, 2015 5 | * Author: Chris Denham 6 | */ 7 | 8 | #include "openvrupdateslavecallback.h" 9 | 10 | void OpenVRUpdateSlaveCallback::updateSlave(osg::View &view, osg::View::Slave &slave) 11 | { 12 | osg::Vec3 position = m_device->position(); 13 | osg::Quat orientation = m_device->orientation(); 14 | osg::Matrix viewOffset = (m_cameraType == LEFT_CAMERA) ? m_device->viewMatrixLeft() : m_device->viewMatrixRight(); 15 | 16 | viewOffset.preMultRotate(orientation); 17 | viewOffset.setTrans(viewOffset.getTrans() + position); 18 | 19 | slave._viewOffset = viewOffset; 20 | 21 | slave.updateSlaveImplementation(view); 22 | } 23 | -------------------------------------------------------------------------------- /plugins/VRMode/openvrupdateslavecallback.h: -------------------------------------------------------------------------------- 1 | /* 2 | * openvrupdateslavecallback.h 3 | * 4 | * Created on: Dec 18, 2015 5 | * Author: Chris Denham 6 | */ 7 | 8 | #ifndef _OSG_OPENVRUPDATESLAVECALLBACK_H_ 9 | #define _OSG_OPENVRUPDATESLAVECALLBACK_H_ 10 | 11 | #include 12 | 13 | #include "openvrdevice.h" 14 | 15 | 16 | struct OpenVRUpdateSlaveCallback: public osg::View::Slave::UpdateSlaveCallback 17 | { 18 | enum CameraType 19 | { 20 | LEFT_CAMERA, 21 | RIGHT_CAMERA 22 | }; 23 | 24 | OpenVRUpdateSlaveCallback(CameraType cameraType, OpenVRDevice *device, OpenVRSwapCallback *swapCallback): 25 | m_cameraType(cameraType), 26 | m_device(device), 27 | m_swapCallback(swapCallback) 28 | { 29 | } 30 | 31 | virtual void updateSlave(osg::View &view, osg::View::Slave &slave); 32 | 33 | CameraType m_cameraType; 34 | osg::ref_ptr m_device; 35 | osg::ref_ptr m_swapCallback; 36 | }; 37 | 38 | #endif // _OSG_OPENVRUPDATESLAVECALLBACK_H_ 39 | -------------------------------------------------------------------------------- /plugins/VRMode/openvrviewer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * openvrviewer.h 3 | * 4 | * Created on: Dec 18, 2015 5 | * Author: Chris Denham 6 | */ 7 | 8 | #ifndef _OSG_OPENVRVIEWER_H_ 9 | #define _OSG_OPENVRVIEWER_H_ 10 | 11 | #include 12 | 13 | #include "openvrdevice.h" 14 | 15 | // Forward declaration 16 | namespace osgViewer 17 | { 18 | class View; 19 | } 20 | 21 | 22 | class OpenVRViewer: public osg::Group 23 | { 24 | public: 25 | OpenVRViewer(osgViewer::View *view, osg::ref_ptr dev, osg::ref_ptr realizeOperation): 26 | osg::Group(), 27 | m_configured(false), 28 | m_view(view), 29 | m_cameraRTTLeft(nullptr), m_cameraRTTRight(nullptr), 30 | m_device(dev), 31 | m_realizeOperation(realizeOperation) 32 | { 33 | } 34 | 35 | virtual void traverse(osg::NodeVisitor &nv); 36 | 37 | protected: 38 | ~OpenVRViewer() 39 | { 40 | } 41 | 42 | virtual void configure(); 43 | 44 | bool m_configured; 45 | osg::observer_ptr m_view; 46 | osg::observer_ptr m_cameraRTTLeft, m_cameraRTTRight; 47 | osg::observer_ptr m_device; 48 | osg::observer_ptr m_realizeOperation; 49 | }; 50 | 51 | #endif /* _OSG_OPENVRVIEWER_H_ */ 52 | -------------------------------------------------------------------------------- /plugins/VisibilityTest/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | 15 | include_directories( 16 | ${Qt5Core_INCLUDE_DIRS} 17 | ${Qt5Widgets_INCLUDE_DIRS} 18 | ) 19 | 20 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 21 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 22 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 23 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 24 | 25 | set(${PROJECT_NAME}_HDRS 26 | ${HFiles} 27 | ) 28 | 29 | set(${PROJECT_NAME}_SRCS 30 | ${CppFiles} 31 | ${UiFiles} 32 | ) 33 | 34 | set(${PROJECT_NAME}_JSONS 35 | ${JsonFiles} 36 | ) 37 | 38 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 39 | 40 | target_link_libraries(${PROJECT_NAME} 41 | 42 | ) 43 | -------------------------------------------------------------------------------- /plugins/VisibilityTest/VisibilityTest.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | 5 | QT_BEGIN_NAMESPACE 6 | class QToolBar; 7 | class QAction; 8 | class QMenu; 9 | QT_END_NAMESPACE 10 | 11 | class VisibilityTest : public PluginInterface 12 | { 13 | Q_OBJECT 14 | Q_PLUGIN_METADATA(IID "io.tqjxlm.Atlas.PluginInterface" FILE "VisibilityTest.json") 15 | Q_INTERFACES(PluginInterface) 16 | 17 | public: 18 | VisibilityTest(); 19 | ~VisibilityTest(); 20 | virtual void setupUi(QToolBar *toolBar, QMenu *menu) override; 21 | 22 | virtual void onLeftButton(); 23 | virtual void onRightButton(); 24 | virtual void onDoubleClick(); 25 | virtual void onMouseMove(); 26 | 27 | protected: 28 | QAction* _action; 29 | 30 | osg::ref_ptr _visionGeometry;//可视线 31 | osg::ref_ptr _visionVertex;//可视线顶点数组 32 | osg::ref_ptr _noVisionGeometry;//不可视线 33 | osg::ref_ptr _noVisionVertex;//不可视线顶点数组 34 | 35 | int _ptCount; 36 | osg::Vec3 _start_point, _end_point; 37 | osg::Vec3 _first_intersection; 38 | 39 | void initVisionGeode();//初始化实线 40 | }; 41 | -------------------------------------------------------------------------------- /plugins/VisibilityTest/VisibilityTest.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "VisibilityTest", 3 | "Version": "0.0.1", 4 | "Dependencies": [] 5 | } 6 | -------------------------------------------------------------------------------- /plugins/VisibilityTestArea/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.1) 2 | 3 | get_filename_component(ProjectId ${CMAKE_CURRENT_SOURCE_DIR} NAME) 4 | string(REPLACE " " "_" ProjectId ${ProjectId}) 5 | project(${ProjectId}) 6 | 7 | set(CMAKE_CXX_STANDARD 11) 8 | set(CMAKE_AUTOMOC ON) 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DIST_PLUGINS_PATH}) 11 | 12 | find_package(Qt5Core CONFIG REQUIRED) 13 | find_package(Qt5Widgets CONFIG REQUIRED) 14 | find_package(Qt5OpenGL CONFIG REQUIRED) 15 | 16 | include_directories( 17 | ${Qt5Core_INCLUDE_DIRS} 18 | ${Qt5Widgets_INCLUDE_DIRS} 19 | ${Qt5OpenGL_INCLUDE_DIRS} 20 | ) 21 | 22 | file(GLOB_RECURSE HFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) 23 | file(GLOB_RECURSE CppFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 24 | file(GLOB_RECURSE UiFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.ui) 25 | file(GLOB_RECURSE JsonFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.json) 26 | 27 | set(${PROJECT_NAME}_HDRS 28 | ${HFiles} 29 | ) 30 | 31 | set(${PROJECT_NAME}_SRCS 32 | ${CppFiles} 33 | ${UiFiles} 34 | ) 35 | 36 | set(${PROJECT_NAME}_JSONS 37 | ${JsonFiles} 38 | ) 39 | 40 | add_library(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_JSONS} ${${PROJECT_NAME}_SRCS} ${${PROJECT_NAME}_HDRS}) 41 | 42 | target_link_libraries(${PROJECT_NAME} 43 | 44 | ) 45 | -------------------------------------------------------------------------------- /plugins/VisibilityTestArea/VisibilityTestArea.json: -------------------------------------------------------------------------------- 1 | { 2 | "Name": "VisibilityTestArea", 3 | "Version": "0.0.1", 4 | "Dependencies": [] 5 | } 6 | -------------------------------------------------------------------------------- /resource.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | Atlas/resources/earth_files/geocentric.earth 4 | Atlas/resources/earth_files/projected.earth 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /templates/AtlasPlugin.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/templates/AtlasPlugin.zip -------------------------------------------------------------------------------- /templates/AtlasPluginExtension/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("AtlasPluginExtension")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("AtlasPluginExtension")] 13 | [assembly: AssemblyCopyright("")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Build and Revision Numbers 30 | // by using the '*' as shown below: 31 | // [assembly: AssemblyVersion("1.0.*")] 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /templates/AtlasPluginExtension/source.extension.vsixmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | AtlasPluginExtension 6 | Empty VSIX Project. 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /templates/AtlasPluginTemplate/AtlasPluginTemplate.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tqjxlm/Atlas/a093741f8c07651c26ba3c4a4050e274ed1dcf94/templates/AtlasPluginTemplate/AtlasPluginTemplate.ico -------------------------------------------------------------------------------- /templates/AtlasPluginTemplate/AtlasPluginTemplate.vstemplate: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Atlas_Basic 5 | VC 6 | 7 | 8 | 1000 9 | true 10 | Atlas_Basic 11 | true 12 | Enabled 13 | true 14 | AtlasPluginTemplate 15 | AtlasPluginTemplate.ico 16 | 17 | 18 | 19 | Basic.vcxproj.filters 20 | Basic_global.h 21 | 22 | 23 | 24 | AtlasPluginWizard, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=null 25 | AtlasPluginWizard.Wizard 26 | 27 | -------------------------------------------------------------------------------- /templates/AtlasPluginTemplate/Basic_global.h: -------------------------------------------------------------------------------- 1 | #ifndef $upper_projectname$_GLOBAL_H 2 | #define $upper_projectname$_GLOBAL_H 3 | 4 | #include 5 | 6 | #ifdef $upper_projectname$_LIB 7 | # define $upper_projectname$_EXPORT Q_DECL_EXPORT 8 | #else 9 | # define $upper_projectname$_EXPORT Q_DECL_IMPORT 10 | #endif 11 | 12 | #endif // $upper_projectname$_GLOBAL_H 13 | -------------------------------------------------------------------------------- /templates/AtlasPluginTemplate/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("AtlasPluginTemplate")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("AtlasPluginTemplate")] 13 | [assembly: AssemblyCopyright("")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Build and Revision Numbers 30 | // by using the '*' as shown below: 31 | // [assembly: AssemblyVersion("1.0.*")] 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /templates/AtlasPluginWizard/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("AtlasPluginWizard")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("AtlasPluginWizard")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("8193cb14-b20f-40b0-8eb5-f3eb52dfdc2b")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /templates/AtlasPluginWizard/Wizard.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using EnvDTE; 4 | using Microsoft.VisualStudio.TemplateWizard; 5 | 6 | namespace AtlasPluginWizard 7 | { 8 | public class Wizard : IWizard 9 | { 10 | // This method is called before opening any item that 11 | // has the OpenInEditor attribute. 12 | public void BeforeOpeningFile(ProjectItem projectItem) 13 | { 14 | } 15 | 16 | public void ProjectFinishedGenerating(Project project) 17 | { 18 | } 19 | 20 | // This method is only called for item templates, 21 | // not for project templates. 22 | public void ProjectItemFinishedGenerating(ProjectItem 23 | projectItem) 24 | { 25 | } 26 | 27 | // This method is called after the project is created. 28 | public void RunFinished() 29 | { 30 | } 31 | 32 | public void RunStarted(object automationObject, 33 | Dictionary replacementsDictionary, 34 | WizardRunKind runKind, object[] customParams) 35 | { 36 | string projectName = replacementsDictionary["$projectname$"]; 37 | replacementsDictionary.Add("$upper_projectname$", projectName.ToUpper()); 38 | } 39 | 40 | // This method is only called for item templates, 41 | // not for project templates. 42 | public bool ShouldAddProjectItem(string filePath) 43 | { 44 | return true; 45 | } 46 | } 47 | } --------------------------------------------------------------------------------