├── src
├── Core
│ ├── OCLayer
│ │ ├── src
│ │ │ ├── IDatabase.cpp
│ │ │ ├── FeatureNode.cpp
│ │ │ ├── FeatureEffect.cpp
│ │ │ ├── FeatureLayer.cpp
│ │ │ ├── LayerManager.cpp
│ │ │ ├── Feature.cpp
│ │ │ ├── ScenePass.cpp
│ │ │ ├── QueryInfo.cpp
│ │ │ ├── IRecord.cpp
│ │ │ ├── OCResource.cpp
│ │ │ ├── IFeature.cpp
│ │ │ └── IArchive.cpp
│ │ ├── FeatureLayer.h
│ │ ├── FeatureEffect.h
│ │ ├── LayerManager.h
│ │ ├── FeatureNode.h
│ │ ├── OCResource.h
│ │ ├── BaseNodeMask.h
│ │ ├── IRecord.h
│ │ ├── IFeature.h
│ │ ├── Feature.h
│ │ ├── SqliteArchive.h
│ │ ├── QueryInfo.h
│ │ ├── ReadFileCallback.h
│ │ ├── CMakeLists.txt
│ │ └── ScenePass.h
│ ├── OCesium
│ │ ├── src
│ │ │ ├── BaseWriter.cpp
│ │ │ ├── FeatureAttributeCallback.cpp
│ │ │ ├── MapProject.cpp
│ │ │ ├── DracoEncoder.cpp
│ │ │ ├── image.cc
│ │ │ ├── gltfConfig.cpp
│ │ │ ├── GLTFObject.cpp
│ │ │ └── CmptWriter.cpp
│ │ ├── KtxCompress.h
│ │ ├── WebpEncoder.h
│ │ ├── X3DM.h
│ │ ├── TextureOptimize.h
│ │ ├── FeatureAttributeCallback.h
│ │ ├── glTFOptimize.h
│ │ ├── CmptWriter.h
│ │ ├── GLTFObject.h
│ │ ├── DracoEncoder.h
│ │ ├── gltfAttributeCallback.h
│ │ ├── BaseWriter.h
│ │ ├── B3dmWriter.h
│ │ ├── gltfConfig.h
│ │ ├── PntsWriter.h
│ │ ├── MapProject.h
│ │ ├── glTFConverter.h
│ │ ├── converter
│ │ │ └── glTFOptimize.cpp
│ │ ├── I3dmWriter.h
│ │ ├── ConvertWorkqueue.h
│ │ ├── ObliqueConverter.h
│ │ ├── MergeTriangleOperator.h
│ │ ├── internal
│ │ │ └── swap.h
│ │ ├── gltfMaterial.h
│ │ ├── BatchGroup.h
│ │ └── BuildingConverter.h
│ ├── OCUtility
│ │ ├── aes.h
│ │ ├── src
│ │ │ ├── Rectangle.cpp
│ │ │ ├── Vector4.cpp
│ │ │ ├── AxisAlignedBox.cpp
│ │ │ ├── Vector2.cpp
│ │ │ └── tinyxmlerror.cpp
│ │ ├── md5.h
│ │ ├── RGBAEncoder.h
│ │ ├── Android.mk
│ │ ├── FileUtil.h
│ │ └── CMakeLists.txt
│ ├── OCModel
│ │ ├── LineTable.h
│ │ ├── ModelNode.h
│ │ ├── OCModel.aps
│ │ ├── OCModel.rc
│ │ ├── PipeLine.h
│ │ ├── PipeMath.h
│ │ ├── IModelTable.h
│ │ ├── src
│ │ │ ├── ISection.cpp
│ │ │ ├── PipeLine.cpp
│ │ │ ├── PipeNode.cpp
│ │ │ ├── IModelTable.cpp
│ │ │ ├── LineTable.cpp
│ │ │ ├── NodeExInfo.cpp
│ │ │ ├── NodeTable.cpp
│ │ │ ├── PipeTable.cpp
│ │ │ ├── TableConfig.cpp
│ │ │ ├── xmlConfig.cpp
│ │ │ ├── ModelUtility.cpp
│ │ │ ├── CirclePipeNode2.cpp
│ │ │ ├── CirclePipeNode3.cpp
│ │ │ ├── IModelFactory.cpp
│ │ │ ├── ModelListennerBase.cpp
│ │ │ ├── ModelArchive.cpp
│ │ │ ├── PipeLineInfo.cpp
│ │ │ ├── ShelfModelFactory.cpp
│ │ │ ├── ModelDataQueryCallback.cpp
│ │ │ └── DataFilter.cpp
│ │ ├── PipeLineInfo.h
│ │ ├── ShelfModelFactory.h
│ │ ├── IModelFactory.h
│ │ ├── ModelListennerBase.h
│ │ ├── PipeModelFactory.h
│ │ ├── ModelDataQueryCallback.h
│ │ ├── ModelUtility.h
│ │ ├── TilesetSaveStrategy.h
│ │ ├── PipeGeomLibrary.h
│ │ ├── DataFilter.h
│ │ ├── NodeExInfo.h
│ │ ├── ProjectTool.h
│ │ ├── xmlConfig.h
│ │ ├── NodeTable.h
│ │ ├── BuildWell.h
│ │ ├── IModelDatabase.h
│ │ └── PipeTable.h
│ ├── OCNetCDF
│ │ ├── src
│ │ │ ├── DBZ.cpp
│ │ │ ├── NcDBZ.cpp
│ │ │ ├── AWXReader.cpp
│ │ │ ├── NcVolume.cpp
│ │ │ └── Ncep.cpp
│ │ ├── CinRadHeader.h
│ │ ├── Ncep.h
│ │ ├── Reflective.h
│ │ ├── AWXReader.h
│ │ ├── NcZT.h
│ │ ├── NcZQ.h
│ │ ├── DBZ.h
│ │ ├── NcDBZ.h
│ │ ├── npy
│ │ │ └── npyTemprature.h
│ │ ├── NcepWind.h
│ │ ├── NetCDFDefine.h
│ │ ├── NcUV.h
│ │ ├── NetCDFReader.h
│ │ ├── CINRad.h
│ │ ├── ICinRadReader.h
│ │ ├── NcVolume.h
│ │ ├── CMakeLists.txt
│ │ └── TransferFunction.h
│ ├── OCVolume
│ │ ├── src
│ │ │ └── Swan.cpp
│ │ ├── CinRadHeader.h
│ │ ├── FyAwx.h
│ │ ├── CinRadC.h
│ │ ├── Swan.h
│ │ ├── Volume.h
│ │ ├── Vtk.h
│ │ ├── CinRad.h
│ │ ├── CMakeLists.txt
│ │ ├── CinRadReaderFMT.h
│ │ ├── CinRadReader.h
│ │ └── VolumeDefine.h
│ ├── OCServer
│ │ ├── OCRegister.h
│ │ ├── invokeCommand.h
│ │ ├── VolumeManager.h
│ │ ├── OCServerDefine.h
│ │ ├── CMakeLists.txt
│ │ ├── OCServer.h
│ │ └── src
│ │ │ ├── VolumeManager.cpp
│ │ │ └── OCRegister.cpp
│ ├── OCZip
│ │ ├── ZipDefine.h
│ │ ├── BZip2.h
│ │ ├── PakoZip.h
│ │ ├── iostd.h
│ │ ├── iowin32.h
│ │ ├── Makefile
│ │ ├── src
│ │ │ ├── BZip2.cpp
│ │ │ └── PakoZip.cpp
│ │ ├── CMakeLists.txt
│ │ └── mztools.h
│ ├── OCMain
│ │ ├── src
│ │ │ ├── FunctionalArchive.cpp
│ │ │ └── OCPluginTool.cpp
│ │ ├── json
│ │ │ ├── json.h
│ │ │ ├── version.h
│ │ │ ├── autolink.h
│ │ │ ├── forwards.h
│ │ │ └── features.h
│ │ ├── OCPluginTool.h
│ │ ├── JsonHelper.h
│ │ ├── Environment.h
│ │ ├── BaseEnum.h
│ │ ├── BaseEvents.h
│ │ ├── DatabaseDefine.h
│ │ ├── JsonPackage.h
│ │ ├── stl.h
│ │ ├── osgearth.h
│ │ ├── Singleton.h
│ │ ├── GLX
│ │ │ └── CORETimerImp.h
│ │ └── CMakeLists.txt
│ ├── OCHttpClient
│ │ ├── HttpClientDefine.h
│ │ └── CMakeLists.txt
│ └── OCHttpServer
│ │ ├── HttpServerDefine.h
│ │ ├── HttpServer.h
│ │ ├── WebSocket.h
│ │ ├── CMakeLists.txt
│ │ └── src
│ │ └── WebSocket.cc
├── Application
│ ├── Weathertoy
│ │ ├── ServerThread.cpp
│ │ ├── RCa17512
│ │ ├── main.cpp
│ │ ├── res
│ │ │ ├── app.ico
│ │ │ ├── app.png
│ │ │ ├── earth.png
│ │ │ ├── logo.png
│ │ │ ├── splash.png
│ │ │ └── splash2.png
│ │ ├── resource.h
│ │ ├── resource1.h
│ │ ├── LabViewer.cpp
│ │ ├── ThunderKML.h
│ │ ├── WeatherLab.rc
│ │ ├── RadarStationKML.h
│ │ ├── WeatherLabMenu.cpp
│ │ ├── main
│ │ │ ├── cplusplus.js
│ │ │ └── main.html
│ │ ├── LabWebEngineView.cpp
│ │ ├── RibbonMenuWidget.cpp
│ │ ├── copyFrom.bat
│ │ ├── Bridge.h
│ │ ├── ServerThread.h
│ │ ├── weatherlab.qrc
│ │ ├── resources.qrc
│ │ ├── RibbonMenuWidget.h
│ │ ├── LabWebEngineView.h
│ │ ├── Bridge.cpp
│ │ ├── WeatherLab.vcxproj.user
│ │ ├── CMakeLists.txt
│ │ └── LabViewer.h
│ ├── OConv
│ │ ├── Geography
│ │ │ ├── Kriging.h
│ │ │ ├── GDALTool.cpp
│ │ │ ├── GeographyTool.cpp
│ │ │ ├── GeographyTool.h
│ │ │ ├── GDALTool.h
│ │ │ └── ShpDrawer.h
│ │ ├── SqliteOper.h
│ │ ├── ConvCommand.h
│ │ ├── RadarStationKML.cpp
│ │ ├── RadarStationKML.h
│ │ ├── OConvMapCacher.h
│ │ ├── deprecated.cpp
│ │ ├── Thread
│ │ │ └── ConvWorkqueue.h
│ │ ├── lic.cpp
│ │ └── CMakeLists.txt
│ └── OCServerApp
│ │ ├── OCServer.rc
│ │ ├── resource.h
│ │ ├── server.ico
│ │ ├── OCServer.aps
│ │ ├── OCServer.vcxproj.user
│ │ ├── main.cpp
│ │ ├── CMakeLists.txt
│ │ └── OCServer.vcxproj.filters
├── Plugins
│ ├── pipe
│ │ ├── LineTable.h
│ │ ├── PipeLine.h
│ │ ├── LineTable.cpp
│ │ ├── NodeExInfo.cpp
│ │ ├── NodeTable.cpp
│ │ ├── PipeLine.cpp
│ │ ├── PipeNode.cpp
│ │ ├── PipeTable.cpp
│ │ ├── PipeModelFactory.h
│ │ ├── PipeArchive.h
│ │ ├── CMakeLists.txt
│ │ ├── PipeArchive.cpp
│ │ ├── NodeExInfo.h
│ │ ├── PipeTable.h
│ │ └── NodeTable.h
│ ├── sqlite
│ │ ├── SQLite.h
│ │ ├── SQLite.cpp
│ │ ├── CMakeLists.txt
│ │ ├── SqliteDatabase.h
│ │ └── SqliteArchive.h
│ ├── shapefile
│ │ ├── ShapeFileDatabase.cpp
│ │ ├── CMakeLists.txt
│ │ ├── ShapeFileArchive.h
│ │ └── ShapeFileDatabase.h
│ ├── ifc
│ │ ├── IFCConverter.h
│ │ ├── CMakeLists.txt
│ │ ├── IFCArchive.cpp
│ │ └── IFCArchive.h
│ ├── nc
│ │ ├── CMakeLists.txt
│ │ └── NCArchive.h
│ ├── functional
│ │ ├── CMakeLists.txt
│ │ ├── FuncArchive.h
│ │ └── FuncArchive.cpp
│ ├── vrl
│ │ └── CMakeLists.txt
│ └── CMakeLists.txt
├── Linux
│ └── OCVolumeConverter
│ │ ├── WatcherManager.h
│ │ ├── Tool.h
│ │ ├── watcher.h
│ │ ├── fetcher.h
│ │ ├── CMakeLists.txt
│ │ ├── WatcherManager.cpp
│ │ └── TaskWorkQueue.h
└── CMakeLists.txt
├── .gitmodules
├── .gitignore
└── README.md
/src/Core/OCLayer/src/IDatabase.cpp:
--------------------------------------------------------------------------------
1 | #include "IDatabase.h"
--------------------------------------------------------------------------------
/src/Core/OCesium/src/BaseWriter.cpp:
--------------------------------------------------------------------------------
1 | #include "BaseWriter.h"
2 |
--------------------------------------------------------------------------------
/src/Application/Weathertoy/ServerThread.cpp:
--------------------------------------------------------------------------------
1 | #include "ServerThread.h"
2 |
--------------------------------------------------------------------------------
/src/Application/OConv/Geography/Kriging.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | void TestKriging();
--------------------------------------------------------------------------------
/src/Core/OCesium/src/FeatureAttributeCallback.cpp:
--------------------------------------------------------------------------------
1 | #include "FeatureAttributeCallback.h"
2 |
--------------------------------------------------------------------------------
/src/Application/OCServerApp/OCServer.rc:
--------------------------------------------------------------------------------
1 | IDI_ICON1 ICON "server.ico"
--------------------------------------------------------------------------------
/src/Core/OCUtility/aes.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCUtility/aes.h
--------------------------------------------------------------------------------
/src/Application/OConv/SqliteOper.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | void createSqlite();
4 |
5 | void openSqlite();
--------------------------------------------------------------------------------
/src/Core/OCModel/LineTable.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCModel/LineTable.h
--------------------------------------------------------------------------------
/src/Core/OCModel/ModelNode.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCModel/ModelNode.h
--------------------------------------------------------------------------------
/src/Core/OCModel/OCModel.aps:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCModel/OCModel.aps
--------------------------------------------------------------------------------
/src/Core/OCModel/OCModel.rc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCModel/OCModel.rc
--------------------------------------------------------------------------------
/src/Core/OCModel/PipeLine.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCModel/PipeLine.h
--------------------------------------------------------------------------------
/src/Core/OCModel/PipeMath.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCModel/PipeMath.h
--------------------------------------------------------------------------------
/src/Plugins/pipe/LineTable.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Plugins/pipe/LineTable.h
--------------------------------------------------------------------------------
/src/Plugins/pipe/PipeLine.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Plugins/pipe/PipeLine.h
--------------------------------------------------------------------------------
/src/Plugins/sqlite/SQLite.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Plugins/sqlite/SQLite.h
--------------------------------------------------------------------------------
/src/Core/OCModel/IModelTable.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCModel/IModelTable.h
--------------------------------------------------------------------------------
/src/Core/OCNetCDF/src/DBZ.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCNetCDF/src/DBZ.cpp
--------------------------------------------------------------------------------
/src/Core/OCNetCDF/src/NcDBZ.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCNetCDF/src/NcDBZ.cpp
--------------------------------------------------------------------------------
/src/Core/OCVolume/src/Swan.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCVolume/src/Swan.cpp
--------------------------------------------------------------------------------
/src/Plugins/pipe/LineTable.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Plugins/pipe/LineTable.cpp
--------------------------------------------------------------------------------
/src/Plugins/pipe/NodeExInfo.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Plugins/pipe/NodeExInfo.cpp
--------------------------------------------------------------------------------
/src/Plugins/pipe/NodeTable.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Plugins/pipe/NodeTable.cpp
--------------------------------------------------------------------------------
/src/Plugins/pipe/PipeLine.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Plugins/pipe/PipeLine.cpp
--------------------------------------------------------------------------------
/src/Plugins/pipe/PipeNode.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Plugins/pipe/PipeNode.cpp
--------------------------------------------------------------------------------
/src/Plugins/pipe/PipeTable.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Plugins/pipe/PipeTable.cpp
--------------------------------------------------------------------------------
/src/Plugins/sqlite/SQLite.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Plugins/sqlite/SQLite.cpp
--------------------------------------------------------------------------------
/src/Core/OCModel/src/ISection.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCModel/src/ISection.cpp
--------------------------------------------------------------------------------
/src/Core/OCModel/src/PipeLine.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCModel/src/PipeLine.cpp
--------------------------------------------------------------------------------
/src/Core/OCModel/src/PipeNode.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCModel/src/PipeNode.cpp
--------------------------------------------------------------------------------
/src/Core/OCNetCDF/CinRadHeader.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCNetCDF/CinRadHeader.h
--------------------------------------------------------------------------------
/src/Core/OCVolume/CinRadHeader.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCVolume/CinRadHeader.h
--------------------------------------------------------------------------------
/src/Application/OConv/ConvCommand.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/OConv/ConvCommand.h
--------------------------------------------------------------------------------
/src/Application/Weathertoy/RCa17512:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/Weathertoy/RCa17512
--------------------------------------------------------------------------------
/src/Application/Weathertoy/main.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/Weathertoy/main.cpp
--------------------------------------------------------------------------------
/src/Core/OCModel/src/IModelTable.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCModel/src/IModelTable.cpp
--------------------------------------------------------------------------------
/src/Core/OCModel/src/LineTable.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCModel/src/LineTable.cpp
--------------------------------------------------------------------------------
/src/Core/OCModel/src/NodeExInfo.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCModel/src/NodeExInfo.cpp
--------------------------------------------------------------------------------
/src/Core/OCModel/src/NodeTable.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCModel/src/NodeTable.cpp
--------------------------------------------------------------------------------
/src/Core/OCModel/src/PipeTable.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCModel/src/PipeTable.cpp
--------------------------------------------------------------------------------
/src/Core/OCModel/src/TableConfig.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCModel/src/TableConfig.cpp
--------------------------------------------------------------------------------
/src/Core/OCModel/src/xmlConfig.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCModel/src/xmlConfig.cpp
--------------------------------------------------------------------------------
/src/Core/OCNetCDF/src/AWXReader.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCNetCDF/src/AWXReader.cpp
--------------------------------------------------------------------------------
/src/Core/OCesium/src/MapProject.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCesium/src/MapProject.cpp
--------------------------------------------------------------------------------
/src/Application/OCServerApp/resource.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/OCServerApp/resource.h
--------------------------------------------------------------------------------
/src/Application/OCServerApp/server.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/OCServerApp/server.ico
--------------------------------------------------------------------------------
/src/Application/Weathertoy/res/app.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/Weathertoy/res/app.ico
--------------------------------------------------------------------------------
/src/Application/Weathertoy/res/app.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/Weathertoy/res/app.png
--------------------------------------------------------------------------------
/src/Application/Weathertoy/resource.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/Weathertoy/resource.h
--------------------------------------------------------------------------------
/src/Application/Weathertoy/resource1.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/Weathertoy/resource1.h
--------------------------------------------------------------------------------
/src/Core/OCModel/src/ModelUtility.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCModel/src/ModelUtility.cpp
--------------------------------------------------------------------------------
/src/Core/OCesium/src/DracoEncoder.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCesium/src/DracoEncoder.cpp
--------------------------------------------------------------------------------
/src/Application/OCServerApp/OCServer.aps:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/OCServerApp/OCServer.aps
--------------------------------------------------------------------------------
/src/Application/OConv/RadarStationKML.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/OConv/RadarStationKML.cpp
--------------------------------------------------------------------------------
/src/Application/Weathertoy/LabViewer.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/Weathertoy/LabViewer.cpp
--------------------------------------------------------------------------------
/src/Application/Weathertoy/ThunderKML.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/Weathertoy/ThunderKML.h
--------------------------------------------------------------------------------
/src/Application/Weathertoy/WeatherLab.rc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/Weathertoy/WeatherLab.rc
--------------------------------------------------------------------------------
/src/Application/Weathertoy/res/earth.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/Weathertoy/res/earth.png
--------------------------------------------------------------------------------
/src/Application/Weathertoy/res/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/Weathertoy/res/logo.png
--------------------------------------------------------------------------------
/src/Application/Weathertoy/res/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/Weathertoy/res/splash.png
--------------------------------------------------------------------------------
/src/Core/OCModel/src/CirclePipeNode2.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCModel/src/CirclePipeNode2.cpp
--------------------------------------------------------------------------------
/src/Core/OCModel/src/CirclePipeNode3.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Core/OCModel/src/CirclePipeNode3.cpp
--------------------------------------------------------------------------------
/src/Application/Weathertoy/res/splash2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/Weathertoy/res/splash2.png
--------------------------------------------------------------------------------
/src/Plugins/shapefile/ShapeFileDatabase.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Plugins/shapefile/ShapeFileDatabase.cpp
--------------------------------------------------------------------------------
/src/Application/OConv/Geography/GDALTool.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/OConv/Geography/GDALTool.cpp
--------------------------------------------------------------------------------
/src/Application/Weathertoy/RadarStationKML.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/Weathertoy/RadarStationKML.h
--------------------------------------------------------------------------------
/src/Application/Weathertoy/WeatherLabMenu.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/Weathertoy/WeatherLabMenu.cpp
--------------------------------------------------------------------------------
/src/Application/Weathertoy/main/cplusplus.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/Weathertoy/main/cplusplus.js
--------------------------------------------------------------------------------
/src/Core/OCUtility/src/Rectangle.cpp:
--------------------------------------------------------------------------------
1 | #include "Rectangle.h"
2 |
3 | namespace OC
4 | {
5 | const CRectangle CRectangle::ZERO(0,0,0,0);
6 | }
--------------------------------------------------------------------------------
/src/Application/Weathertoy/LabWebEngineView.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/Weathertoy/LabWebEngineView.cpp
--------------------------------------------------------------------------------
/src/Application/Weathertoy/RibbonMenuWidget.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/Weathertoy/RibbonMenuWidget.cpp
--------------------------------------------------------------------------------
/src/Application/OConv/Geography/GeographyTool.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rpgpp/osgcesium/HEAD/src/Application/OConv/Geography/GeographyTool.cpp
--------------------------------------------------------------------------------
/src/Core/OCUtility/src/Vector4.cpp:
--------------------------------------------------------------------------------
1 | #include "Vector4.h"
2 | #include "MathUtil.h"
3 |
4 | namespace OC
5 | {
6 | const CVector4 CVector4::ZERO( 0, 0, 0, 0 );
7 | }
8 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "OpenSceneGraph"]
2 | path = OpenSceneGraph
3 | url = https://github.com/openscenegraph/OpenSceneGraph.git
4 | [submodule "osgearth"]
5 | path = osgearth
6 | url = https://github.com/gwaldron/osgearth.git
7 |
--------------------------------------------------------------------------------
/src/Core/OCNetCDF/src/NcVolume.cpp:
--------------------------------------------------------------------------------
1 | #include "NcVolume.h"
2 |
3 | namespace OC
4 | {namespace Volume{
5 |
6 | NcVolume::NcVolume()
7 | {
8 |
9 | }
10 |
11 | NcVolume::~NcVolume()
12 | {
13 |
14 | }
15 |
16 | }}
17 |
--------------------------------------------------------------------------------
/src/Core/OCLayer/src/FeatureNode.cpp:
--------------------------------------------------------------------------------
1 | #include "FeatureNode.h"
2 |
3 | namespace OC
4 | {
5 | CFeatureNode::CFeatureNode(CFeature* owner)
6 | {
7 |
8 | }
9 |
10 | CFeatureNode::~CFeatureNode(void)
11 | {
12 |
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/Application/OConv/Geography/GeographyTool.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "ShpDrawerHelper.h"
3 |
4 | using namespace OC;
5 | class GeographyTool
6 | {
7 | public:
8 | static void json2Mxd(String filename);
9 | };
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/Core/OCLayer/src/FeatureEffect.cpp:
--------------------------------------------------------------------------------
1 | #include "FeatureEffect.h"
2 |
3 | namespace OC
4 | {
5 | IFeatureEffect::IFeatureEffect()
6 | {
7 |
8 | }
9 |
10 | IFeatureEffect::~IFeatureEffect(void)
11 | {
12 |
13 | }
14 | }
15 |
16 |
--------------------------------------------------------------------------------
/src/Core/OCUtility/src/AxisAlignedBox.cpp:
--------------------------------------------------------------------------------
1 | #include "AxisAlignedBox.h"
2 |
3 | namespace OC
4 | {
5 | const CAxisAlignedBox CAxisAlignedBox::BOX_NULL;
6 | const CAxisAlignedBox CAxisAlignedBox::BOX_INFINITE(CAxisAlignedBox::EXTENT_INFINITE);
7 | }
8 |
9 |
--------------------------------------------------------------------------------
/src/Plugins/ifc/IFCConverter.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace osg
4 | {
5 | class Node;
6 | }
7 | class IFCConverter
8 | {
9 | public:
10 | IFCConverter(void);
11 | ~IFCConverter(void);
12 |
13 |
14 | osg::Node* read(const char* file);
15 | };
16 |
17 |
--------------------------------------------------------------------------------
/src/Plugins/nc/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | SET(TARGET_SRC
2 | NCArchive.cpp
3 | )
4 |
5 | SET(TARGET_H
6 | NCArchive.h
7 | )
8 |
9 | SET(TARGET_ADDED_LIBRARIES OCNetCDF OCesium)
10 |
11 | SET(TARGET_EXTERNAL_LIBRARIES
12 | zlib
13 | )
14 |
15 | SETUP_PLUGIN(nc)
16 |
--------------------------------------------------------------------------------
/src/Application/Weathertoy/main/main.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | WeatherLab
5 |
6 |
7 | Simple Tools mode.
8 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/Core/OCModel/src/IModelFactory.cpp:
--------------------------------------------------------------------------------
1 | #include "IModelFactory.h"
2 |
3 | namespace OC
4 | {
5 | namespace Modeling
6 | {
7 | IModelFactory::IModelFactory(void)
8 | {
9 | }
10 |
11 | IModelFactory::~IModelFactory(void)
12 | {
13 |
14 | }
15 | }
16 | }
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/Application/Weathertoy/copyFrom.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | @set root=%~dp0
3 | xcopy %root%\..\..\..\..\apache-tomcat-7.0.99\webapps\WeatherLab\WeatherLab\js\app.js %root%\main /D/Y
4 | xcopy %root%\..\..\..\..\apache-tomcat-7.0.99\webapps\WeatherLab\WeatherLab\js\chunk-vendors.js %root%\main /D/Y
5 | pause
--------------------------------------------------------------------------------
/src/Core/OCServer/OCRegister.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "OCServerDefine.h"
4 | #include "OCUtility/StringConverter.h"
5 |
6 | namespace OC
7 | {
8 | namespace Server
9 | {
10 | class OCRegister
11 | {
12 | public:
13 | static String getRegister(StringVector params);
14 | };
15 | }
16 | }
--------------------------------------------------------------------------------
/src/Core/OCNetCDF/Ncep.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_NCEP_H_
2 | #define _OC_NCEP_H_
3 |
4 | #include "Volume.h"
5 |
6 | namespace OC
7 | {
8 | class Ncep : public CVolume
9 | {
10 | public:
11 | Ncep();
12 | ~Ncep();
13 | osg::Image* readImage(String filename, String var_name);
14 | };
15 | }
16 |
17 | #endif
18 |
--------------------------------------------------------------------------------
/src/Core/OCModel/src/ModelListennerBase.cpp:
--------------------------------------------------------------------------------
1 |
2 | #include "ModelListennerBase.h"
3 |
4 |
5 | namespace OC
6 | {
7 | namespace Modeling
8 | {
9 | ModelListennerBase::ModelListennerBase(void)
10 | {
11 | }
12 |
13 | ModelListennerBase::~ModelListennerBase(void)
14 | {
15 | }
16 | }
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/src/Plugins/functional/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | SET(TARGET_SRC
2 | FuncArchive.cpp
3 | )
4 |
5 | SET(TARGET_H
6 | FuncArchive.h
7 | )
8 |
9 | SET(TARGET_ADDED_LIBRARIES
10 | osg
11 | osgDB
12 | osgEarth
13 | )
14 |
15 | SET(TARGET_EXTERNAL_LIBRARIES
16 | zlib
17 | )
18 |
19 | SETUP_PLUGIN(func)
20 |
--------------------------------------------------------------------------------
/src/Core/OCServer/invokeCommand.h:
--------------------------------------------------------------------------------
1 | #ifndef _INVOKE_COMMAND_H__
2 | #define _INVOKE_COMMAND_H__
3 |
4 | #include "OCServer.h"
5 | #include "OCMain/JsonPackage.h"
6 |
7 | namespace OC
8 | {
9 | namespace Server
10 | {
11 | String invoke(OC::String jsonStr);
12 | }
13 | }
14 |
15 | #endif // !_INVOKE_COMMAND_H__
16 |
17 |
--------------------------------------------------------------------------------
/src/Application/OConv/RadarStationKML.h:
--------------------------------------------------------------------------------
1 | #ifndef _STATION_TO_KML_H__
2 | #define _STATION_TO_KML_H__
3 |
4 | #include "OCMain/stl.h"
5 |
6 | using namespace OC;
7 |
8 | void stationToKML(String filename, String outFilename, bool isStation);
9 | void stationToKML2(String filename);
10 |
11 | #endif // !_STATION_TO_KML_H__
12 |
--------------------------------------------------------------------------------
/src/Core/OCLayer/src/FeatureLayer.cpp:
--------------------------------------------------------------------------------
1 | #include "FeatureLayer.h"
2 | #include "LayerManager.h"
3 |
4 | namespace OC
5 | {
6 | CFeatureLayer::CFeatureLayer(String layerID)
7 | :ILayer(SingletonPtr(LayerManager),layerID)
8 | {
9 |
10 | }
11 |
12 | CFeatureLayer::~CFeatureLayer(void)
13 | {
14 |
15 | }
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/src/Core/OCZip/ZipDefine.h:
--------------------------------------------------------------------------------
1 | #ifndef _OCZIP_DEFINE_H__
2 | #define _OCZIP_DEFINE_H__
3 |
4 | #ifdef _WIN32
5 | #ifdef OCZip_EXPORTS
6 | #define ZEXPORT2 __declspec(dllexport)
7 | #else
8 | #define ZEXPORT2 __declspec(dllimport)
9 | #endif
10 | #else
11 | #define ZEXPORT2
12 | #endif
13 |
14 | #endif // !_oczip_define_h__
15 |
16 |
--------------------------------------------------------------------------------
/src/Application/Weathertoy/Bridge.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | class Bridge : public QObject
6 | {
7 | Q_OBJECT
8 | public:
9 | static Bridge* instance();
10 | ~Bridge();
11 | public slots:
12 | void showMsgBox();
13 | void eval(QString method,QString json);
14 | private:
15 | Bridge();
16 | };
17 |
--------------------------------------------------------------------------------
/src/Core/OCLayer/FeatureLayer.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_FEATURELAYER_H__
2 | #define _OC_FEATURELAYER_H__
3 |
4 | #include "ILayer.h"
5 |
6 | namespace OC
7 | {
8 | class _LayerExport CFeatureLayer : public ILayer
9 | {
10 | public:
11 | CFeatureLayer(String layerID = StringUtil::BLANK);
12 | ~CFeatureLayer(void);
13 | };
14 | }
15 | #endif
16 |
--------------------------------------------------------------------------------
/src/Core/OCMain/src/FunctionalArchive.cpp:
--------------------------------------------------------------------------------
1 | #include "FunctionalArchive.h"
2 |
3 | namespace OC
4 | {
5 | FunctionalArchive::FunctionalArchive()
6 | {
7 |
8 | }
9 |
10 | FunctionalArchive::~FunctionalArchive()
11 | {
12 |
13 | }
14 |
15 | CVector2 FunctionalArchive::gauss2LH(CVector2 coord)
16 | {
17 | return CVector2();
18 | }
19 | }
--------------------------------------------------------------------------------
/src/Core/OCLayer/FeatureEffect.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_IFEATUREEFFECT_CLASS__
2 | #define _OC_IFEATUREEFFECT_CLASS__
3 |
4 | #include "LayerDefine.h"
5 |
6 | namespace OC
7 | {
8 | class _LayerExport IFeatureEffect : public osg::Object
9 | {
10 | public:
11 | IFeatureEffect();
12 | virtual ~IFeatureEffect();
13 | };
14 | }
15 | #endif
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/Core/OCZip/BZip2.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_BZip2_H__
2 |
3 | #include "ZipDefine.h"
4 | #include
5 |
6 | namespace OC
7 | {
8 | class ZEXPORT2 BZip2
9 | {
10 | public:
11 | BZip2() {}
12 | ~BZip2() {}
13 |
14 | static size_t openBZ2(std::string filename, std::ostream& os);
15 | };
16 | }
17 |
18 | #endif // !_OC_BZip2_H__
19 |
20 |
--------------------------------------------------------------------------------
/src/Core/OCModel/src/ModelArchive.cpp:
--------------------------------------------------------------------------------
1 | #include "ModelArchive.h"
2 |
3 | namespace OC
4 | {namespace Modeling{
5 |
6 | ModelArchive::ModelArchive()
7 | {
8 |
9 | }
10 |
11 | ModelArchive::~ModelArchive()
12 | {
13 |
14 | }
15 |
16 | IModelTable* ModelArchive::getModelTable(ModelDataManager* owner)
17 | {
18 | return NULL;
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/src/Plugins/shapefile/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | SET(TARGET_SRC
2 | ShapeFileArchive.cpp
3 | ShapeFileDatabase.cpp
4 | )
5 |
6 | SET(TARGET_H
7 | ShapeFileArchive.h
8 | ShapeFileDatabase.h
9 | )
10 |
11 | SET(TARGET_ADDED_LIBRARIES OCModel osgEarth)
12 |
13 | SET(TARGET_EXTERNAL_LIBRARIES
14 | gdal_i
15 | )
16 |
17 | SETUP_PLUGIN(shapefile)
18 |
--------------------------------------------------------------------------------
/src/Core/OCLayer/LayerManager.h:
--------------------------------------------------------------------------------
1 | #ifndef __LAYER_MANAGER__H_
2 | #define __LAYER_MANAGER__H_
3 |
4 | #include "ILayer.h"
5 | #include "OCMain/Singleton.h"
6 |
7 | namespace OC
8 | {
9 | class _LayerExport LayerManager : public CSingleton
10 | {
11 | public:
12 | LayerManager(void);
13 | ~LayerManager(void);
14 | };
15 | }
16 |
17 | #endif
18 |
--------------------------------------------------------------------------------
/src/Core/OCVolume/FyAwx.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_FyAwx_H__
2 | #define _OC_FyAwx_H__
3 |
4 | #include "VolumeObject.h"
5 |
6 | namespace OC
7 | {
8 | class FyAwx : public Volume::CVolumeObject
9 | {
10 | public:
11 | FyAwx() {}
12 | ~FyAwx() {}
13 | virtual bool convert(std::string filename);
14 | };
15 | }
16 |
17 | #endif // !_OC_FyAwx_H__
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/Plugins/sqlite/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | SET(TARGET_SRC
2 | SqliteArchive.cpp
3 | SqliteDatabase.cpp
4 | Sqlite.cpp
5 | )
6 |
7 | SET(TARGET_H
8 | SqliteArchive.h
9 | SqliteDatabase.h
10 | Sqlite.h
11 | )
12 |
13 | SET(TARGET_ADDED_LIBRARIES OCLayer)
14 |
15 | SET(TARGET_EXTERNAL_LIBRARIES
16 | sqlite3
17 | )
18 |
19 | SETUP_PLUGIN(sqlite)
20 |
--------------------------------------------------------------------------------
/src/Core/OCLayer/FeatureNode.h:
--------------------------------------------------------------------------------
1 | #ifndef _FEATURE_NODE_CLASS_H__
2 | #define _FEATURE_NODE_CLASS_H__
3 |
4 | #include "SceneNode.h"
5 | #include "FeatureRecord.h"
6 |
7 | namespace OC
8 | {
9 | class _LayerExport CFeatureNode : public CSceneNode
10 | {
11 | public:
12 | CFeatureNode(CFeature* owner);
13 | virtual ~CFeatureNode(void);
14 | };
15 | }
16 |
17 | #endif
18 |
--------------------------------------------------------------------------------
/src/Core/OCModel/src/PipeLineInfo.cpp:
--------------------------------------------------------------------------------
1 |
2 | #include "PipeLineInfo.h"
3 |
4 | namespace OC
5 | {
6 | namespace Modeling
7 | {
8 | CPipeLineInfo::CPipeLineInfo(void)
9 | {
10 | }
11 |
12 |
13 | CPipeLineInfo::~CPipeLineInfo(void)
14 | {
15 | }
16 |
17 | LinePtrList& CPipeLineInfo::getExtraLine()
18 | {
19 | return mLineList;
20 | }
21 | }
22 | }
23 |
24 |
--------------------------------------------------------------------------------
/src/Core/OCVolume/CinRadC.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_CINRADC_H__
2 | #include "VolumeObject.h"
3 |
4 | namespace OC
5 | {
6 | namespace Volume
7 | {
8 | class CinRadC : public CVolumeObject
9 | {
10 | public:
11 | CinRadC();
12 | ~CinRadC();
13 | };
14 | }
15 | }
16 |
17 |
18 | #endif // !_OC_CINRADC_H__
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/src/Core/OCNetCDF/Reflective.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_REFLECTIVE_H_
2 | #define _OC_REFLECTIVE_H_
3 |
4 | #include "Volume.h"
5 | #include "Humidity.h"
6 |
7 | namespace OC
8 | {
9 | class Reflective : public CVolume
10 | {
11 | public:
12 | Reflective();
13 | ~Reflective();
14 |
15 | osg::Image* readImage(String filename, String var_name);
16 |
17 | };
18 | }
19 |
20 |
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/src/Core/OCZip/PakoZip.h:
--------------------------------------------------------------------------------
1 | #ifndef _PAKO_ZIP_H__
2 | #define _PAKO_ZIP_H__
3 |
4 | #include "ZipDefine.h"
5 | #include
6 |
7 | namespace OC
8 | {
9 | class ZEXPORT2 PakoZip
10 | {
11 | public:
12 | PakoZip();
13 | ~PakoZip();
14 | static bool compress(std::ostream& fout, const std::string& src);
15 | };
16 | }
17 | #endif
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/src/Application/OConv/Geography/GDALTool.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_GDALTOOL_H__
2 |
3 | #include "OCMain/Environment.h"
4 |
5 | namespace OC
6 | {
7 | class GDALTool
8 | {
9 | public:
10 | GDALTool();
11 | ~GDALTool();
12 | void testIDW(String filename);
13 | void testContour(String inputDEM,String outputSHP,double dfContourInterval);
14 | };
15 | }
16 |
17 | #endif // !_OC_GDALTOOL_H__
18 |
19 |
20 |
--------------------------------------------------------------------------------
/src/Core/OCHttpClient/HttpClientDefine.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_HTTP_Client_DEFINE_H_
2 | #define _OC_HTTP_Client_DEFINE_H_
3 |
4 | #if defined(_MSC_VER)
5 | #ifndef OCHttpClient_EXPORTS
6 | #define _HttpClientExport __declspec(dllimport)
7 | #else
8 | #define _HttpClientExport __declspec(dllexport)
9 | #endif
10 | #else
11 | #define _HttpClientExport
12 | #endif
13 |
14 | #include "OCMain/stl.h"
15 |
16 | #endif
--------------------------------------------------------------------------------
/src/Core/OCNetCDF/AWXReader.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "NetCDFDefine.h"
4 | #include "OCVolume/VolumeObject.h"
5 |
6 | namespace OC
7 | {
8 | class AWXReader : public Volume::CVolumeObject
9 | {
10 | public:
11 | AWXReader() {}
12 | ~AWXReader() {}
13 | virtual bool convert(std::string filename);
14 |
15 | osg::Image* readImage(String filename, String var_name);
16 | };
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/src/Core/OCNetCDF/NcZT.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_Volume_NcZT_H__
2 | #define _OC_Volume_NcZT_H__
3 |
4 | #include "NcVolume.h"
5 |
6 | namespace OC
7 | {
8 | namespace Volume
9 | {
10 | class NcZT : public NcVolume
11 | {
12 | public:
13 | NcZT(String varname);
14 | ~NcZT();
15 | virtual bool convert(std::string filename);
16 | private:
17 | String mVarname;
18 | };
19 | }
20 | }
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/src/Application/OConv/OConvMapCacher.h:
--------------------------------------------------------------------------------
1 | #include "OCMain/osg.h"
2 | #include "OCMain/osgearth.h"
3 | #include "OCMain/Environment.h"
4 | #include "OCMain/ConfigManager.h"
5 |
6 | namespace OC
7 | {
8 | class OConvMapCacher
9 | {
10 | public:
11 | OConvMapCacher();
12 | ~OConvMapCacher();
13 | void requestCes(int x, int y, int z, int level);
14 | void requestTDT(String map, int x, int y, int z, int level);
15 | };
16 | }
--------------------------------------------------------------------------------
/src/Core/OCNetCDF/NcZQ.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_Volume_NcZQ_H__
2 | #define _OC_Volume_NcZQ_H__
3 |
4 | #include "NcVolume.h"
5 |
6 | namespace OC
7 | {
8 | namespace Volume
9 | {
10 | class NcZQ : public NcVolume
11 | {
12 | public:
13 | NcZQ(String varname);
14 | ~NcZQ();
15 |
16 | virtual bool convert(std::string filename);
17 | private:
18 | String mVarname;
19 | };
20 | }
21 | }
22 |
23 | #endif
24 |
25 |
26 |
--------------------------------------------------------------------------------
/src/Core/OCModel/src/ShelfModelFactory.cpp:
--------------------------------------------------------------------------------
1 | #include "ShelfModelFactory.h"
2 | #include "IModelData.h"
3 |
4 | namespace OC
5 | {
6 | namespace Modeling
7 | {
8 | ShelfModelFactory::ShelfModelFactory(void)
9 | {
10 | }
11 |
12 |
13 | ShelfModelFactory::~ShelfModelFactory(void)
14 | {
15 | }
16 |
17 | bool ShelfModelFactory::build(IModelData* data)
18 | {
19 | return data->build();
20 | }
21 | }
22 | }
23 |
24 |
--------------------------------------------------------------------------------
/src/Core/OCModel/PipeLineInfo.h:
--------------------------------------------------------------------------------
1 | #ifndef _PIPE_LINE_INFO_CLASS_H_
2 | #define _PIPE_LINE_INFO_CLASS_H_
3 |
4 | #include "PipeLine.h"
5 |
6 | namespace OC
7 | {
8 | namespace Modeling
9 | {
10 | class CPipeLineInfo
11 | {
12 | public:
13 | CPipeLineInfo(void);
14 | ~CPipeLineInfo(void);
15 |
16 | LinePtrList& getExtraLine();
17 | private:
18 | LinePtrList mLineList;
19 | };
20 | }
21 | }
22 |
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/src/Core/OCUtility/src/Vector2.cpp:
--------------------------------------------------------------------------------
1 | #include "Vector2.h"
2 | #include "MathUtil.h"
3 |
4 | namespace OC
5 | {
6 | const CVector2 CVector2::ZERO( 0, 0);
7 |
8 | const CVector2 CVector2::UNIT_X( 1, 0);
9 | const CVector2 CVector2::UNIT_Y( 0, 1);
10 | const CVector2 CVector2::NEGATIVE_UNIT_X( -1, 0);
11 | const CVector2 CVector2::NEGATIVE_UNIT_Y( 0, -1);
12 | const CVector2 CVector2::UNIT_SCALE(1, 1);
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/src/Core/OCModel/ShelfModelFactory.h:
--------------------------------------------------------------------------------
1 | #ifndef _SHELF_MODEL_FACTORY_H_
2 | #define _SHELF_MODEL_FACTORY_H_
3 |
4 | #include "IModelFactory.h"
5 |
6 | namespace OC
7 | {
8 | namespace Modeling
9 | {
10 | class ShelfModelFactory : public IModelFactory
11 | {
12 | public:
13 | ShelfModelFactory(void);
14 | ~ShelfModelFactory(void);
15 | virtual bool build(IModelData* data);
16 | };
17 | }
18 | }
19 |
20 |
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/src/Core/OCModel/IModelFactory.h:
--------------------------------------------------------------------------------
1 | #ifndef _IMODEL_FACTORY_CLASS_H_
2 | #define _IMODEL_FACTORY_CLASS_H_
3 |
4 | #include "ModelDefine.h"
5 |
6 | namespace OC
7 | {
8 | namespace Modeling
9 | {
10 | class _ModelExport IModelFactory
11 | {
12 | public:
13 | IModelFactory(void);
14 | virtual ~IModelFactory(void);
15 |
16 | virtual bool build(IModelData* data){return false;}
17 | };
18 | }
19 | }
20 |
21 |
22 |
23 | #endif
24 |
25 |
--------------------------------------------------------------------------------
/src/Core/OCModel/ModelListennerBase.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "ModelDefine.h"
3 | #include "OCMain/Environment.h"
4 |
5 | namespace OC
6 | {
7 | namespace Modeling
8 | {
9 | class _ModelExport ModelListennerBase
10 | {
11 | public:
12 | ModelListennerBase(void);
13 | ~ModelListennerBase(void);
14 | public:
15 | virtual void setProcessFocus(int n,int num){};
16 | virtual void setEditText(String text){};
17 | };
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/Core/OCHttpServer/HttpServerDefine.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_HTTP_SERVER_DEFINE_H_
2 | #define _OC_HTTP_SERVER_DEFINE_H_
3 |
4 | #if defined(_MSC_VER)
5 | #ifndef OCHttpServer_EXPORTS
6 | #define _HttpServerExport __declspec(dllimport)
7 | #else
8 | #define _HttpServerExport __declspec(dllexport)
9 | #endif
10 | #else
11 | #define _HttpServerExport
12 | #endif
13 |
14 | #include "OCMain/stl.h"
15 | #define OCLogStream Singleton(OC::LogManager).stream()
16 |
17 | #endif
--------------------------------------------------------------------------------
/src/Core/OCUtility/md5.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_MD5_H_
2 | #define _OC_MD5_H_
3 |
4 | #define _CRT_SECURE_NO_WARNINGS
5 |
6 | #include
7 | #include
8 |
9 | std::string md5(std::string dat);
10 | std::string md5(const void* dat, size_t len);
11 | std::string md5file(const char* filename);
12 | std::string md5file(std::FILE* file);
13 | std::string md5sum6(std::string dat);
14 | std::string md5sum6(const void* dat, size_t len);
15 |
16 | #endif // end of MD5_H
--------------------------------------------------------------------------------
/src/Linux/OCVolumeConverter/WatcherManager.h:
--------------------------------------------------------------------------------
1 | #ifndef _WATCHER_MANAGER_H__
2 | #define _WATCHER_MANAGER_H__
3 |
4 | #include "watcher.h"
5 |
6 | using namespace OC;
7 |
8 | class WatcherManager
9 | {
10 | public:
11 | WatcherManager();
12 | ~WatcherManager();
13 | void add(String path);
14 | void remove(String path);
15 |
16 | typedef std::map > WatcherMap;
17 | WatcherMap mWatcherMap;
18 | };
19 |
20 |
21 | #endif
--------------------------------------------------------------------------------
/src/Core/OCVolume/Swan.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_VOLUME_SWAN_H__
2 | #define _OC_VOLUME_SWAN_H__
3 |
4 | #include "VolumeObject.h"
5 |
6 | namespace OC
7 | {
8 | namespace Volume
9 | {
10 | class CSwan : public CVolumeObject
11 | {
12 | public:
13 | CSwan();
14 | ~CSwan();
15 | bool convert(std::stringstream& sstream);
16 | };
17 | }
18 | }
19 |
20 | #endif // !_OC_VOLUME_SWAN_H__
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/src/Core/OCesium/KtxCompress.h:
--------------------------------------------------------------------------------
1 | #ifndef _KTX_COMPRESS_H__
2 | #define _KTX_COMPRESS_H__
3 |
4 | #include "CesiumDefine.h"
5 |
6 | namespace OC
7 | {
8 | namespace Cesium
9 | {
10 | class _CesiumExport KtxCompress
11 | {
12 | public:
13 | KtxCompress();
14 | ~KtxCompress();
15 |
16 | static osg::UByteArray* writeImage(osg::Image* image);
17 | };
18 | }
19 | }//namespace
20 |
21 | #endif
--------------------------------------------------------------------------------
/src/Core/OCVolume/Volume.h:
--------------------------------------------------------------------------------
1 | #ifndef _OCVOLUME_H__
2 | #define _OCVOLUME_H__
3 |
4 | #include "VolumeObject.h"
5 |
6 | namespace OC
7 | {
8 | namespace Volume
9 | {
10 | class _VoloumeExport CVolume
11 | {
12 | public:
13 | CVolume();
14 | ~CVolume();
15 |
16 | static CVolumeObject* convert(String filename, String varname = StringUtil::BLANK);
17 | };
18 | }
19 | }
20 |
21 | #endif // !_OCVOLUME_H__
22 |
--------------------------------------------------------------------------------
/src/Linux/OCVolumeConverter/Tool.h:
--------------------------------------------------------------------------------
1 | #ifndef _OCVOLUMCONVERTER_TOOL_H__
2 | #define _OCVOLUMCONVERTER_TOOL_H__
3 |
4 | #include "TaskWorkQueue.h"
5 | using namespace OC;
6 |
7 | int convertVolume(String filename,String outfilename,String varname);
8 | int handleFile(OC::String filename,OC::TaskWorkQueue::RequestType type);
9 | int clearCacher(time_t today);
10 | void test();
11 |
12 | time_t tickTheDayBefore(time_t daybefore = 0);
13 | String parseTime(time_t t);
14 |
15 | #endif
--------------------------------------------------------------------------------
/src/Linux/OCVolumeConverter/watcher.h:
--------------------------------------------------------------------------------
1 | #ifndef _WATCHER_H__
2 | #define _WATCHER_H__
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include "OCMain/osg.h"
9 | #include "OCMain/Environment.h"
10 |
11 | class watcher : public osg::Referenced
12 | {
13 | public:
14 | watcher();
15 | ~watcher();
16 | int createTask(std::string path);
17 | int fd;
18 | int wd;
19 | std::string _path;
20 | };
21 |
22 | #endif
--------------------------------------------------------------------------------
/src/Core/OCNetCDF/src/Ncep.cpp:
--------------------------------------------------------------------------------
1 | #include "Ncep.h"
2 |
3 |
4 | using namespace OC;
5 |
6 | #define GFS_URL "https://nomads.ncep.noaa.gov/cgi-bin/filter_{DIR}_${RES}.pl?file={DIR}.t${GFS_TIME}z.pgrb2.${RES}.f000&${LEVEL}&subregion=&${BBOX}&dir=%2F{DIR}.${GFS_DATE}%2F${GFS_TIME}%2Fatmos"
7 |
8 | Ncep::Ncep()
9 | {
10 |
11 | }
12 |
13 | Ncep::~Ncep()
14 | {
15 |
16 | }
17 |
18 | osg::Image* Ncep::readImage(String filename, String var_name)
19 | {
20 | return NULL;
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/Application/Weathertoy/ServerThread.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include "OCHttpServer/HttpServer.h"
5 |
6 | class ServerThread : public QThread
7 | {
8 | public:
9 | ServerThread(int port, OC::String path = ""):_port(port), _path(path){}
10 | OC::HttpServer& server(){return mServer;}
11 | private:
12 | void run()
13 | {
14 | mServer.init(_port);
15 | }
16 |
17 | OC::HttpServer mServer;
18 | int _port;
19 | OC::String _path;
20 | };
--------------------------------------------------------------------------------
/src/Core/OCLayer/src/LayerManager.cpp:
--------------------------------------------------------------------------------
1 | #include "LayerManager.h"
2 |
3 | namespace OC
4 | {
5 |
6 | #if SingletonConfig == SingletonNormal
7 | template<>LayerManager* CSingleton::msSingleton = NULL;
8 | #elif SingletonConfig == SingletonProcess
9 | template<>std::map CSingleton::msPidton;
10 | #endif
11 |
12 | LayerManager::LayerManager(void)
13 | {
14 |
15 | }
16 |
17 | LayerManager::~LayerManager(void)
18 | {
19 |
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/Core/OCNetCDF/DBZ.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_VOLUME_DBZ_H_
2 | #define _OC_VOLUME_DBZ_H_
3 |
4 | #include "Volume.h"
5 | #include "Humidity.h"
6 |
7 | namespace OC
8 | {
9 | class CDBZ : public CVolume
10 | {
11 | public:
12 | CDBZ();
13 | ~CDBZ();
14 |
15 | osg::Image* readImage(String filename, String var_name);
16 | osg::Image* readImage2(String filename, String var_name);
17 | void readDBZ2Cesium(String filename, String var_name);
18 |
19 | };
20 | }
21 |
22 |
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/src/Core/OCLayer/src/Feature.cpp:
--------------------------------------------------------------------------------
1 | #include "Feature.h"
2 | #include "FeatureLayer.h"
3 |
4 | namespace OC
5 | {
6 | String CFeature::ClassGUID = "OC::Feature";
7 |
8 | CFeature::CFeature()
9 | {
10 |
11 | }
12 |
13 | CFeature::~CFeature(void)
14 | {
15 |
16 | }
17 |
18 | void CFeature::prepareImpl(void)
19 | {
20 | }
21 |
22 | void CFeature::loadImpl(void)
23 | {
24 | load();
25 | }
26 |
27 | bool CFeature::load()
28 | {
29 | return true;
30 | }
31 |
32 | }//namespace
33 |
--------------------------------------------------------------------------------
/src/Core/OCMain/json/json.h:
--------------------------------------------------------------------------------
1 | // Copyright 2007-2010 Baptiste Lepilleur
2 | // Distributed under MIT license, or public domain if desired and
3 | // recognized in your jurisdiction.
4 | // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
5 |
6 | #ifndef JSON_JSON_H_INCLUDED
7 | #define JSON_JSON_H_INCLUDED
8 |
9 | #include "autolink.h"
10 | #include "value.h"
11 | #include "reader.h"
12 | #include "writer.h"
13 | #include "features.h"
14 |
15 | #endif // JSON_JSON_H_INCLUDED
16 |
--------------------------------------------------------------------------------
/src/Core/OCNetCDF/NcDBZ.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_Nc_DBZ_H__
2 | #define _OC_Nc_DBZ_H__
3 |
4 | #include "NcVolume.h"
5 |
6 | namespace OC
7 | {
8 | namespace Volume
9 | {
10 | class NcDBZ : public NcVolume
11 | {
12 | public:
13 | NcDBZ(String varname);
14 | ~NcDBZ();
15 | virtual bool convert(std::string filename);
16 |
17 | String mVarname;
18 | float fill_value = -31.328f;
19 | float missing_value = -31.328f;
20 | float unit = 1000.0f;
21 | };
22 | }
23 | }
24 |
25 |
26 | #endif
--------------------------------------------------------------------------------
/src/Core/OCesium/WebpEncoder.h:
--------------------------------------------------------------------------------
1 | #ifndef _WEBP_ENCODER_H__
2 | #define _WEBP_ENCODER_H__
3 |
4 | #include "CesiumDefine.h"
5 |
6 | namespace OC
7 | {
8 | namespace Cesium
9 | {
10 | class _CesiumExport WebpEncoder
11 | {
12 | public:
13 | WebpEncoder();
14 | ~WebpEncoder();
15 |
16 | static osgDB::ReaderWriter::WriteResult writeImage(const osg::Image& img, std::ostream& fout);
17 | };
18 | }
19 | }
20 |
21 | #endif
22 |
23 |
--------------------------------------------------------------------------------
/src/Core/OCesium/X3DM.h:
--------------------------------------------------------------------------------
1 | #ifndef OC_X3DM_WRITER_H
2 | #define OC_X3DM_WRITER_H
3 |
4 | #include "CesiumDefine.h"
5 |
6 | namespace OC
7 | {
8 | namespace Cesium
9 | {
10 | class _CesiumExport X3DMWriter
11 | {
12 | public:
13 | static bool writePNTS(const String& location,
14 | const String& featureTableJSON,
15 | const String& featureTableBody,
16 | const String& batchTableJSON,
17 | const String& batchTableBody);
18 | };
19 | }
20 | }
21 |
22 | #endif // OSGEARTH_B3DM_WRITER_H
--------------------------------------------------------------------------------
/src/Plugins/vrl/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | SET(TARGET_SRC
2 | ConvertToVRML.cpp
3 | ReaderWriterVRML2.cpp
4 | Primitives.cpp
5 | IndexedFaceSet.cpp
6 | )
7 |
8 | SET(TARGET_H
9 | ConvertToVRML.h
10 | ReaderWriterVRML2.h
11 | )
12 |
13 | SET(TARGET_EXTERNAL_LIBRARIES
14 | openvrml
15 | )
16 |
17 | ADD_DEFINITIONS(-DOPENVRML_USE_DLL)
18 |
19 | INCLUDE_DIRECTORIES(${WORKINGPATH}/3rdParty/etc/boost)
20 | LINK_DIRECTORIES(${WORKINGPATH}/3rdParty/etc/boost/lib)
21 |
22 | SETUP_PLUGIN(vrl)
23 |
--------------------------------------------------------------------------------
/src/Application/Weathertoy/weatherlab.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | main/main.html
4 | res/splash.png
5 | res/logo.png
6 | res/earth.png
7 | res/app.png
8 | main/cplusplus.js
9 | main/qwebchannel.js
10 | res/splash2.png
11 | main/app.js
12 | res/menu.xml
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/Core/OCMain/OCPluginTool.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_PluginTool_H__
2 | #define _OC_PluginTool_H__
3 |
4 | #include "FunctionalArchive.h"
5 | #include "Singleton.h"
6 |
7 | namespace OC
8 | {
9 | class _MainExport OCPluginTool : public CSingleton
10 | {
11 | public:
12 | OCPluginTool();
13 | ~OCPluginTool();
14 | FunctionalArchive* getFunctional();
15 | private:
16 | osg::ref_ptr mFunctionalArchive;
17 | };
18 |
19 | }
20 |
21 | #endif // !_OC_PluginTool_H__
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/Plugins/ifc/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | SET(TARGET_SRC
2 | IFCArchive.cpp
3 | IFCConverter.cpp
4 | )
5 |
6 | SET(TARGET_H
7 | IFCArchive.h
8 | IFCConverter.h
9 | )
10 |
11 | SET(TARGET_ADDED_LIBRARIES IfcPlusPlus carve osgText)
12 |
13 | INCLUDE_DIRECTORIES(${WORKINGPATH}/3rdParty/etc)
14 | INCLUDE_DIRECTORIES(${WORKINGPATH}/3rdParty/etc/boost)
15 | INCLUDE_DIRECTORIES(${WORKINGPATH}/3rdParty/etc/ifcplusplus)
16 | INCLUDE_DIRECTORIES(${WORKINGPATH}/3rdParty/etc/ifcplusplus/carve/include)
17 |
18 | SETUP_PLUGIN(ifc)
19 |
--------------------------------------------------------------------------------
/src/Application/Weathertoy/resources.qrc:
--------------------------------------------------------------------------------
1 |
2 |
3 | main/main.html
4 | res/splash.png
5 | res/logo.png
6 | res/earth.png
7 | res/app.png
8 | main/cplusplus.js
9 | main/qwebchannel.js
10 | res/splash2.png
11 | main/app.js
12 | main/WeatherEarth.js
13 | res/menu.xml
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/Core/OCServer/VolumeManager.h:
--------------------------------------------------------------------------------
1 | #ifndef _VOLUMEMANAGER_H__
2 | #define _VOLUMEMANAGER_H__
3 |
4 | #include "OCServerDefine.h"
5 | #include "OCMain/DataStream.h"
6 | #include "OCMain/osg.h"
7 |
8 | namespace OC
9 | {
10 | namespace Server
11 | {
12 | class VolumeManager
13 | {
14 | public:
15 | static String getVolumeFile(const String name, const String varname, const String ext, const String dir, const String version = "1.0");
16 |
17 | };
18 | }
19 | }
20 |
21 | #endif
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/Core/OCesium/TextureOptimize.h:
--------------------------------------------------------------------------------
1 | #ifndef _Cesium_TEXTURE_OPTIMIZE_H__
2 | #define _Cesium_TEXTURE_OPTIMIZE_H__
3 |
4 | #include "BatchGeode.h"
5 |
6 | namespace OC
7 | {
8 | namespace Cesium
9 | {
10 | class TextureOptimize
11 | {
12 | public:
13 | static void merge_clamp(BatchGeodeList& batchGeodeList, BatchGeodeMap& mBatchGeodeMap);
14 | static void merge_repeat(BatchGeodeList& batchGeodeList, BatchGeodeMap& mBatchGeodeMap);
15 | static void scaleDimansion(osg::Image* image);
16 | };
17 | }
18 | }
19 | #endif
20 |
21 |
--------------------------------------------------------------------------------
/src/Core/OCVolume/Vtk.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_VOLUME_VTK_H__
2 | #define _OC_VOLUME_VTK_H__
3 |
4 | #include "VolumeObject.h"
5 |
6 | namespace OC
7 | {
8 | namespace Volume
9 | {
10 | class _VoloumeExport Vtk : public CVolumeObject
11 | {
12 | public:
13 | Vtk(String varname = "xyz");
14 | ~Vtk();
15 | bool convert(std::string filename);
16 | bool mNeedStatistic;
17 | bool mUseXYZ;
18 | bool mConvertGauss;
19 | float mFillValue;
20 | String mVarname;
21 | };
22 | }
23 | }
24 |
25 | #endif // !_OC_VOLUME_VTK_H__
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/Plugins/pipe/PipeModelFactory.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_Model_PipeModelFactory_H__
2 | #define _OC_Model_PipeModelFactory_H__
3 |
4 | #include "OCModel/IModelFactory.h"
5 |
6 | namespace OC
7 | {
8 | namespace Modeling
9 | {
10 | class PipeModelFactory : public IModelFactory
11 | {
12 | public:
13 | PipeModelFactory(void){}
14 | ~PipeModelFactory(void){}
15 |
16 | virtual bool build(IModelData* data);
17 | public:
18 | bool createNode(PipeNode* pNode);
19 | bool createLine(PipeLine* pLine);
20 | };
21 | }
22 | }
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/src/Core/OCModel/PipeModelFactory.h:
--------------------------------------------------------------------------------
1 | #ifndef _PIPE_MODEL_FACTORY_CLASS_H__
2 | #define _PIPE_MODEL_FACTORY_CLASS_H__
3 |
4 | #include "IModelFactory.h"
5 |
6 | namespace OC
7 | {
8 | namespace Modeling
9 | {
10 | class _ModelExport PipeModelFactory : public IModelFactory
11 | {
12 | public:
13 | PipeModelFactory(void){}
14 | ~PipeModelFactory(void){}
15 |
16 | virtual bool build(IModelData* data);
17 | public:
18 | bool createNode(PipeNode* pNode);
19 | bool createLine(PipeLine* pLine);
20 | };
21 | }
22 | }
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/src/Core/OCNetCDF/npy/npyTemprature.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "NcVolume.h"
4 | #include "OCMain/DataStream.h"
5 | #include "OCVolume/VolumeObject.h"
6 |
7 | namespace OC
8 | {
9 | namespace Volume
10 | {
11 | class npyTemprature : public Volume::CVolumeObject
12 | {
13 | public:
14 | npyTemprature(String varname);
15 | ~npyTemprature();
16 | virtual bool convert(std::string filename);
17 | private:
18 | String mVarname;
19 | };
20 | }
21 | }
22 |
23 |
24 |
--------------------------------------------------------------------------------
/src/Core/OCZip/iostd.h:
--------------------------------------------------------------------------------
1 | /* iowin32.h -- IO base function header for compress/uncompress .zip
2 | files using zlib + zip or unzip API
3 | This IO API version uses the Win32 API (for Microsoft Windows)
4 |
5 | Version 1.01e, February 12th, 2005
6 |
7 | Copyright (C) 1998-2005 Gilles Vollant
8 | */
9 |
10 | #if _WIN32
11 | #include
12 | #endif
13 |
14 |
15 | #ifdef __cplusplus
16 | extern "C" {
17 | #endif
18 |
19 | void fill_std_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
20 |
21 | #ifdef __cplusplus
22 | }
23 | #endif
24 |
25 |
--------------------------------------------------------------------------------
/src/Core/OCLayer/OCResource.h:
--------------------------------------------------------------------------------
1 | #ifndef _GLOBAL_ARCHIVE_H_
2 | #define _GLOBAL_ARCHIVE_H_
3 |
4 | #include "OCMain/Singleton.h"
5 | #include "IArchive.h"
6 | #include "LayerDefine.h"
7 |
8 | namespace OC
9 | {
10 | class _LayerExport OCResource : public CSingleton
11 | {
12 | public:
13 | OCResource(void);
14 | ~OCResource(void);
15 |
16 | IArchive* getArchive();
17 |
18 | osg::Node* readNode(String file);
19 | osg::Image* readImage(String file);
20 | private:
21 | osg::ref_ptr mArchive;
22 | };
23 | }
24 |
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/src/Core/OCZip/iowin32.h:
--------------------------------------------------------------------------------
1 | /* iowin32.h -- IO base function header for compress/uncompress .zip
2 | files using zlib + zip or unzip API
3 | This IO API version uses the Win32 API (for Microsoft Windows)
4 |
5 | Version 1.01e, February 12th, 2005
6 |
7 | Copyright (C) 1998-2005 Gilles Vollant
8 | */
9 |
10 | #if _WIN32
11 | #include
12 |
13 |
14 | #ifdef __cplusplus
15 | extern "C" {
16 | #endif
17 |
18 | void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
19 |
20 | #ifdef __cplusplus
21 | }
22 | #endif
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/src/Core/OCesium/FeatureAttributeCallback.h:
--------------------------------------------------------------------------------
1 | #ifndef _FEATURE_ATTRIBUTE_CALLBACK_H__
2 | #define _FEATURE_ATTRIBUTE_CALLBACK_H__
3 |
4 | #include "gltfConfig.h"
5 |
6 | namespace OC
7 | {
8 | namespace Cesium
9 | {
10 | class _CesiumExport FeatureAttributeCallback : public osg::Referenced
11 | {
12 | public:
13 | FeatureAttributeCallback(){}
14 | virtual ~FeatureAttributeCallback() {}
15 | virtual void onSetAttirubte(String name,FeatureBatchTable* table){}
16 | };
17 | }
18 | }
19 |
20 | #endif
--------------------------------------------------------------------------------
/src/Application/Weathertoy/RibbonMenuWidget.h:
--------------------------------------------------------------------------------
1 | #ifndef TESTRIBBON_H
2 | #define TESTRIBBON_H
3 |
4 | #include
5 | #include
6 |
7 | class LabViewer;
8 | class CRibbonMenuWidget : public QWidget
9 | {
10 | Q_OBJECT
11 | public:
12 | CRibbonMenuWidget(LabViewer *createor, QWidget *parent = 0, Qt::WindowFlags flags = 0);
13 | ~CRibbonMenuWidget();
14 | public:
15 | private:
16 | void loadFileXml();
17 | void loadToolXml();
18 | private:
19 | QString mApplicationDir;
20 | LabViewer* mCreator;
21 | };
22 |
23 | #endif // TESTRIBBON_H
24 |
--------------------------------------------------------------------------------
/src/Core/OCesium/glTFOptimize.h:
--------------------------------------------------------------------------------
1 | #ifndef _GLTF_OPTIMIZE_H__
2 | #define _GLTF_OPTIMIZE_H__
3 |
4 | #include "CesiumDefine.h"
5 |
6 | namespace OC
7 | {
8 | namespace Cesium
9 | {
10 | class _CesiumExport glTFVisitor : public osg::NodeVisitor
11 | {
12 | public:
13 | glTFVisitor();
14 | ~glTFVisitor();
15 |
16 | void apply(osg::StateSet& stateset);
17 | void apply(osg::Geode& geode);
18 | void apply(osg::Node& node);
19 |
20 | bool removeStateset;
21 | osgEarth::optional offset;
22 | };
23 | }
24 | }
25 |
26 |
27 | #endif
28 |
--------------------------------------------------------------------------------
/src/Plugins/functional/FuncArchive.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_FuncArchive_H__
2 | #define _OC_FuncArchive_H__
3 |
4 | #include "OCMain/FunctionalArchive.h"
5 |
6 | using namespace OC;
7 |
8 | class FuncArchive : public FunctionalArchive
9 | {
10 | public:
11 | FuncArchive(void);
12 | ~FuncArchive(void);
13 |
14 | CVector2 gauss2LH(CVector2 coord);
15 | String invoke(StringVector params);
16 | osgDB::ReaderWriter::ReadResult openArchive(const String& fileName, osgDB::ReaderWriter::ArchiveStatus status, unsigned int dep, const osgDB::Options* options) const;
17 | };
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/src/Plugins/pipe/PipeArchive.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_FuncArchive_H__
2 | #define _OC_FuncArchive_H__
3 |
4 | #include "OCModel/ModelArchive.h"
5 |
6 | using namespace OC;
7 | using namespace OC::Modeling;
8 |
9 | class PipeArchive : public ModelArchive
10 | {
11 | public:
12 | PipeArchive(void);
13 | ~PipeArchive(void);
14 | virtual IModelTable* getModelTable(ModelDataManager* owner);
15 |
16 | osgDB::ReaderWriter::ReadResult openArchive(const String& fileName, osgDB::ReaderWriter::ArchiveStatus status, unsigned int dep, const osgDB::Options* options) const;
17 | };
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/src/Core/OCMain/json/version.h:
--------------------------------------------------------------------------------
1 | // DO NOT EDIT. This file (and "version") is generated by CMake.
2 | // Run CMake configure step to update it.
3 | #ifndef JSON_VERSION_H_INCLUDED
4 | # define JSON_VERSION_H_INCLUDED
5 |
6 | # define JSONCPP_VERSION_STRING "0.10.7"
7 | # define JSONCPP_VERSION_MAJOR 0
8 | # define JSONCPP_VERSION_MINOR 10
9 | # define JSONCPP_VERSION_PATCH 7
10 | # define JSONCPP_VERSION_QUALIFIER
11 | # define JSONCPP_VERSION_HEXA ((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | (JSONCPP_VERSION_PATCH << 8))
12 |
13 | #endif // JSON_VERSION_H_INCLUDED
14 |
--------------------------------------------------------------------------------
/src/Core/OCZip/Makefile:
--------------------------------------------------------------------------------
1 | CC=cc
2 | CFLAGS=-O -I../..
3 |
4 | UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a
5 | ZIP_OBJS = minizip.o zip.o ioapi.o ../../libz.a
6 |
7 | .c.o:
8 | $(CC) -c $(CFLAGS) $*.c
9 |
10 | all: miniunz minizip
11 |
12 | miniunz: $(UNZ_OBJS)
13 | $(CC) $(CFLAGS) -o $@ $(UNZ_OBJS)
14 |
15 | minizip: $(ZIP_OBJS)
16 | $(CC) $(CFLAGS) -o $@ $(ZIP_OBJS)
17 |
18 | test: miniunz minizip
19 | ./minizip test readme.txt
20 | ./miniunz -l test.zip
21 | mv readme.txt readme.old
22 | ./miniunz test.zip
23 |
24 | clean:
25 | /bin/rm -f *.o *~ minizip miniunz
26 |
--------------------------------------------------------------------------------
/src/Core/OCNetCDF/NcepWind.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_NcepWind_H__
2 | #define _OC_NcepWind_H__
3 |
4 | #include "OCVolume/VolumeObject.h"
5 |
6 | namespace OC
7 | {
8 | class NcepWind : public Volume::CVolumeObject
9 | {
10 | public:
11 | NcepWind();
12 | ~NcepWind();
13 | virtual bool convert(String filename);
14 |
15 | bool flipX = false;
16 | float interval = 0.0;
17 | String nameU;
18 | String nameV;
19 | String levelX;
20 | String levelY;
21 | String levelZ;
22 | private:
23 | void readGrib(String filename);
24 | };
25 | }
26 |
27 | #endif // !_OC_NcepWind_H__
28 |
--------------------------------------------------------------------------------
/src/Core/OCesium/CmptWriter.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_CMPT_WRITER_H
2 | #define _OC_CMPT_WRITER_H
3 |
4 | #include "CesiumDefine.h"
5 | #include "FeatureBatchTable.h"
6 | #include "BaseWriter.h"
7 |
8 | namespace OC
9 | {
10 | namespace Cesium
11 | {
12 | class _CesiumExport CmptWriter : public osg::Referenced
13 | {
14 | public:
15 | CmptWriter();
16 | ~CmptWriter();
17 |
18 | void push(BaseWriter* object);
19 | void writeCmpt(String filename);
20 | uint32 getLength();
21 | private:
22 | std::vector > mTiles;
23 | };
24 | }
25 | }
26 |
27 | #endif
--------------------------------------------------------------------------------
/src/Linux/OCVolumeConverter/fetcher.h:
--------------------------------------------------------------------------------
1 | #ifndef _FETCHER_H__
2 | #define _FETCHER_H__
3 |
4 | #include "TaskWorkQueue.h"
5 |
6 | using namespace OC;
7 |
8 | class CFetcher : public osg::Referenced
9 | {
10 | public:
11 | CFetcher(String dir);
12 | ~CFetcher();
13 | void start();
14 | void stop();
15 | private:
16 | void clear();
17 | bool mRunning;
18 | long monitor_tick;
19 | float mInterval;
20 | String mMonitorDir;
21 | String mMonitorDay;
22 | CORE_STATIC_MUTEX(mutex)
23 | static time_t mStaticLastClearTick;
24 | };
25 |
26 |
27 |
28 | #endif // !_FETCHER_H__
29 |
--------------------------------------------------------------------------------
/src/Core/OCLayer/BaseNodeMask.h:
--------------------------------------------------------------------------------
1 | #ifndef _CORE_NODE_MASK_H__
2 | #define _CORE_NODE_MASK_H__
3 |
4 |
5 | #define SkyBoxNodeMask 1
6 | #define SceneNodeMask 1<<1
7 | #define FeatureNodeMask 1<<2
8 | #define VectorNodeMask 1<<3
9 | #define LabelNodeMask 1<<4
10 | #define PipeFeatureNodeMask 1<<5
11 | #define ReceivesShadowTraversalMask 1<<6
12 | #define CastsShadowTraversalMask 1<<7
13 | #define TerrainNodeMask 1<<8
14 | #define DraggerIntersectMask 1<<9
15 | #define UIMask 1<<10
16 | #define PassMask 1<<11
17 |
18 | #endif // _CORE_NODE_MASK_H__
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Prerequisites
2 | *.d
3 |
4 | # Compiled Object files
5 | *.slo
6 | *.lo
7 | *.o
8 | *.obj
9 |
10 | # Precompiled Headers
11 | *.gch
12 | *.pch
13 |
14 | # Compiled Dynamic libraries
15 | *.so
16 | *.dylib
17 | *.dll
18 | *.pdb
19 | *.exp
20 |
21 | # Fortran module files
22 | *.mod
23 | *.smod
24 |
25 | # Compiled Static libraries
26 | *.lai
27 | *.la
28 | *.a
29 | *.lib
30 |
31 | # Executables
32 | *.exe
33 | *.out
34 | *.app
35 |
36 | /3rdParty
37 | /3rdParty/
38 | /lib/
39 | /bin/temp/
40 | /bin/resources/
41 | /bin/translations/
42 | /bin/platforms/
43 | /build/
44 | /Package/
45 |
--------------------------------------------------------------------------------
/src/Plugins/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | PROJECT(OSG_PLUGINS_MASTER)
2 |
3 | SET(TARGET_DEFAULT_PREFIX "osgdb_")
4 | SET(TARGET_DEFAULT_LABEL_PREFIX "Plugins")
5 | SET(TARGET_COMMON_LIBRARIES
6 | OpenThreads
7 | osg
8 | osgDB
9 | osgUtil
10 | OCZip
11 | OCUtility
12 | OCMain
13 | OCLayer
14 | )
15 |
16 | INCLUDE_DIRECTORIES(${WORKINGPATH}/src/Core)
17 |
18 | IF(WIN32)
19 | ADD_SUBDIRECTORY(nc)
20 | ADD_SUBDIRECTORY(ifc)
21 | ADD_SUBDIRECTORY(vrl)
22 | ADD_SUBDIRECTORY(shapefile)
23 | ADD_SUBDIRECTORY(functional)
24 | ADD_SUBDIRECTORY(sqlite)
25 | #ADD_SUBDIRECTORY(pipe)
26 | ENDIF(WIN32)
27 |
--------------------------------------------------------------------------------
/src/Core/OCesium/GLTFObject.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_GLTF_OBJCET_H_
2 | #define _OC_GLTF_OBJCET_H_
3 |
4 | #include "BatchGroup.h"
5 |
6 | namespace OC
7 | {
8 | namespace Cesium
9 | {
10 | class _CesiumExport GLTFObject : public BatchGroup
11 | {
12 | public:
13 | GLTFObject(FeatureBatchTable* featureBatchTable = NULL);
14 |
15 | bool writeToFile(String filename, bool isBinary);
16 | bool writeToStream(std::ostream& output, bool isBinary);
17 | uint32 bytesLength();
18 | protected:
19 | ~GLTFObject();
20 | private:
21 | uint32 mBytesLength = 0;
22 | };
23 | }
24 | }
25 |
26 |
27 | #endif
28 |
--------------------------------------------------------------------------------
/src/Linux/OCVolumeConverter/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
2 |
3 | SET(LIB_NAME OCVolumeConverter)
4 |
5 | SET(TARGET_H
6 | fetcher.h
7 | watcher.h
8 | WatcherManager.h
9 | TaskWorkQueue.h
10 | Tool.h
11 | )
12 |
13 | SET(TARGET_SRC
14 | fetcher.cpp
15 | watcher.cpp
16 | WatcherManager.cpp
17 | TaskWorkQueue.cpp
18 | Tool.cpp
19 | main.cpp
20 | )
21 |
22 | SET(TARGET_COMMON_LIBRARIES
23 | OpenThreads
24 | osg
25 | osgDB
26 | OCVolume
27 | OCUtility
28 | OCMain
29 | )
30 |
31 | SETUP_APPLICATION(${LIB_NAME})
32 |
--------------------------------------------------------------------------------
/src/Plugins/pipe/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | SET(TARGET_SRC
2 | PipeArchive.cpp
3 | PipeTable.cpp
4 | LineTable.cpp
5 | NodeTable.cpp
6 | PipeLine.cpp
7 | PipeNode.cpp
8 | NodeExInfo.cpp
9 | PipeModelFactory.cpp
10 | )
11 |
12 | SET(TARGET_H
13 | PipeArchive.h
14 | PipeTable.h
15 | LineTable.h
16 | NodeTable.h
17 | PipeLine.h
18 | PipeNode.h
19 | NodeExInfo.h
20 | PipeModelFactory.h
21 | )
22 |
23 | SET(TARGET_ADDED_LIBRARIES
24 | osg
25 | osgDB
26 | OCModel
27 | )
28 |
29 | SET(TARGET_EXTERNAL_LIBRARIES
30 | zlib
31 | )
32 |
33 | SETUP_PLUGIN(pipe)
34 |
--------------------------------------------------------------------------------
/src/Core/OCesium/DracoEncoder.h:
--------------------------------------------------------------------------------
1 | #ifndef _DRACO_ENCODER_H__
2 | #define _DRACO_ENCODER_H__
3 |
4 | #include "CesiumDefine.h"
5 |
6 | namespace OC
7 | {
8 | namespace Cesium
9 | {
10 | class DracoEncoder
11 | {
12 | public:
13 | DracoEncoder();
14 | ~DracoEncoder();
15 |
16 | bool encode(BatchGeode* batchGeode);
17 |
18 | DracoAttributeMap mAttributeMap;
19 | const char* data();
20 | size_t size();
21 | private:
22 | draco::EncoderBuffer* buffer;
23 | };
24 | }
25 | }
26 |
27 | #endif
28 |
29 |
--------------------------------------------------------------------------------
/src/Core/OCHttpServer/HttpServer.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_HTTP_SERVER_H_
2 | #define _OC_HTTP_SERVER_H_
3 |
4 | #include "HttpServerDefine.h"
5 |
6 | namespace OC
7 | {
8 | namespace Server {
9 | class COCServer;
10 | }
11 | class _HttpServerExport HttpServer
12 | {
13 | public:
14 | HttpServer();
15 | ~HttpServer();
16 | bool isRunning();
17 | void quit();
18 | void init(int port = 8125);
19 | void registerALocation(std::string uriPrefix, std::string path);
20 |
21 | private:
22 | Server::COCServer* mOCServer;
23 | };
24 | }
25 |
26 | #endif // !1
27 |
--------------------------------------------------------------------------------
/src/Core/OCMain/JsonHelper.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_JSONHELPER_H__
2 | #define _OC_JSONHELPER_H__
3 |
4 | #include "JsonPackage.h"
5 | #include "Common.h"
6 |
7 | namespace OC
8 | {
9 | class _MainExport JsonHelper
10 | {
11 | public:
12 | JsonHelper(void);
13 | ~JsonHelper(void);
14 |
15 | static std::vector > parseStringPairList(String jsonStr);
16 | static NameValuePairList parseNameValuePairList(String jsonStr);
17 | static StringMap parseStyleString(String styleStr);
18 | static osg::MixinVector parseGeometryJson(String jsonStr);
19 | };
20 |
21 | }
22 |
23 |
24 | #endif
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/src/Plugins/ifc/IFCArchive.cpp:
--------------------------------------------------------------------------------
1 | #include "IFCArchive.h"
2 | #include "IFCConverter.h"
3 |
4 | IFCArchive::IFCArchive(void)
5 | {
6 | supportsExtension("ifc","OC ifc data format");
7 | }
8 |
9 |
10 | IFCArchive::~IFCArchive(void)
11 | {
12 | }
13 |
14 | osgDB::ReaderWriter::ReadResult IFCArchive::readNode(std::istream& /*fin*/,const Options*) const
15 | {
16 | return nullptr;
17 | }
18 |
19 | osgDB::ReaderWriter::ReadResult IFCArchive::readNode(const String& fileName, const osgDB::ReaderWriter::Options*) const
20 | {
21 | IFCConverter converter;
22 | return converter.read(fileName.c_str());
23 | }
24 |
25 | REGISTER_OSGPLUGIN(ifc, IFCArchive)
26 |
--------------------------------------------------------------------------------
/src/Core/OCModel/ModelDataQueryCallback.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_MODEL_QUERY_H__
2 | #define _OC_MODEL_QUERY_H__
3 |
4 | #include "ModelDefine.h"
5 |
6 | namespace OC
7 | {
8 | namespace Modeling
9 | {
10 | class _ModelExport ModelDataQueryCallback : public CQueryCallback
11 | {
12 | public:
13 | enum DataType
14 | {
15 | Type_Line,
16 | Type_Node,
17 | Type_Mold
18 | };
19 | ModelDataQueryCallback(IModelTable* table,DataType type);
20 | ~ModelDataQueryCallback();
21 | virtual bool onQuery(TemplateRecord* record);
22 | private:
23 | IModelTable* mTable;
24 | DataType mType;
25 | };
26 | }
27 | }
28 |
29 | #endif
30 |
31 |
--------------------------------------------------------------------------------
/src/Core/OCMain/Environment.h:
--------------------------------------------------------------------------------
1 | #ifndef __APPLICATION_ENVIRONMENT__H_
2 | #define __APPLICATION_ENVIRONMENT__H_
3 |
4 | #include "BaseDefine.h"
5 |
6 | namespace OC
7 | {
8 | class _MainExport Environment
9 | {
10 | public:
11 | Environment(uint32 magic = 0);
12 | ~Environment(void);
13 |
14 | static Environment* getSingletonPtr();
15 | static Environment& getSingleton();
16 |
17 | void setAppDir(String dir);
18 | String getAppDir();
19 | String getLogPath();
20 | String getTempDir();
21 | private:
22 | String mApplicationDir;
23 | LogManager* mLogManager;
24 | OCPluginTool* mOCPluginTool;
25 | };
26 | }
27 |
28 |
29 | #endif
30 |
--------------------------------------------------------------------------------
/src/Core/OCNetCDF/NetCDFDefine.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_NETCDF_DEFINE_H_
2 | #define _OC_NETCDF_DEFINE_H_
3 |
4 | #if defined(_MSC_VER)
5 | #ifndef OCNetCDF_EXPORTS
6 | #define _NetCDFExport __declspec(dllimport)
7 | #else
8 | #define _NetCDFExport __declspec(dllexport)
9 | #endif
10 | #else
11 | #define _NetCDFExport
12 | #endif
13 |
14 | #include "OCMain/osg.h"
15 | #include "OCUtility/StringUtil.h"
16 | #include "OCUtility/Rectangle.h"
17 | #include "OCUtility/StringConverter.h"
18 |
19 | namespace OC
20 | {
21 | class CNetCDFReader;
22 |
23 | #define NcCheck(e) if(NC_NOERR != e) {printf("Error: %s\n", nc_strerror(e)); return false;}
24 |
25 | }
26 |
27 | #endif //
28 |
--------------------------------------------------------------------------------
/src/Core/OCesium/gltfAttributeCallback.h:
--------------------------------------------------------------------------------
1 | #ifndef _GLTF_ATTRIBUTE_CALLBACK_H__
2 | #define _GLTF_ATTRIBUTE_CALLBACK_H__
3 |
4 | #include "glTFOptimize.h"
5 | #include "CesiumTool.h"
6 |
7 | namespace OC
8 | {
9 | namespace Cesium
10 | {
11 | class gltfAttributeCallback : public Cesium::FeatureAttributeCallback
12 | {
13 | public:
14 | gltfAttributeCallback();
15 | ~gltfAttributeCallback();
16 |
17 | void readFile(String filename);
18 | osg::ref_ptr header;
19 | std::map > mAttributeMap;
20 | virtual void onSetAttirubte(String name, Cesium::FeatureBatchTable* table);
21 | };
22 | }
23 | }
24 |
25 | #endif
--------------------------------------------------------------------------------
/src/Application/OCServerApp/OCServer.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | --port 8082
5 | WindowsLocalDebugger
6 |
7 |
8 | --port 8082
9 | WindowsLocalDebugger
10 |
11 |
--------------------------------------------------------------------------------
/src/Plugins/ifc/IFCArchive.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_IFC_ARCHIVE_CLASS_H__
2 | #define _OC_IFC_ARCHIVE_CLASS_H__
3 |
4 | #include "OCLayer/IArchive.h"
5 |
6 | using namespace OC;
7 |
8 | class IFCArchive :
9 | public IArchive
10 | {
11 | public:
12 | IFCArchive(void);
13 | ~IFCArchive(void);
14 | virtual const char* libraryName() const { return "OCPlugins IFC"; }
15 | virtual const char* className() const { return "IFCArchive"; }
16 | virtual osgDB::ReaderWriter::ReadResult readNode(std::istream& /*fin*/,const Options* =NULL) const;
17 | virtual osgDB::ReaderWriter::ReadResult readNode(const String& /*fileName*/, const osgDB::ReaderWriter::Options* =NULL) const;
18 | };
19 |
20 | #endif
21 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # osgcesium
2 |
3 | Tool for convert osg model (osgb obj... and etc format) to 3dtiles(b3dm ctmp pnts i3dm)
4 |
5 | key word:
6 | draco
7 | ktx2
8 | webp
9 |
10 |
11 | Main Code in
12 |
13 | src/Core/OCesium
14 | src/Application/OConv
15 |
16 | useage:
17 |
18 | OConv.exe {\"function\":\"obj23dtiles\",\"output\":\"K:/\",\"filename\":\"I:/Dev/Assets/3dtiles/jf/ServerRoom.obj\",\"offset\":\"116.39123 39.90691 0 \",\"localOffset\":false,\"writeGltf\":false,\"AtlasImageSize\":4096,\"MaxTextureSize\":256,\"sectionSize\":0,\"enableDracoCompress\":true,\"disableLight\":true,\"enableWebpCompress\":false,\"mergeRepeatTexture\":true,\"quantizationbits\":16,\"forceDoubleSide\":false}
19 |
--------------------------------------------------------------------------------
/src/Core/OCNetCDF/NcUV.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_VOLUME_UV_H_
2 | #define _OC_VOLUME_UV_H_
3 |
4 | #include "OCUtility/Vector3i.h"
5 | #include "NcVolume.h"
6 |
7 | namespace OC
8 | {
9 | namespace Volume
10 | {
11 | class NcUV : public NcVolume
12 | {
13 | public:
14 | NcUV();
15 | ~NcUV();
16 | String nameU;
17 | String nameV;
18 | String levelX;
19 | String levelY;
20 | String levelZ;
21 | bool flipX = false;
22 | float interval = 0.0;
23 | inline CVector3i getVarDim(String name);
24 | inline bool isValid();
25 | inline int getLevel();
26 | virtual bool convert(std::string filename);
27 | int _ncid;
28 | };
29 | }
30 | }
31 |
32 | #endif
33 |
34 |
--------------------------------------------------------------------------------
/src/Core/OCVolume/CinRad.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_CinRad_H__
2 | #define _OC_CinRad_H__
3 |
4 | #include "VolumeObject.h"
5 | #include "CinRadHeader.h"
6 |
7 | namespace OC
8 | {
9 | namespace Volume
10 | {
11 | class CinRad : public CVolumeObject
12 | {
13 | public:
14 | CinRad() {}
15 | virtual ~CinRad() {}
16 | virtual osg::Image* generateVolumeImage();
17 |
18 | protected:
19 | typedef std::vector > ImageList;
20 | int mRadius;
21 | float mUnit;
22 | ImageList mImageList;
23 | ImageList mFloatImageList;
24 | std::vector mPitchList;
25 | };
26 | }
27 | }
28 |
29 | #endif // !_OC_CinRad_H__
30 |
31 |
--------------------------------------------------------------------------------
/src/Core/OCNetCDF/NetCDFReader.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_NETCDFREADER_H_
2 | #define _OC_NETCDFREADER_H_
3 |
4 | #include "NetCDFDefine.h"
5 | #include "OCVolume/VolumeObject.h"
6 |
7 | namespace OC
8 | {
9 | class _NetCDFExport CNetCDFReader
10 | {
11 | public:
12 | CNetCDFReader();
13 | ~CNetCDFReader();
14 |
15 | osg::Image* readNpy(String filename, String var);
16 | osg::Image* readAWX(String filename, String var);
17 | osg::Image* readGRB2(String filename, String var);
18 | osg::Image* readNC(String filename, String var);
19 | osg::Image* readSW(String filename, String var);
20 | Volume::CVolumeObject* readVolume(String filename, String var);
21 | };
22 | }
23 |
24 |
25 | #endif // !1
26 |
27 |
--------------------------------------------------------------------------------
/src/Core/OCHttpClient/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
2 | INCLUDE_DIRECTORIES(${WORKINGPATH}/3rdParty/include)
3 |
4 | SET(LIB_NAME OCHttpClient)
5 |
6 | SET(TARGET_H
7 | HttpClientDefine.h
8 | HttpClient.h
9 | HTTPRequest.h
10 | HTTPResponse.h
11 | )
12 |
13 | SET(TARGET_SRC
14 | src/HttpClient.cpp
15 | src/HTTPRequest.cpp
16 | src/HTTPResponse.cpp
17 | )
18 |
19 | SET(TARGET_LIBRARIES
20 | OpenThreads
21 | osg
22 | osgDB
23 | osgEarth
24 | OCUtility
25 | OCMain
26 | OCServer
27 | )
28 |
29 | SET(TARGET_EXTERNAL_LIBRARIES
30 | curl
31 | )
32 |
33 | SETUP_LIBRARY(${LIB_NAME})
34 | ADD_DEPENDENCIES(OCHttpServer ${LIB_NAME})
35 |
--------------------------------------------------------------------------------
/src/Core/OCMain/BaseEnum.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_ENUM_H__
2 | #define _OC_ENUM_H__
3 |
4 | enum ArchiveDataFrom
5 | {
6 | DATA_FROM_DB,
7 | DATA_FROM_NET,
8 | DATA_FROM_REFPATH,
9 | DATA_FROM_RAW_DATABASE
10 | };
11 |
12 | enum RegionEventState
13 | {
14 | STANDBY,
15 | INVOKED
16 | };
17 |
18 | enum MovableFinishState
19 | {
20 | Stay_Feature_Position,
21 | Stay_Start_Point,
22 | Stay_End_Point,
23 | Wait_For_Next_Point,
24 | Disappear
25 | };
26 |
27 | enum EffectState
28 | {
29 | STATE_EMPTY,
30 | STATE_HIGHLIGHT,
31 | STATE_TEXTURE_MOVE,
32 | STATE_SCALE_ANIMATION,
33 | STATE_TRANSPARENT
34 | };
35 |
36 | enum FetureMode
37 | {
38 | NormalFeature,
39 | RoleFeature,
40 | EffectFeature
41 | };
42 |
43 | #endif
--------------------------------------------------------------------------------
/src/Core/OCServer/OCServerDefine.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_SERVER__DEFINE_H_
2 | #define _OC_SERVER__DEFINE_H_
3 |
4 | #if defined(_MSC_VER)
5 | #ifndef OCServer_EXPORTS
6 | #define _OCServerExport __declspec(dllimport)
7 | #else
8 | #define _OCServerExport __declspec(dllexport)
9 | #endif
10 | #else
11 | #define _OCServerExport
12 | #endif
13 |
14 | #include "OCMain/Environment.h"
15 | #include "OCMain/ConfigManager.h"
16 |
17 | namespace OC
18 | {
19 | namespace Server
20 | {
21 | class COCServer;
22 | class OCRegister;
23 |
24 | #define ConfigNameDataDir "data_dir"
25 | #define ConfigNameCacheDir "cache_dir"
26 | #define _getServerDir(name) Singleton(ConfigManager).getStringValue(name)
27 |
28 | }
29 | }
30 |
31 | #endif
--------------------------------------------------------------------------------
/src/Core/OCMain/src/OCPluginTool.cpp:
--------------------------------------------------------------------------------
1 | #include "OCPluginTool.h"
2 |
3 | namespace OC
4 | {
5 | #if SingletonConfig == SingletonNormal
6 | template<>OCPluginTool* CSingleton::msSingleton = NULL;
7 | #elif SingletonConfig == SingletonProcess
8 | template<>std::map CSingleton::msPidton;
9 | #endif
10 |
11 | OCPluginTool::OCPluginTool()
12 | {
13 | mFunctionalArchive = static_cast(osgDB::Registry::instance()->openArchive(".func", osgDB::ReaderWriter::READ, 0, NULL).takeArchive());
14 | }
15 |
16 | OCPluginTool::~OCPluginTool()
17 | {
18 |
19 | }
20 |
21 | FunctionalArchive* OCPluginTool::getFunctional()
22 | {
23 | return mFunctionalArchive.get();
24 | }
25 | }
--------------------------------------------------------------------------------
/src/Core/OCLayer/IRecord.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_IRECORD_H__
2 | #define _OC_IRECORD_H__
3 |
4 | #include "LayerDefine.h"
5 |
6 | namespace OC
7 | {
8 | class _LayerExport IRecord : public osg::Referenced
9 | {
10 | public:
11 | IRecord();
12 | ~IRecord();
13 |
14 | virtual long getID();
15 | virtual void setID(long id);
16 |
17 | virtual String getFeatureName();
18 | virtual void setFeatureName(String name);
19 |
20 | virtual IFeature* getOwnerFeature();
21 | virtual void setOwnerFeature(IFeature* feature);
22 |
23 | virtual void update();
24 |
25 | void dirty(bool _dirty = true);
26 |
27 | protected:
28 | long mID;
29 | bool mDirty;
30 | String mFeatureName;
31 | IFeature* mOwner;
32 | };
33 | }
34 |
35 | #endif
36 |
--------------------------------------------------------------------------------
/src/Core/OCZip/src/BZip2.cpp:
--------------------------------------------------------------------------------
1 | #include "BZip2.h"
2 | #include "./bz2/bzlib.h"
3 |
4 | namespace OC
5 | {
6 | size_t BZip2::openBZ2(std::string filename, std::ostream& os)
7 | {
8 | size_t size = 0;
9 | BZFILE* bzfile = BZ2_bzopen(filename.c_str(), "r");
10 | if (bzfile)
11 | {
12 | #define BUFF_SIZE 10240
13 | char buffer[BUFF_SIZE];
14 | int read = BZ2_bzread(bzfile, buffer, BUFF_SIZE);
15 | while (read > 0)
16 | {
17 | size += read;
18 | os.write(buffer, read);
19 | read = BZ2_bzread(bzfile, buffer, BUFF_SIZE);
20 | }
21 | BZ2_bzclose(bzfile);
22 | }
23 | return size;
24 | }
25 |
26 | }
--------------------------------------------------------------------------------
/src/Application/OCServerApp/main.cpp:
--------------------------------------------------------------------------------
1 | // OCServer.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
2 | //
3 |
4 | #include "OCMain/ConfigManager.h"
5 | #include "OCHttpServer/HttpServer.h"
6 |
7 | using namespace OC;
8 |
9 | HttpServer* server = NULL;
10 |
11 | BOOL WINAPI HandlerRoutine(DWORD dwCtrlType) {
12 |
13 | if (CTRL_CLOSE_EVENT == dwCtrlType) {
14 | CORE_SAFE_DELETE(server);
15 | }
16 |
17 | return TRUE;
18 | }
19 |
20 | int main(int argc, char** argv)
21 | {
22 | SetConsoleCtrlHandler(HandlerRoutine,true);
23 | osg::ArgumentParser arguments(&argc, argv);
24 | int port = 8125;
25 | while (arguments.read("--port", port)) {}
26 | server = new HttpServer;
27 | server->init(port);
28 | return 0;
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/src/Plugins/sqlite/SqliteDatabase.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "OCLayer/IDatabase.h"
4 | #include "SQLite.h"
5 |
6 | namespace OC
7 | {
8 | class SqliteDatabase:public IDatabase
9 | {
10 | public:
11 | SqliteDatabase();
12 | ~SqliteDatabase();
13 | virtual bool create(String url,String user = StringUtil::BLANK,String psw = StringUtil::BLANK);
14 | virtual bool connect(String url);
15 | virtual bool createTable(String name, OCHeaderInfo* headinfo);
16 | virtual bool existTable(String name);
17 | virtual TemplateRecordList query(String table, OCHeaderInfo* headinfo, CQueryInfo* filter = NULL);
18 | virtual bool insert(String table, TemplateRecord* record);
19 | private:
20 | SQLite mSqlite;
21 | bool mIsSpatialite = false;
22 | };
23 | }
--------------------------------------------------------------------------------
/src/Application/OCServerApp/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
2 | INCLUDE_DIRECTORIES(${WORKINGPATH}/OsgCesium/Core)
3 | INCLUDE_DIRECTORIES(${WORKINGPATH}/OsgCesium/Core/OCThread)
4 | INCLUDE_DIRECTORIES(${WORKINGPATH}/3rdParty/x64/include)
5 | INCLUDE_DIRECTORIES(${WORKINGPATH}/OpenSceneGraph/include)
6 | INCLUDE_DIRECTORIES(${WORKINGPATH}/OSGEarth/src)
7 |
8 | SET(LIB_NAME OCServerApp)
9 |
10 | SET(TARGET_H
11 |
12 | )
13 |
14 | SET(TARGET_SRC
15 | OCServer.rc
16 | main.cpp
17 | )
18 |
19 | SET(TARGET_COMMON_LIBRARIES
20 | OpenThreads
21 | osg
22 | osgDB
23 | osgEarth
24 | OCUtility
25 | OCHttpServer
26 | )
27 |
28 | SET(TARGET_EXTERNAL_LIBRARIES
29 | zlib
30 | )
31 |
32 | SETUP_APPLICATION(${LIB_NAME})
33 |
--------------------------------------------------------------------------------
/src/Plugins/pipe/PipeArchive.cpp:
--------------------------------------------------------------------------------
1 | #include "PipeArchive.h"
2 | #include "PipeTable.h"
3 |
4 | PipeArchive::PipeArchive(void)
5 | {
6 | supportsExtension("pipe", "OC pipe modeling");
7 | }
8 |
9 | PipeArchive::~PipeArchive(void)
10 | {
11 |
12 | }
13 |
14 | IModelTable* PipeArchive::getModelTable(ModelDataManager* owner)
15 | {
16 | return new PipeTable(owner);
17 | }
18 |
19 | osgDB::ReaderWriter::ReadResult PipeArchive::openArchive(const String& fileName, osgDB::ReaderWriter::ArchiveStatus status, unsigned int dep, const osgDB::Options* options) const
20 | {
21 | String ext = osgDB::getLowerCaseFileExtension(fileName);
22 | if (!acceptsExtension(ext)) return ReadResult::FILE_NOT_HANDLED;
23 | return new PipeArchive;
24 | }
25 |
26 | REGISTER_OSGPLUGIN(func, PipeArchive)
27 |
--------------------------------------------------------------------------------
/src/Plugins/sqlite/SqliteArchive.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "OCLayer/IArchive.h"
4 |
5 | namespace OC
6 | {
7 | class SqliteArchive : public IArchive
8 | {
9 | public:
10 | SqliteArchive();
11 | ~SqliteArchive();
12 | virtual const char* libraryName() const { return "OCPlugins Sqlite"; }
13 | virtual const char* className() const { return "OC::SqliteArchive"; }
14 | virtual bool open(String filename,ArchiveStatus status,const osgDB::ReaderWriter::Options* options);
15 | virtual osgDB::ReaderWriter::ReadResult openArchive(const String& /*fileName*/,ArchiveStatus, unsigned int =4096, const osgDB::Options* =NULL) const;
16 | virtual osgDB::ReaderWriter::ReadResult readNode(const String& /*fileName*/, const osgDB::ReaderWriter::Options* = NULL) const;
17 | };
18 | }
--------------------------------------------------------------------------------
/src/Core/OCServer/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
2 | INCLUDE_DIRECTORIES(${WORKINGPATH}/OpenSceneGraph/include)
3 | INCLUDE_DIRECTORIES(${WORKINGPATH}/OSGEarth/src)
4 |
5 | SET(LIB_NAME OCServer)
6 |
7 | SET(TARGET_H
8 | invokeCommand.h
9 | OCRegister.h
10 | OCServer.h
11 | OCServerDefine.h
12 | VolumeManager.h
13 |
14 | )
15 |
16 | SET(TARGET_SRC
17 | src/invokeCommand.cpp
18 | src/OCRegister.cpp
19 | src/OCServer.cpp
20 | src/VolumeManager.cpp
21 | )
22 |
23 | SET(TARGET_LIBRARIES
24 | OpenThreads
25 | osg
26 | osgDB
27 | osgEarth
28 | OCUtility
29 | OCLayer
30 | OCMain
31 | OCVolume
32 | )
33 |
34 | ADD_DEPENDENCIES(OCHttpServer ${LIB_NAME})
35 |
36 | SETUP_LIBRARY(${LIB_NAME})
37 |
--------------------------------------------------------------------------------
/src/Core/OCesium/src/image.cc:
--------------------------------------------------------------------------------
1 | // -*- tab-width: 4; -*-
2 | // vi: set sw=2 ts=4 expandtab:
3 |
4 | // Copyright 2010-2020 The Khronos Group Inc.
5 | // SPDX-License-Identifier: Apache-2.0
6 |
7 | //!
8 | //! @internal
9 | //! @~English
10 | //! @file image.cc
11 | //!
12 | //! @brief Image creation functions
13 | //!
14 |
15 | #include
16 | #include
17 | #include
18 |
19 | #include "image.hpp"
20 |
21 | //const std::vector Image::CreateFunctions = {
22 | // CreateFromNPBM,
23 | // CreateFromPNG,
24 | // CreateFromJPG
25 | //};
26 |
27 | Image* Image::CreateFromFile(const _tstring& name,
28 | bool transformOETF, bool rescaleTo8Bit) {
29 | return nullptr; // Keep compilers happy.
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/src/Core/OCMain/json/autolink.h:
--------------------------------------------------------------------------------
1 | // Copyright 2007-2010 Baptiste Lepilleur
2 | // Distributed under MIT license, or public domain if desired and
3 | // recognized in your jurisdiction.
4 | // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
5 |
6 | #ifndef JSON_AUTOLINK_H_INCLUDED
7 | #define JSON_AUTOLINK_H_INCLUDED
8 |
9 | #include "config.h"
10 |
11 | #ifdef JSON_IN_CPPTL
12 | #include
13 | #endif
14 |
15 | #if !defined(JSON_NO_AUTOLINK) && !defined(JSON_DLL_BUILD) && \
16 | !defined(JSON_IN_CPPTL)
17 | #define CPPTL_AUTOLINK_NAME "json"
18 | #undef CPPTL_AUTOLINK_DLL
19 | #ifdef JSON_DLL
20 | #define CPPTL_AUTOLINK_DLL
21 | #endif
22 | #include "autolink.h"
23 | #endif
24 |
25 | #endif // JSON_AUTOLINK_H_INCLUDED
26 |
--------------------------------------------------------------------------------
/src/Core/OCNetCDF/CINRad.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "ICinRadReader.h"
4 |
5 | namespace OC
6 | {
7 | class CINRad : public CVolume
8 | {
9 | public:
10 | CINRad(String filename);
11 | ~CINRad();
12 |
13 | osg::Image* readImage(String filename, String var_name);
14 | osg::Image* readImageForVolume(String filename, String var_name);
15 | void setType(Type type){mType = type;}
16 | private:
17 | ImageList readImageList(String filename, String var_name,bool usefloat = false);
18 | void parseName(String filename);
19 | int mRadarRadius;
20 | float mUnit = 1000.0f;
21 | Type mType;
22 | String mFilename;
23 | DataStreamPtr mDataStream;
24 | std::vector mPitchList;
25 | osg::ref_ptr mVelocityImage;
26 | };
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/src/Linux/OCVolumeConverter/WatcherManager.cpp:
--------------------------------------------------------------------------------
1 | #include "WatcherManager.h"
2 |
3 | WatcherManager::WatcherManager()
4 | {
5 |
6 | }
7 |
8 | WatcherManager::~WatcherManager()
9 | {
10 |
11 | }
12 |
13 | void WatcherManager::add(String path)
14 | {
15 | if(mWatcherMap.find(path) != mWatcherMap.end())
16 | {
17 | std::cout<<"Already watching:" << path << std::endl;
18 | return;
19 | }
20 | std::cout<<"start watching:" << path << std::endl;
21 |
22 | watcher* wat = mWatcherMap[path] = new watcher;
23 | wat->createTask(path);
24 | }
25 |
26 | void WatcherManager::remove(String path)
27 | {
28 | if(mWatcherMap.find(path) != mWatcherMap.end())
29 | {
30 | std::cout<<"remove watching:" << path << std::endl;
31 | mWatcherMap.erase(path);
32 | }
33 | }
34 |
35 |
--------------------------------------------------------------------------------
/src/Application/Weathertoy/LabWebEngineView.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 |
7 | class LabWebEngineView : public QWebEngineView
8 | {
9 | Q_OBJECT
10 |
11 | public:
12 | LabWebEngineView(QWidget *parent);
13 | ~LabWebEngineView();
14 | protected:
15 | void dragEnterEvent(QDragEnterEvent* event);
16 | void dropEvent(QDropEvent* event);
17 |
18 | bool event(QEvent* event) override;
19 | virtual void mousePressEvent(QMouseEvent* event);
20 | void mouseMoveEvent(QMouseEvent* event);
21 | void mouseReleaseEvent(QMouseEvent* event);
22 | bool eventFilter(QObject* obj, QEvent* ev);
23 | private:
24 | bool onMove = false;
25 | QPoint last = QPoint(0, 0);
26 | QPointer child_;
27 | };
28 |
--------------------------------------------------------------------------------
/src/Core/OCZip/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
2 | INCLUDE_DIRECTORIES(${WORKINGPATH}/3rdParty/include)
3 |
4 | SET(LIB_NAME OCZip)
5 |
6 | SET(TARGET_H
7 | crypt.h
8 | ioapi.h
9 | iostd.h
10 | PakoZip.h
11 | unzip.h
12 | zip.h
13 | ZipDefine.h
14 | BZip2.h
15 | bz2/bzlib.h
16 | bz2/bzlib_private.h
17 | )
18 |
19 | SET(TARGET_SRC
20 | src/ioapi.cpp
21 | src/iostd.cpp
22 | src/iowin32.c
23 | src/PakoZip.cpp
24 | src/zip.c
25 | src/unzip.c
26 | src/BZip2.cpp
27 | bz2/blocksort.c
28 | bz2/bzlib.c
29 | bz2/compress.c
30 | bz2/crctable.c
31 | bz2/decompress.c
32 | bz2/huffman.c
33 | bz2/randtable.c
34 | )
35 |
36 | SET(TARGET_EXTERNAL_LIBRARIES
37 | zlib
38 | )
39 |
40 | SETUP_GROUP()
41 | SETUP_LIBRARY(${LIB_NAME})
42 |
--------------------------------------------------------------------------------
/src/Core/OCZip/mztools.h:
--------------------------------------------------------------------------------
1 | /*
2 | Additional tools for Minizip
3 | Code: Xavier Roche '2004
4 | License: Same as ZLIB (www.gzip.org)
5 | */
6 |
7 | #ifndef _zip_tools_H
8 | #define _zip_tools_H
9 |
10 | #ifdef __cplusplus
11 | extern "C" {
12 | #endif
13 |
14 | #ifndef _ZLIB_H
15 | #include "zlib.h"
16 | #endif
17 |
18 | #include "unzip.h"
19 |
20 | /* Repair a ZIP file (missing central directory)
21 | file: file to recover
22 | fileOut: output file after recovery
23 | fileOutTmp: temporary file name used for recovery
24 | */
25 | extern int ZEXPORT unzRepair(const char* file,
26 | const char* fileOut,
27 | const char* fileOutTmp,
28 | uLong* nRecovered,
29 | uLong* bytesRecovered);
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/src/Core/OCModel/ModelUtility.h:
--------------------------------------------------------------------------------
1 | #ifndef _MODEL_UTILITY_H_
2 | #define _MODEL_UTILITY_H_
3 |
4 | #include "PipeMath.h"
5 |
6 | namespace OC
7 | {
8 | namespace Modeling
9 | {
10 | class _ModelExport ModelUtility
11 | {
12 | public:
13 | ModelUtility(void);
14 | ~ModelUtility(void);
15 | static String fixshelftable(String table);
16 | static void getMinMaxSection(LinePtrList linkLines,PipeSection& minSect,PipeSection& maxSect);
17 | static Vector3List parseSpatialField(String geomStr);
18 | static Vector3List parseGeom(uchar* ptr);
19 | static PipeSection parseSect(String sectStr);
20 | static void setTexture(osg::Node* node,String texture,bool tInternal = false);
21 | static osg::StateSet* createTextureStateset(String imageurl,bool readimage);
22 | };
23 | }
24 | }
25 |
26 |
27 | #endif
28 |
29 |
30 |
--------------------------------------------------------------------------------
/src/Core/OCNetCDF/ICinRadReader.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "Volume.h"
4 | #include "CinRadHeader.h"
5 |
6 | namespace OC
7 | {
8 | typedef std::vector > ImageList;
9 | class ICinRadReader
10 | {
11 | public:
12 | ICinRadReader(Type type)
13 | :_type(type)
14 | {
15 | if (_type == CA)
16 | {
17 | _radius = 800;
18 | _radiusDoupplerV = 1600;
19 | }
20 | }
21 | virtual ~ICinRadReader() {}
22 | virtual void read(DataStreamPtr dataStream) {}
23 | virtual ImageList generateImage(float clampMin, float clampMax,bool autoResize = true) = 0;
24 | int t() { return 2 * _radius; }
25 | int s() { return 2 * _radius; }
26 |
27 | int _radius = 460;
28 | int _radiusDoupplerV = 920;
29 | Type _type;
30 | ImageList mFloatImageList;
31 | std::vector pitchList;
32 | };
33 | }
--------------------------------------------------------------------------------
/src/Core/OCNetCDF/NcVolume.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_NetCDF_Volume_H__
2 | #define _OC_NetCDF_Volume_H__
3 |
4 | #include "NetCDFDefine.h"
5 | #include
6 | #include "OCMain/ConfigManager.h"
7 | #include "OCMain/DataStream.h"
8 | #include "OCUtility/RGBAEncoder.h"
9 | #include "OCVolume/VolumeObject.h"
10 |
11 | namespace OC
12 | {
13 | namespace Volume
14 | {
15 | class NcVolume : public CVolumeObject
16 | {
17 | public:
18 | NcVolume();
19 | virtual ~NcVolume();
20 |
21 |
22 | long mDimX = 0;
23 | long mDimY = 0;
24 | long mDimZ = 0;
25 | long mDimension = 3;
26 |
27 | std::vector elvValues;
28 | std::vector var1Values;
29 | std::vector var2Values;
30 | std::vector lonValues;
31 | std::vector latValues;
32 | std::vector heiValues;
33 | };
34 | }
35 | }
36 |
37 | #endif
38 |
--------------------------------------------------------------------------------
/src/Core/OCLayer/IFeature.h:
--------------------------------------------------------------------------------
1 | #ifndef _IFEATURE_CLASS_
2 | #define _IFEATURE_CLASS_
3 |
4 | #include "OCMain/osg.h"
5 | #include "IRecord.h"
6 |
7 | namespace OC
8 | {
9 | class _LayerExport IFeature
10 | {
11 | public:
12 | static String LabelFeatureType;
13 | static String ModelFeatureType;
14 | public:
15 | IFeature(void);
16 | virtual ~IFeature(void);
17 |
18 | virtual void setFeatureName(String name);
19 | virtual String getFeatureName();
20 |
21 | virtual void setID(long id);
22 | virtual long getID();
23 |
24 | virtual ILayer* getParent();
25 | virtual void setParent(ILayer* layer);
26 |
27 | void setRecord(IRecord* record);
28 | IRecord* getRecrod();
29 |
30 | String getType();
31 |
32 | protected:
33 | String mFeatureType;
34 | ILayer* mParent;
35 | osg::ref_ptr mRecord;
36 | };
37 | }
38 |
39 | #endif
--------------------------------------------------------------------------------
/src/Core/OCModel/TilesetSaveStrategy.h:
--------------------------------------------------------------------------------
1 | #include "SaveStrategy.h"
2 | #include "OCesium/B3dmWriter.h"
3 | #include "OCesium/TDTiles.h"
4 |
5 | namespace OC
6 | {
7 | namespace Modeling
8 | {
9 | class _ModelExport TilesetSaveStrategy :public SaveStrategy
10 | {
11 | public:
12 | TilesetSaveStrategy();
13 | ~TilesetSaveStrategy();
14 | virtual bool init();
15 | virtual bool writeFeature(FeatureRecord* record);
16 |
17 | protected:
18 | typedef std::map > GlobalTiles;
19 | void writeTileset();
20 | GlobalTiles findGlobal(IGroupModelData* groupMD);
21 | private:
22 | osg::BoundingBox mRootBoundBox;
23 | osg::ref_ptr mRootTileset;
24 | std::map > mTiltWriterMap;
25 | };
26 | }
27 | }
28 |
29 |
30 |
--------------------------------------------------------------------------------
/src/Core/OCLayer/src/ScenePass.cpp:
--------------------------------------------------------------------------------
1 | #include "ScenePass.h"
2 |
3 | namespace OC
4 | {
5 | CScenePassCamera::CScenePassCamera(void)
6 | :mGroup(NULL)
7 | {
8 |
9 | }
10 |
11 | void CScenePassCamera::setCullNode(osg::Group* g)
12 | {
13 | mGroup = g;
14 | }
15 |
16 | CScenePassCamera::~CScenePassCamera(void)
17 | {
18 |
19 | }
20 |
21 | void CScenePassCamera::cull(osgUtil::CullVisitor& cv)
22 | {
23 | mGroup->osg::Group::traverse(cv);
24 | }
25 |
26 | void CScenePassCamera::traverse(osg::NodeVisitor& nv)
27 | {
28 | if (mGroup/* && nv.getVisitorType() == osg::NodeVisitor::CULL_VISITOR*/)
29 | {
30 | mGroup->osg::Group::traverse(nv);
31 | }
32 | else
33 | {
34 | osg::Camera::traverse(nv);
35 | }
36 | }
37 |
38 | CScenePass::CScenePass(void)
39 | {
40 | }
41 |
42 |
43 | CScenePass::~CScenePass(void)
44 | {
45 | }
46 |
47 | }
--------------------------------------------------------------------------------
/src/Core/OCesium/BaseWriter.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_Base_Writer_H
2 | #define _OC_Base_Writer_H
3 |
4 | #include "CesiumDefine.h"
5 |
6 | namespace OC
7 | {
8 | namespace Cesium
9 | {
10 | class _CesiumExport BaseWriter : public osg::Object
11 | {
12 | public:
13 | BaseWriter() {}
14 | virtual ~BaseWriter() {};
15 |
16 | BaseWriter(const BaseWriter& eh, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY) {}
17 | META_Object(OCesium, BaseWriter);
18 |
19 | virtual bool writeToFile(String filename) { return false; }
20 | virtual bool writeToStream(std::ostream& output) { return false; }
21 | virtual uint32 bytesLength(){return mBytesLength;}
22 |
23 | protected:
24 | uint32 mBytesLength = 0;
25 | };
26 | }}
27 |
28 |
29 | #endif
--------------------------------------------------------------------------------
/src/Plugins/shapefile/ShapeFileArchive.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "OCLayer/IArchive.h"
4 |
5 | namespace OC
6 | {
7 | namespace Modeling
8 | {
9 | class ShapeFileArchive:public IArchive
10 | {
11 | public:
12 | ShapeFileArchive();
13 | ~ShapeFileArchive();
14 | virtual const char* libraryName() const { return "OCPlugins ShapeFile"; }
15 | virtual const char* className() const { return "Shapefile"; }
16 | virtual bool acceptsExtension(const String& extension) const { return osgDB::ReaderWriter::acceptsExtension(extension); }
17 | virtual bool open(String filename,ArchiveStatus status,const osgDB::ReaderWriter::Options* options);
18 | virtual osgDB::ReaderWriter::ReadResult openArchive(const String& /*fileName*/,ArchiveStatus, unsigned int =4096, const osgDB::Options* =NULL) const;
19 | virtual bool writeFeature(FeatureRecord* record);
20 | };
21 | }
22 | }
--------------------------------------------------------------------------------
/src/Core/OCMain/BaseEvents.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_CORE_EVENTS_H__
2 | #define _OC_CORE_EVENTS_H__
3 |
4 | #include "OCommon/osg_headers.h"
5 | #include "BaseDefine.h"
6 |
7 | namespace OC
8 | {
9 | class CSceneChangeListener : public osg::Referenced
10 | {
11 | public:
12 | CSceneChangeListener(){}
13 | virtual ~CSceneChangeListener(){}
14 | virtual void onSceneChange(String scene) = 0;
15 | };
16 |
17 | class CTerrainBlenderListener : public osg::Referenced
18 | {
19 | public:
20 | CTerrainBlenderListener(){}
21 | virtual ~CTerrainBlenderListener(){}
22 | virtual void onValueChange(double value) = 0;
23 | };
24 |
25 | class SceneInfoBarListener : public osg::Referenced
26 | {
27 | public:
28 | SceneInfoBarListener(){}
29 | virtual ~SceneInfoBarListener(){}
30 | virtual void OnMove(){}
31 | virtual void OnThroughGround(bool underground){}
32 | };
33 | }
34 |
35 |
36 |
37 | #endif
--------------------------------------------------------------------------------
/src/Core/OCVolume/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
2 | INCLUDE_DIRECTORIES(${WORKINGPATH}/3rdParty/include)
3 |
4 | SET(LIB_NAME OCVolume)
5 |
6 | SET(TARGET_H
7 | VolumeDefine.h
8 | VolumeObject.h
9 | CinRadHeader.h
10 | CinRadReader.h
11 | CinRadReaderFMT.h
12 | Volume.h
13 | Swan.h
14 | Vtk.h
15 | CinRadC.h
16 | CinRad.h
17 | FyAwx.h
18 | )
19 |
20 | SET(TARGET_SRC
21 | src/VolumeObject.cpp
22 | src/CinRadReader.cpp
23 | src/CinRadReaderFMT.cpp
24 | src/Swan.cpp
25 | src/Volume.cpp
26 | src/Vtk.cpp
27 | src/CinRadC.cpp
28 | src/CinRad.cpp
29 | src/FyAwx.cpp
30 | )
31 |
32 | SET(TARGET_LIBRARIES
33 | OpenThreads
34 | osg
35 | osgDB
36 | OCZip
37 | OCMain
38 | OCUtility
39 | )
40 |
41 | SET(TARGET_EXTERNAL_LIBRARIES
42 | zlib
43 | )
44 |
45 | SETUP_LIBRARY(${LIB_NAME})
46 |
--------------------------------------------------------------------------------
/src/Core/OCModel/PipeGeomLibrary.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "OCMain/Singleton.h"
3 | #include "ISection.h"
4 | #include "PipeData.h"
5 |
6 | namespace OC
7 | {
8 | namespace Modeling
9 | {
10 | class _ModelExport PipeGeomLibrary : public CSingleton
11 | {
12 | public:
13 | PipeGeomLibrary();
14 | ~PipeGeomLibrary();
15 |
16 | osg::Node* createInstance(CCirclePipeLine* pipeline);
17 | osg::Node* createInstance(CRectPipeLine* pipeline);
18 | private:
19 | osg::Geode* createUnitCirclePipe();
20 | osg::Geode* createUnitRectPipe(bool close);
21 | osg::ref_ptr mCirclePipe;
22 | osg::ref_ptr mRectPipe;
23 | osg::ref_ptr mRectPipeClose;
24 | osg::ref_ptr mPipeInstanceProgram;
25 | osg::ref_ptr mNormaizeState;
26 | RefObjectCacher mInstanceTextures;
27 | };
28 | }
29 | }
--------------------------------------------------------------------------------
/src/Core/OCLayer/src/QueryInfo.cpp:
--------------------------------------------------------------------------------
1 | #include "QueryInfo.h"
2 |
3 | namespace OC
4 | {
5 | String CQueryInfo::NameTileID = "TileID";
6 | String CQueryInfo::NameClause = "Clause";
7 | String CQueryInfo::NameRectangle = "Rectangle";
8 | String CQueryInfo::NameLayerName = "LayerName";
9 | String CQueryInfo::NamePaperRange = "PaperRange";
10 | String CQueryInfo::NameCreateTileRecord = "CreateTileRecord";
11 | String CQueryInfo::NameQueryModelData = "QueryModelData";
12 |
13 | CQueryInfo::CQueryInfo(void)
14 | {
15 | }
16 |
17 | CQueryInfo::CQueryInfo(const CQueryInfo& info,const osg::CopyOp& copyop)
18 | :CCoreConfig(info)
19 | {
20 | }
21 |
22 | CQueryInfo::~CQueryInfo(void)
23 | {
24 | }
25 |
26 | void CQueryInfo::setCallback(CQueryCallback* query)
27 | {
28 | mCallback = query;
29 | }
30 |
31 | CQueryCallback* CQueryInfo::getCallback()
32 | {
33 | return mCallback.get();
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/src/Core/OCesium/B3dmWriter.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_B3DM_WRITER_H__
2 | #define _OC_B3DM_WRITER_H__
3 |
4 | #include "CesiumDefine.h"
5 | #include "FeatureBatchTable.h"
6 | #include "GLTFObject.h"
7 | #include "BaseWriter.h"
8 |
9 | namespace OC
10 | {
11 | namespace Cesium
12 | {
13 | class _CesiumExport B3dmWriter : public BaseWriter
14 | {
15 | public:
16 | B3dmWriter();
17 | ~B3dmWriter();
18 |
19 | virtual bool writeToFile(String filename);
20 | virtual bool writeToStream(std::ostream& output);
21 | virtual uint32 bytesLength();
22 |
23 | GLTFObject* getGltfObject();
24 | void copyAttributes(B3dmWriter* rhs);
25 | FeatureBatchTable* getFeatureBatchTable();
26 |
27 | std::vector > splitByCapcity();
28 | private:
29 | osg::ref_ptr mGltfObject;
30 | osg::ref_ptr mFeatureBatchTable;
31 | };
32 | }
33 | }
34 |
35 |
36 | #endif
37 |
38 |
--------------------------------------------------------------------------------
/src/Core/OCesium/gltfConfig.h:
--------------------------------------------------------------------------------
1 | #ifndef _GLTF_CONFIG_DEFINE_H__
2 | #define _GLTF_CONFIG_DEFINE_H__
3 |
4 | #include "CesiumDefine.h"
5 |
6 | namespace OC
7 | {
8 | namespace Cesium
9 | {
10 | class _CesiumExport gltfConfig
11 | {
12 | public:
13 | static int sectionSize;
14 | static int quantizationbits;
15 | static int AtlasImageSize;
16 | static int MaxTextureSize;
17 | static int TextrueCoordError;
18 | static bool GeodePerId;
19 | static bool writeGltf;
20 | static bool prettyPrint;
21 | static bool mergeClampTexture;
22 | static bool mergeRepeatTexture;
23 | static bool disableLight;
24 | static bool enableWebpCompress;
25 | static bool enableKtxCompress;
26 | static bool enableDracoCompress;
27 | static bool forceDoubleSide;
28 | static float geometryErroRatio;
29 | static float metallicFactor;
30 | static float roughnessFactor;
31 | };
32 | }
33 | }
34 |
35 | #endif // !
36 |
--------------------------------------------------------------------------------
/src/Core/OCLayer/Feature.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_FEATURE_H__
2 | #define _OC_FEATURE_H__
3 |
4 | #include "IFeature.h"
5 | #include "FeatureNode.h"
6 |
7 | namespace OC
8 | {
9 | class _LayerExport CFeature : public IFeature
10 | {
11 | public:
12 | static String ClassGUID;
13 |
14 | CFeature();
15 | ~CFeature();
16 |
17 | bool load();
18 |
19 | virtual void loadImpl(void);
20 | virtual void unloadImpl(void){}
21 |
22 | virtual void preUnloadImpl(void) {}
23 |
24 | virtual void postUnloadImpl(void) {}
25 |
26 | virtual void prepareImpl(void);
27 |
28 | virtual void unprepareImpl(void) {}
29 |
30 | size_t calculateSize(void) const { return 0; }
31 | private:
32 | bool mLoaded;
33 | bool mAttached;
34 | osg::ref_ptr mFeatureNode;
35 | osg::ref_ptr mFeatureRecord;
36 | };
37 |
38 | typedef SharedPtr FeaturePtr;
39 | }
40 |
41 |
42 | #endif
43 |
--------------------------------------------------------------------------------
/src/Core/OCVolume/CinRadReaderFMT.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_VOLUME_CINRAD_FMT_H__
2 | #define _OC_VOLUME_CINRAD_FMT_H__
3 |
4 | #include "VolumeObject.h"
5 | #include "CinRadHeader.h"
6 | #include "CinRad.h"
7 |
8 | namespace OC
9 | {
10 | namespace Volume
11 | {
12 | class CinRadReaderFMT : public CinRad
13 | {
14 | public:
15 | CinRadReaderFMT();
16 | ~CinRadReaderFMT();
17 | bool convert(std::istream& sstream);
18 | protected:
19 | void parseData(std::istream& sstream);
20 | void generateImage();
21 | private:
22 | typedef std::vector > ImageList;
23 | typedef std::vector TList;
24 | typedef std::map TListMap;
25 | TListMap mPitchRadialMapDBZ;
26 | };
27 | }
28 | }
29 |
30 |
31 |
32 | #endif // !_OC_VOLUME_CINRAD_FMT_H__
33 |
--------------------------------------------------------------------------------
/src/Core/OCLayer/src/IRecord.cpp:
--------------------------------------------------------------------------------
1 | #include "IRecord.h"
2 |
3 | namespace OC
4 | {
5 | IRecord::IRecord()
6 | :mID(-9999)
7 | ,mOwner(NULL)
8 | ,mDirty(false)
9 | {
10 |
11 | }
12 |
13 | IRecord::~IRecord()
14 | {
15 |
16 | }
17 |
18 | long IRecord::getID()
19 | {
20 | return mID;
21 | }
22 |
23 | void IRecord::setID(long id)
24 | {
25 | mID = id;
26 | }
27 |
28 | String IRecord::getFeatureName()
29 | {
30 | return mFeatureName;
31 | }
32 |
33 | void IRecord::setFeatureName(String name)
34 | {
35 | mFeatureName = name;
36 | }
37 |
38 | IFeature* IRecord::getOwnerFeature()
39 | {
40 | return mOwner;
41 | }
42 |
43 | void IRecord::setOwnerFeature(IFeature* feature)
44 | {
45 | mOwner = feature;
46 | }
47 |
48 | void IRecord::update()
49 | {
50 | if (!mDirty)
51 | {
52 | return;
53 | }
54 | //
55 | }
56 |
57 | void IRecord::dirty(bool _dirty)
58 | {
59 | mDirty = _dirty;
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/src/Core/OCNetCDF/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
2 | INCLUDE_DIRECTORIES(${WORKINGPATH}/3rdParty/include)
3 |
4 | SET(LIB_NAME OCNetCDF)
5 |
6 | SET(TARGET_H
7 | npy/cnpy.h
8 | npy/npyTemprature.h
9 | NcDBZ.h
10 | NcZQ.h
11 | NetCDFDefine.h
12 | NetCDFReader.h
13 | NcZT.h
14 | NcUV.h
15 | NcVolume.h
16 | NcepWind.h
17 | )
18 |
19 | SET(TARGET_SRC
20 | npy/cnpy.cpp
21 | npy/npyTemprature.cpp
22 | src/NcDBZ.cpp
23 | src/NcZQ.cpp
24 | src/NetCDFReader.cpp
25 | src/NcZT.cpp
26 | src/NcUV.cpp
27 | src/NcVolume.cpp
28 | src/NcepWind.cpp
29 | )
30 |
31 | SET(TARGET_LIBRARIES
32 | OpenThreads
33 | osg
34 | osgDB
35 | osgEarth
36 | OCUtility
37 | OCMain
38 | OCVolume
39 | )
40 |
41 | SET(TARGET_EXTERNAL_LIBRARIES
42 | gdal_i
43 | netcdf
44 | zlib
45 | )
46 |
47 | SETUP_GROUP()
48 | SETUP_LIBRARY(${LIB_NAME})
49 |
--------------------------------------------------------------------------------
/src/Application/OConv/deprecated.cpp:
--------------------------------------------------------------------------------
1 | #include "ConvCommand.h"
2 |
3 |
4 | void computeTexture(OC::Json::Value& root)
5 | {
6 | osg::ref_ptr options = new osgDB::Options;
7 | StringStream sstream;
8 | sstream << "noRotation" << std::endl;
9 | sstream << "noTesselateLargePolygons" << std::endl;
10 | sstream << "noTriStripPolygons" << std::endl;
11 | sstream << "noReverseFaces" << std::endl;
12 | options->setOptionString(sstream.str());
13 |
14 | CTextureVisitor v;
15 | String filename = JsonPackage::getString(root, "filename");
16 | osg::ref_ptr node = osgDB::readNodeFile(filename, options);
17 | v.traverse(*node);
18 | v.mBoundComputed = true;
19 | v.traverse(*node);
20 |
21 | String basename, extension, out_dir;
22 | StringUtil::splitFullFilename(filename, basename, extension, out_dir);
23 | String out_file = out_dir + basename + "_texture." + extension;
24 | osgDB::writeNodeFile(*node, out_file, options);
25 | }
26 |
--------------------------------------------------------------------------------
/src/Core/OCServer/OCServer.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_SERVER_CLASS_H__
2 | #define _OC_SERVER_CLASS_H__
3 |
4 | #include "OCServerDefine.h"
5 | #include "OCMain/Singleton.h"
6 | #include "OCMain/DataStream.h"
7 | #include "OCLayer/OCResource.h"
8 |
9 | namespace OC
10 | {
11 | namespace Server
12 | {
13 | class _OCServerExport COCServer : public CSingleton
14 | {
15 | public:
16 | COCServer();
17 | ~COCServer();
18 | void init();
19 | String invoke(String jsonStr);
20 | String getDataInfo(String method, String param, String filter);
21 | MemoryDataStreamPtr getByteData(String method, String param, String filter);
22 | MemoryDataStreamPtr getByteData(String filename);
23 | private:
24 | OCResource* mOCResource;
25 | Environment* mEnvironment;
26 | ConfigManager* mConfigManager;
27 | std::map mMemoryCaches;
28 | };
29 | }
30 | }
31 |
32 |
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/src/Core/OCUtility/src/tinyxmlerror.cpp:
--------------------------------------------------------------------------------
1 | #include "tinyxml.h"
2 |
3 | // The goal of the seperate error file is to make the first
4 | // step towards localization. tinyxml (currently) only supports
5 | // english error messages, but the could now be translated.
6 | //
7 | // It also cleans up the code a bit.
8 | //
9 |
10 | const char* TiXmlBase::errorString[ TIXML_ERROR_STRING_COUNT ] =
11 | {
12 | "No error",
13 | "Error",
14 | "Failed to open file",
15 | "Error parsing Element.",
16 | "Failed to read Element name",
17 | "Error reading Element value.",
18 | "Error reading Attributes.",
19 | "Error: empty tag.",
20 | "Error reading end tag.",
21 | "Error parsing Unknown.",
22 | "Error parsing Comment.",
23 | "Error parsing Declaration.",
24 | "Error document empty.",
25 | "Error null (0) or unexpected EOF found in input stream.",
26 | "Error parsing CDATA.",
27 | "Error when TiXmlDocument added to document, because TiXmlDocument can only be at the root.",
28 | };
29 |
--------------------------------------------------------------------------------
/src/Core/OCHttpServer/WebSocket.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 | using namespace drogon;
5 | namespace OC
6 | {
7 | class WebSocketTest : public drogon::WebSocketController
8 | {
9 | public:
10 | virtual void handleNewMessage(const WebSocketConnectionPtr &,
11 | std::string &&,
12 | const WebSocketMessageType &) override;
13 | virtual void handleConnectionClosed(
14 | const WebSocketConnectionPtr &) override;
15 | virtual void handleNewConnection(const HttpRequestPtr &,
16 | const WebSocketConnectionPtr &) override;
17 | WS_PATH_LIST_BEGIN
18 | // list path definations here;
19 | WS_PATH_ADD("/OCserver/Websocket", "drogon::LocalHostFilter", Get);
20 | WS_PATH_LIST_END
21 | private:
22 | PubSubService chatRooms_;
23 | };
24 | } // namespace example
25 |
--------------------------------------------------------------------------------
/src/Core/OCVolume/CinRadReader.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_VOLUME_CinRad_Reader_H__
2 | #define _OC_VOLUME_CinRad_Reader_H__
3 |
4 | #include "VolumeObject.h"
5 | #include "CinRad.h"
6 |
7 | namespace OC
8 | {
9 | namespace Volume
10 | {
11 | class CinRadReader : public CinRad
12 | {
13 | public:
14 | CinRadReader(String name);
15 | virtual ~CinRadReader();
16 | virtual bool convert(std::istream& sstream);
17 | protected:
18 | void parseName(String name);
19 | void parseData(std::istream& sstream);
20 | void generateImage();
21 | private:
22 | typedef std::vector > ImageList;
23 | typedef std::vector TList;
24 | typedef std::map TListMap;
25 | TListMap mPitchRadialMapDBZ;
26 | };
27 | }
28 | }
29 |
30 |
31 |
32 | #endif // !_OC_VOLUME_CINRAD_FMT_H__
33 |
--------------------------------------------------------------------------------
/src/Core/OCMain/json/forwards.h:
--------------------------------------------------------------------------------
1 | // Copyright 2007-2010 Baptiste Lepilleur
2 | // Distributed under MIT license, or public domain if desired and
3 | // recognized in your jurisdiction.
4 | // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
5 |
6 | #ifndef JSON_FORWARDS_H_INCLUDED
7 | #define JSON_FORWARDS_H_INCLUDED
8 |
9 | #if !defined(JSON_IS_AMALGAMATION)
10 | #include "config.h"
11 | #endif // if !defined(JSON_IS_AMALGAMATION)
12 |
13 | namespace OC {
14 | namespace Json {
15 |
16 | // writer.h
17 | class FastWriter;
18 | class StyledWriter;
19 |
20 | // reader.h
21 | class Reader;
22 |
23 | // features.h
24 | class Features;
25 |
26 | // value.h
27 | typedef unsigned int ArrayIndex;
28 | class StaticString;
29 | class Path;
30 | class PathArgument;
31 | class Value;
32 | class ValueIteratorBase;
33 | class ValueIterator;
34 | class ValueConstIterator;
35 |
36 | } // namespace Json
37 | } // namespace Json
38 |
39 | #endif // JSON_FORWARDS_H_INCLUDED
40 |
--------------------------------------------------------------------------------
/src/Core/OCUtility/RGBAEncoder.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_RGBA_ENCODER_H__
2 | #define _OC_RGBA_ENCODER_H__
3 |
4 | #include "OCMain/osg.h"
5 | #include "UtilityDefine.h"
6 |
7 | namespace OC
8 | {
9 | class _UtilityExport RGBAEncoder
10 | {
11 | public:
12 | RGBAEncoder() {}
13 | ~RGBAEncoder() {}
14 | static osg::Vec4 encodeFloatRGBA(float v);
15 | static float decodeRGBAFloat(osg::Vec4 rgba);
16 | static osg::Vec4ub packFloat(float value);
17 | static float unpackFloat(osg::Vec4ub packedFloat);
18 | static float unpackFloat(osg::Vec4 packedFloat);
19 | static osg::Vec2 octEncodeInRange(osg::Vec3 normal, float rangeMax);
20 | static osg::Vec2 octEncode(osg::Vec3 vector);
21 | static osg::Vec4 octEncodeToVec4(osg::Vec3 vector);
22 | static osg::Vec3 octDecodeInRange(float x, float y, float rangeMax);
23 | static osg::Vec3 octDecode(float x, float y);
24 | static osg::Vec3 octDecodeFromVec4(osg::Vec4 encoded);
25 | };
26 | }
27 |
28 |
29 | #endif // !_OC_RGBA_ENCODER_H__
30 |
--------------------------------------------------------------------------------
/src/Core/OCModel/DataFilter.h:
--------------------------------------------------------------------------------
1 | #ifndef _DATA_FILTER_CLASS_H__
2 | #define _DATA_FILTER_CLASS_H__
3 |
4 | #include "ModelDefine.h"
5 |
6 | namespace OC
7 | {
8 | namespace Modeling
9 | {
10 | class _ModelExport CDataFilter :public osg::Referenced
11 | {
12 | public:
13 | CDataFilter(void);
14 | ~CDataFilter(void);
15 |
16 | void setTimeClause(String time);
17 | String getTimeClause();
18 |
19 | void setExtent(CRectangle rect);
20 | CRectangle getExtent();
21 |
22 | longVector& getNodeIDList();
23 | longVector& getLineIDList();
24 |
25 | void setNodeWhereClause(String clause);
26 | String getNodeWhereClause();
27 |
28 | void setLineWhereClause(String clause);
29 | String getLineWhereClause();
30 | private:
31 | String mTimeClause;
32 | String mLineClause;
33 | String mNodeClause;
34 | CRectangle mExtent;
35 | longVector mNodeIDList;
36 | longVector mLineIDList;
37 | };
38 | }
39 | }
40 |
41 |
42 |
43 | #endif
44 |
45 |
46 |
--------------------------------------------------------------------------------
/src/Plugins/pipe/NodeExInfo.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_Model_NodeExInfo_H__
2 | #define _OC_Model_NodeExInfo_H__
3 |
4 | #include "OCModel/Modelnode.h"
5 |
6 | namespace OC
7 | {
8 | namespace Modeling
9 | {
10 | class NodeExInfo
11 | {
12 | public:
13 | NodeExInfo(PipeNode* owner);
14 | ~NodeExInfo(void);
15 |
16 | CVector3 calcModelDirection();
17 |
18 | CVector3 getConstDirection();
19 | void setConstDirection(CVector3 direction);
20 |
21 | ModelNode getModelNode();
22 | void setModelNode(ModelNode model);
23 |
24 | void setModelPosition(CVector3 position);
25 | CVector3 getModelPosition();
26 |
27 | void setGroundZ(double z);
28 | double getGroundZ();
29 |
30 | void setCategory(String cate);
31 | String getCategory();
32 | private:
33 | double mGroundZ;
34 | String mCategory;
35 | CVector3 mConsDirection;
36 | CVector3 mModelPosition;
37 | PipeNode* mOwner;
38 | ModelNode mModelNode;
39 | };
40 | }
41 | }
42 |
43 |
44 |
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/src/Core/OCesium/PntsWriter.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_PNTS_WRITER_H
2 | #define _OC_PNTS_WRITER_H
3 |
4 | #include "BaseWriter.h"
5 | #include "FeatureBatchTable.h"
6 |
7 | namespace OC
8 | {
9 | namespace Cesium
10 | {
11 | class _CesiumExport PntsWriter : public BaseWriter
12 | {
13 | public:
14 | PntsWriter();
15 | ~PntsWriter();
16 | void push(osg::Vec3 pos);
17 | void push_normal(osg::Vec3 normal);
18 | void push_color(uint8 r, uint8 g, uint8 b);
19 | void push_color(osg::Vec3ub color);
20 | void push_positionAndBatchId(osg::Vec3 pos, int batchId);
21 |
22 | virtual bool writeToFile(String filename);
23 | virtual bool writeToStream(std::ostream& output);
24 |
25 | osg::ref_ptr positions;
26 | osg::ref_ptr normals;
27 | osg::ref_ptr batchIdArray;
28 | osg::ref_ptr colors;
29 | uint32 batch_length = 0;
30 | FeatureBatchTable mFeatureBatchTable;
31 | };
32 | }
33 | }
34 |
35 | #endif
36 |
37 |
--------------------------------------------------------------------------------
/src/Core/OCModel/NodeExInfo.h:
--------------------------------------------------------------------------------
1 | #ifndef _NODE_EX_INFO_H
2 | #define _NODE_EX_INFO_H
3 |
4 | #include "ModelDefine.h"
5 | #include "Modelnode.h"
6 |
7 | namespace OC
8 | {
9 | namespace Modeling
10 | {
11 | class _ModelExport NodeExInfo
12 | {
13 | public:
14 | NodeExInfo(PipeNode* owner);
15 | ~NodeExInfo(void);
16 |
17 | CVector3 calcModelDirection();
18 |
19 | CVector3 getConstDirection();
20 | void setConstDirection(CVector3 direction);
21 |
22 | ModelNode getModelNode();
23 | void setModelNode(ModelNode model);
24 |
25 | void setModelPosition(CVector3 position);
26 | CVector3 getModelPosition();
27 |
28 | void setGroundZ(double z);
29 | double getGroundZ();
30 |
31 | void setCategory(String cate);
32 | String getCategory();
33 | private:
34 | double mGroundZ;
35 | String mCategory;
36 | CVector3 mConsDirection;
37 | CVector3 mModelPosition;
38 | PipeNode* mOwner;
39 | ModelNode mModelNode;
40 | };
41 | }
42 | }
43 |
44 |
45 |
46 |
47 | #endif
48 |
--------------------------------------------------------------------------------
/src/Core/OCUtility/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(HopeMap3D_DIR)\HopeMap3DUtility
2 |
3 | include $(CLEAR_VARS)
4 |
5 | LIBDIR := $(OSG_ANDROID_DIR)/lib
6 |
7 | LOCAL_C_INCLUDES:= $(OSG_ANDROID_DIR)/include $(OSGE_ANDROID_DIR) $(HopeMap3D_DIR)
8 |
9 | LOCAL_CPP_EXTENSION := cpp
10 |
11 | LOCAL_LDLIBS := -llog -lGLESv2 -lz -lgnustl_static
12 |
13 | LOCAL_MODULE := HopeMap3DUtility
14 |
15 | MY_CPP_LIST := $(wildcard $(LOCAL_PATH)/src/*.cpp)
16 |
17 | LOCAL_SRC_FILES := $(MY_CPP_LIST:$(LOCAL_PATH)/%=%)
18 |
19 | LOCAL_CFLAGS := -DANDROID
20 |
21 | LOCAL_CPPFLAGS := -DANDROID
22 |
23 | LOCAL_LDFLAGS := -L $(LIBDIR) \
24 | -losgViewer \
25 | -losgVolume \
26 | -losgTerrain \
27 | -losgText \
28 | -losgShadow \
29 | -losgSim \
30 | -losgParticle \
31 | -losgManipulator \
32 | -losgGA \
33 | -losgFX \
34 | -losgDB \
35 | -losgAnimation \
36 | -losgUtil \
37 | -losg \
38 | -lOpenThreads \
39 | -losgEarth \
40 |
41 | include $(BUILD_STATIC_LIBRARY)
42 | #include $(BUILD_SHARED_LIBRARY)
43 |
44 |
--------------------------------------------------------------------------------
/src/Application/OConv/Thread/ConvWorkqueue.h:
--------------------------------------------------------------------------------
1 | #include "OCMain/Environment.h"
2 | #include "OCMain/ConfigManager.h"
3 | #include "OCMain/DefaultWorkQueueStandard.h"
4 |
5 | using namespace OC;
6 |
7 | class OConvWorkqueue : public WorkQueue::ResponseHandler, public WorkQueue::RequestHandler
8 | {
9 | public:
10 | OConvWorkqueue(int threadNum = 2);
11 | ~OConvWorkqueue(void);
12 |
13 | enum RequestType
14 | {
15 | RT_MapCacherCes,
16 | RT_MapCacherTDT,
17 | };
18 |
19 | struct TaskRequest
20 | {
21 | RequestType type;
22 | int X, Y, Z, L;
23 | String param;
24 | friend std::ostream& operator<<(std::ostream& o, const TaskRequest& r)
25 | {
26 | (void)r; return o;
27 | }
28 | };
29 |
30 | void shutdown();
31 | int mWorkQueueChannel;
32 | virtual void handleResponse(const WorkQueue::Response* res, const WorkQueue* srcQ);
33 | virtual WorkQueue::Response* handleRequest(const WorkQueue::Request* req, const WorkQueue* srcQ);
34 | void addRequest(TaskRequest request);
35 | WorkQueue* mWorkQueue;
36 | int taskCount = 0;
37 | };
38 |
--------------------------------------------------------------------------------
/src/Core/OCMain/DatabaseDefine.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_DATABASE_H__
2 | #define _OC_DATABASE_H__
3 |
4 | #include "OCMain/stl.h"
5 | #include "OCMain/osg.h"
6 | #include "OCMain/IteratorWrapper.h"
7 | #include "OCMain/DataStream.h"
8 | #include "OCUtility/StringConverter.h"
9 | #include "OCUtility/tinyxml.h"
10 | #include "OCMain/CoreConfig.h"
11 |
12 | struct sqlite3;
13 | struct sqlite3_stmt;
14 | namespace OC
15 | {
16 | class CMetaRecord;
17 | class CQueryInfo;
18 | class FeatureRecord;
19 | class IDatabase;
20 | class LayerRecord;
21 | class IPipeDatabase;
22 | class TemplateRecord;
23 | class TileFeatureRecord;
24 | class OCFieldInfo;
25 | class OCHeaderInfo;
26 | class OCGeomFieldInfo;
27 | class OCJoinFieldInfo;
28 | class OCBinaryFieldInfo;
29 | class OCBinaryField;
30 | class SQLite;
31 | }
32 |
33 | typedef enum _OC_DATATYPE
34 | {
35 | OC_DATATYPE_INTEGER,
36 | OC_DATATYPE_FLOAT,
37 | OC_DATATYPE_TEXT,
38 | OC_DATATYPE_BLOB,
39 | OC_DATATYPE_NULL,
40 | OC_DATATYPE_TIME,
41 | OC_DATATYPE_GEOM
42 | }OC_DATATYPE;
43 |
44 | #endif
--------------------------------------------------------------------------------
/src/Core/OCLayer/SqliteArchive.h:
--------------------------------------------------------------------------------
1 | #ifndef _SQLITE_ARCHIVE_H_
2 | #define _SQLITE_ARCHIVE_H_
3 |
4 | #include "IArchive.h"
5 |
6 | namespace OC
7 | {
8 | class _LayerExport SqliteArchive : public IArchive
9 | {
10 | public:
11 | SqliteArchive(void);
12 | virtual ~SqliteArchive(void);
13 | virtual osgDB::ReaderWriter::ReadResult readImage(const String& fileName,const osgDB::ReaderWriter::Options* =NULL) const;
14 | virtual osgDB::ReaderWriter::WriteResult writeImage(const osg::Image& image, const String& fileName,const osgDB::ReaderWriter::Options* =NULL) const;
15 | public:
16 | bool open(String filename,ArchiveStatus status,const osgDB::ReaderWriter::Options* options=NULL);
17 | virtual bool writeFeature(FeatureRecord* record);
18 | void recalculate_index();
19 | virtual bool checkUpdate();
20 | private:
21 | mutable ObserverObjectCacher mBatchImages;
22 |
23 | //for write feature
24 | StringLongMap mShareTileRecord;
25 | StringLongMap mShareModelRecord;
26 | };
27 | }
28 |
29 |
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/src/Core/OCServer/src/VolumeManager.cpp:
--------------------------------------------------------------------------------
1 | #include "VolumeManager.h"
2 | #include "OCVolume/Volume.h"
3 |
4 | namespace OC
5 | {
6 | using namespace Volume;
7 | namespace Server
8 | {
9 | String VolumeManager::getVolumeFile(const String name, const String varname, const String ext, const String dir, const String version)
10 | {
11 | String dataDir = _getServerDir(ConfigNameDataDir);
12 | String cacheDir = _getServerDir(ConfigNameCacheDir);
13 |
14 | String file_var_dotw3dm = cacheDir + name + "." + varname + ".w3dm";
15 |
16 | String error = StringUtil::BLANK;
17 | if (!FileUtil::FileExist(file_var_dotw3dm))
18 | {
19 | String filename = dataDir + name + "." + ext;
20 | osg::ref_ptr vo = CVolume::convert(filename, varname);
21 | if (vo.valid())
22 | {
23 | vo->writeToW3DM(file_var_dotw3dm);
24 | }
25 | else
26 | {
27 | error = " error";
28 | }
29 | }
30 |
31 | Singleton(LogManager).stream() << file_var_dotw3dm << error;
32 |
33 | return file_var_dotw3dm;
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/src/Core/OCesium/src/gltfConfig.cpp:
--------------------------------------------------------------------------------
1 | #include "gltfConfig.h"
2 |
3 |
4 | int OC::Cesium::gltfConfig::sectionSize = 0;
5 | int OC::Cesium::gltfConfig::quantizationbits = 16;
6 | int OC::Cesium::gltfConfig::AtlasImageSize = 2048;
7 | int OC::Cesium::gltfConfig::MaxTextureSize = 0;
8 | int OC::Cesium::gltfConfig::TextrueCoordError = 10;
9 | bool OC::Cesium::gltfConfig::GeodePerId = false;
10 | bool OC::Cesium::gltfConfig::writeGltf = false;
11 | bool OC::Cesium::gltfConfig::prettyPrint = false;
12 | bool OC::Cesium::gltfConfig::mergeClampTexture = true;
13 | bool OC::Cesium::gltfConfig::mergeRepeatTexture = false;
14 | bool OC::Cesium::gltfConfig::disableLight = false;
15 | bool OC::Cesium::gltfConfig::enableWebpCompress = false;
16 | bool OC::Cesium::gltfConfig::enableKtxCompress = false;
17 | bool OC::Cesium::gltfConfig::enableDracoCompress = false;
18 | bool OC::Cesium::gltfConfig::forceDoubleSide = false;
19 | float OC::Cesium::gltfConfig::geometryErroRatio = 1.0;
20 | float OC::Cesium::gltfConfig::metallicFactor = 0.0;
21 | float OC::Cesium::gltfConfig::roughnessFactor = 0.45;
--------------------------------------------------------------------------------
/src/Core/OCesium/src/GLTFObject.cpp:
--------------------------------------------------------------------------------
1 | #include "GLTFObject.h"
2 |
3 | namespace OC
4 | {
5 | namespace Cesium
6 | {
7 | GLTFObject::GLTFObject(FeatureBatchTable* featureBatchTable)
8 | :BatchGroup(featureBatchTable)
9 | {
10 | }
11 |
12 | GLTFObject::~GLTFObject()
13 | {
14 | }
15 |
16 | bool GLTFObject::writeToFile(String filename, bool isBinary)
17 | {
18 | std::fstream fout(filename.c_str(), std::ios::out | std::ios::binary);
19 | if (!fout.is_open())
20 | return false;
21 |
22 | bool ret = writeToStream(fout, isBinary);
23 |
24 | fout.close();
25 |
26 | return ret;
27 | }
28 |
29 | bool GLTFObject::writeToStream(std::ostream& output, bool isBinary)
30 | {
31 | submitBatch();
32 |
33 | size_t pos0 = output.tellp();
34 | if (_gltfHelper.writeGltfSceneToStream(output, isBinary))
35 | {
36 | size_t pos1 = output.tellp();
37 | mBytesLength = pos1 - pos0;
38 | }
39 |
40 | return mBytesLength != 0;
41 | }
42 |
43 | uint32 GLTFObject::bytesLength()
44 | {
45 | return mBytesLength;
46 | }
47 | }
48 | }
--------------------------------------------------------------------------------
/src/Core/OCNetCDF/TransferFunction.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_VOLUME_TRANSFER_H_
2 | #define _OC_VOLUME_TRANSFER_H_
3 |
4 | #include "NetCDFDefine.h"
5 |
6 | namespace OC
7 | {
8 | class CTransferFunction : public osg::Referenced
9 | {
10 | public:
11 | CTransferFunction();
12 | virtual ~CTransferFunction();
13 |
14 | virtual void read(String filename);
15 | virtual osg::Vec4 getColor(float v) { return osg::Vec4(1.0f, 1.0f, 1.0f, 1.0f); }
16 | };
17 |
18 | class CImageTransferFunction : public CTransferFunction
19 | {
20 | public:
21 | CImageTransferFunction();
22 | ~CImageTransferFunction();
23 |
24 | virtual void read(String filename);
25 | virtual osg::Vec4 getColor(float v);
26 |
27 | osg::ref_ptr tfImage;
28 | };
29 |
30 | class CFileTransferFunction : public CTransferFunction
31 | {
32 | public:
33 | CFileTransferFunction();
34 | ~CFileTransferFunction();
35 |
36 | virtual void read(String filename);
37 | virtual osg::Vec4 getColor(float v);
38 |
39 | typedef std::map ColorMap;
40 | ColorMap _colorMap;
41 | };
42 | }
43 |
44 | #endif
--------------------------------------------------------------------------------
/src/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | INCLUDE_DIRECTORIES(${WORKINGPATH}/OpenSceneGraph/build/include)
2 | INCLUDE_DIRECTORIES(${WORKINGPATH}/OpenSceneGraph/include)
3 | INCLUDE_DIRECTORIES(${WORKINGPATH}/osgearth/build/build_include)
4 | INCLUDE_DIRECTORIES(${WORKINGPATH}/osgearth/src)
5 | INCLUDE_DIRECTORIES(${WORKINGPATH}/src/Core)
6 |
7 | IF (Qt5Widgets_FOUND)
8 | ADD_SUBDIRECTORY(Application/Weathertoy)
9 | ENDIF()
10 |
11 | IF(WIN32)
12 | FOREACH(mylibfolder
13 | Application/OCServerApp
14 | Application/OConv
15 | Core/OCesium
16 | Core/OCModel
17 | Core/OCNetCDF
18 | Core/OCHttpServer
19 | Core/OCHttpClient
20 | Core/OCServer
21 | )
22 | ADD_SUBDIRECTORY(${mylibfolder})
23 | ENDFOREACH()
24 | ENDIF(WIN32)
25 |
26 | FOREACH(mylibfolder
27 | Core/OCLayer
28 | Core/OCZip
29 | Core/OCVolume
30 | Core/OCMain
31 | Core/OCUtility
32 | Linux/OCVolumeConverter
33 | )
34 | ADD_SUBDIRECTORY(${WORKINGPATH}/src/${mylibfolder})
35 | ENDFOREACH()
36 |
37 | INCLUDE_DIRECTORIES(${WORKINGPATH}/3rdParty/include)
38 | IF(WIN32)
39 | ADD_SUBDIRECTORY(Plugins)
40 | ENDIF(WIN32)
41 |
--------------------------------------------------------------------------------
/src/Core/OCUtility/FileUtil.h:
--------------------------------------------------------------------------------
1 | #ifndef _FILE_UTIL_CLASS_H_
2 | #define _FILE_UTIL_CLASS_H_
3 |
4 | #include "StringUtil.h"
5 |
6 | namespace OC
7 | {
8 | class _UtilityExport FileUtil
9 | {
10 | public:
11 | enum Type
12 | {
13 | FILE_NOT_FOUND,
14 | REGULAR_FILE,
15 | DIRECTORY
16 | };
17 |
18 | /*
19 | * return 0 File 1 Folder -1 NoteFound
20 | */
21 | static Type FileType(String filename);
22 |
23 | static void FindFiles(const String strPath, StringVector &fileVector);
24 |
25 | static void FindModelFiles(const String strPath, StringVector &fileVector);
26 |
27 | static bool FileExist(String filename);
28 |
29 | static int FileSize(String filename);
30 |
31 | static bool FileDelete(String filename);
32 |
33 | static bool DirDelete(String filename);
34 |
35 | static bool FileWrite(String filename,std::istream& fin);
36 |
37 | static String getLowerCaseFileExtension(String filename);
38 |
39 | static bool isAceptModelType(String filename);
40 |
41 | static bool makeDirectory(String dir);
42 |
43 | static bool FileReName(String filename,String newFilename);
44 | };
45 | }
46 |
47 | #endif
--------------------------------------------------------------------------------
/src/Core/OCLayer/QueryInfo.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_QUERY_INFO_CLASS_H__
2 | #define _OC_QUERY_INFO_CLASS_H__
3 |
4 | #include "LayerDefine.h"
5 | #include "OCMain/CoreConfig.h"
6 |
7 | namespace OC
8 | {
9 | class _LayerExport CQueryCallback : public osg::Referenced
10 | {
11 | public:
12 | CQueryCallback(){}
13 | ~CQueryCallback(){}
14 |
15 | virtual bool onQuery(TemplateRecord* record){return true;}
16 | };
17 | class _LayerExport CQueryInfo : public osgDB::ReaderWriter::Options , public CCoreConfig
18 | {
19 | public:
20 | CQueryInfo(void);
21 | CQueryInfo(const CQueryInfo&,const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
22 | virtual ~CQueryInfo(void);
23 |
24 | META_Object(OC,CQueryInfo)
25 |
26 | static String NameTileID;
27 | static String NameClause;
28 | static String NameRectangle;
29 | static String NameLayerName;
30 | static String NamePaperRange;
31 | static String NameCreateTileRecord;
32 | static String NameQueryModelData;
33 |
34 | void setCallback(CQueryCallback* query);
35 | CQueryCallback* getCallback();
36 | private:
37 | osg::ref_ptr mCallback;
38 | };
39 |
40 | }
41 |
42 | #endif
43 |
--------------------------------------------------------------------------------
/src/Application/Weathertoy/Bridge.cpp:
--------------------------------------------------------------------------------
1 | #include "Bridge.h"
2 | #include
3 | #include
4 | #include
5 | #include "LabViewer.h"
6 | #include "WeatherLabMenu.h"
7 |
8 | Bridge::Bridge()
9 | : QObject(NULL)
10 | {
11 | }
12 |
13 | Bridge::~Bridge()
14 | {
15 | }
16 |
17 | Bridge* Bridge::instance()
18 | {
19 | static Bridge s_obj;
20 | return &s_obj;
21 | }
22 |
23 | void Bridge::eval(QString method, QString json)
24 | {
25 | if (method == "showMinimized")
26 | {
27 | LabViewer::instance()->showMinimized();
28 | }
29 | else if (method == "showMaximized")
30 | {
31 | if (LabViewer::instance()->isMaximized())
32 | {
33 | LabViewer::instance()->showNormal();
34 | }
35 | else {
36 | LabViewer::instance()->showMaximized();
37 | }
38 | }
39 | else
40 | {
41 | if (QAction* action = LabViewer::instance()->getWeatherLabMenu()->GetAction(method))
42 | {
43 | action->trigger();
44 | }
45 |
46 | }
47 | }
48 |
49 | void Bridge::showMsgBox()
50 | {
51 | QMessageBox::aboutQt(0, tr("Qt"));
52 | }
--------------------------------------------------------------------------------
/src/Core/OCModel/src/ModelDataQueryCallback.cpp:
--------------------------------------------------------------------------------
1 | #include "ModelDataQueryCallback.h"
2 | #include "PipeLine.h"
3 | #include "PipeNode.h"
4 | #include "IModelTable.h"
5 |
6 | namespace OC
7 | {
8 | namespace Modeling
9 | {
10 | ModelDataQueryCallback::ModelDataQueryCallback(IModelTable* table,ModelDataQueryCallback::DataType type)
11 | :mTable(table)
12 | ,mType(type)
13 | {
14 |
15 | }
16 | ModelDataQueryCallback::~ModelDataQueryCallback()
17 | {
18 |
19 | }
20 |
21 | bool ModelDataQueryCallback::onQuery(TemplateRecord* record)
22 | {
23 | IModelData* data = NULL;
24 |
25 | switch(mType)
26 | {
27 | case Type_Line:
28 | {
29 | data = PipeLine::create(record);
30 | break;
31 | }
32 | case Type_Node:
33 | {
34 | data = PipeNode::create(record);
35 | break;
36 | }
37 | case Type_Mold:
38 | {
39 | //data = GenericMoldTable::createMoldData(mTable->getName(),record);
40 | break;
41 | }
42 | default:
43 | break;
44 | }
45 |
46 | if (data != NULL)
47 | {
48 | mTable->push_data(data);
49 | }
50 |
51 | return data != NULL;
52 | }
53 |
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/src/Core/OCesium/MapProject.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_MapProject_H__
2 | #define _OC_MapProject_H__
3 |
4 | #include "CesiumDefine.h"
5 |
6 | namespace OC
7 | {
8 | class _CesiumExport MapProject : public osg::Referenced
9 | {
10 | public:
11 | MapProject(String prjcs);
12 | ~MapProject(void);
13 |
14 | String getPrjcs();
15 | void setPrjcs(String prjcs);
16 | CVector2 localTo4326(CVector2 localPoint);
17 | CVector3 localTo4326(CVector3 localPoint);
18 | const osgEarth::SpatialReference* getProjectSRS() { return local_srs; }
19 | static CVector3 worldToLonLatH(CVector3 worldposition);
20 | static CVector3 toWorld(CVector3 LonLatHeight);
21 | static CVector3 toWorld(CVector2 LonLat);
22 | static osg::Matrix computeTransform(CVector2 LonLat);
23 | static osg::Matrix computeTransform(CVector3 LonLatH);
24 | static osg::BoundingBox computeRegion(CVector3 LonLatH, double tile_w, double tile_h);
25 | static CVector2 gaussToLH(double X, double Y, bool isSix = true);
26 | private:
27 | String mPrjcs;
28 | osgEarth::SpatialReference* local_srs;
29 | osgEarth::SpatialReference* wgs84_srs;
30 | };
31 | }
32 |
33 | #endif
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/src/Core/OCesium/src/CmptWriter.cpp:
--------------------------------------------------------------------------------
1 | #include "CmptWriter.h"
2 |
3 | namespace OC
4 | {namespace Cesium{
5 |
6 | CmptWriter::CmptWriter()
7 | {
8 |
9 | }
10 |
11 | CmptWriter::~CmptWriter()
12 | {
13 |
14 | }
15 |
16 | void CmptWriter::push(BaseWriter* object)
17 | {
18 | mTiles.push_back(object);
19 | }
20 |
21 | void CmptWriter::writeCmpt(String filename)
22 | {
23 | std::fstream fout(filename.c_str(), std::ios::out | std::ios::binary);
24 | if (!fout.is_open())
25 | return;
26 |
27 | cmptheader header;
28 | header.magic[0] = 'c', header.magic[1] = 'm', header.magic[2] = 'p', header.magic[3] = 't';
29 | header.version = 1;
30 | header.tilesLength = getLength();
31 |
32 | uint32 byteslength = sizeof(cmptheader);
33 | fout.seekp(byteslength);
34 |
35 | for (auto i : mTiles)
36 | {
37 | i->writeToStream(fout);
38 | byteslength += i->bytesLength();
39 | }
40 |
41 | header.byteLength = byteslength;
42 | fout.seekp(std::ios::beg);
43 | fout.write((const char*)&header, sizeof(cmptheader));
44 |
45 | fout.close();
46 | }
47 |
48 | uint32 CmptWriter::getLength()
49 | {
50 | return (uint32)mTiles.size();
51 | }
52 |
53 | }}//namespace
--------------------------------------------------------------------------------
/src/Core/OCMain/JsonPackage.h:
--------------------------------------------------------------------------------
1 | #ifndef _OC_JSONPACKAGE_H__
2 | #define _OC_JSONPACKAGE_H__
3 |
4 | #include "BaseDefine.h"
5 | #include "json/json.h"
6 |
7 | namespace OC
8 | {
9 | class _MainExport JsonPackage
10 | {
11 | public:
12 | JsonPackage();
13 | ~JsonPackage();
14 |
15 | static int getInt(Json::Value& obj,String key,int defaultVal = 1);
16 | static bool getBool(Json::Value& obj,String key,bool defaultVal = false);
17 | static double getDouble(Json::Value& obj,String key,double defaultVal = 0.0);
18 | static uint32 getUInt(Json::Value& obj,String key,uint32 defaultVal = 1);
19 | static String getString(Json::Value& obj,String key,String defaultVal = StringUtil::BLANK);
20 |
21 | void addNameVal(String name,int val);
22 | void addNameVal(String name,long val);
23 | void addNameVal(String name,double val);
24 | void addNameVal(String name,String val);
25 | void addNameVal(String name, CVector2 val);
26 | void addNameVal(String name, CVector3 val);
27 | void addNameVal(String name,JsonPackage& package);
28 |
29 | String toJSON();
30 | private:
31 | Json::Value mRoot;
32 | std::map mArrayCount;
33 | };
34 | }
35 |
36 |
37 | #endif
38 |
--------------------------------------------------------------------------------
/src/Core/OCMain/stl.h:
--------------------------------------------------------------------------------
1 | #ifndef __INCLUDE_STD__HEADERS_
2 | #define __INCLUDE_STD__HEADERS_
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 |
12 | // STL containers
13 | #include
14 | #include