From 795846f6eee1144a043dc4a479ed9ea21c86d3c5 Mon Sep 17 00:00:00 2001 From: Erik Broberg Date: Fri, 10 Jun 2016 11:53:26 -0400 Subject: [PATCH] Updated file structure and removed unused class GlobeMesh --- modules/globebrowsing/CMakeLists.txt | 72 +++++------ .../globebrowsing/{globes => chunk}/chunk.cpp | 4 +- .../globebrowsing/{globes => chunk}/chunk.h | 8 +- .../{globes => chunk}/chunkedlodglobe.cpp | 4 +- .../{globes => chunk}/chunkedlodglobe.h | 10 +- .../{globes => chunk}/chunkindex.cpp | 4 +- .../{globes => chunk}/chunkindex.h | 0 .../{globes => chunk}/chunknode.cpp | 6 +- .../{globes => chunk}/chunknode.h | 10 +- .../{rendering => chunk}/chunkrenderer.cpp | 4 +- .../{rendering => chunk}/chunkrenderer.h | 10 +- .../{rendering => chunk}/culling.cpp | 14 ++- .../{rendering => chunk}/culling.h | 6 +- .../{rendering => geometry}/aabb.cpp | 2 +- .../{rendering => geometry}/aabb.h | 0 .../{geodetics => geometry}/angle.h | 2 +- .../{geodetics => geometry}/angle.inl | 2 +- .../{geodetics => geometry}/ellipsoid.cpp | 2 +- .../{geodetics => geometry}/ellipsoid.h | 2 +- .../{geodetics => geometry}/geodetic2.cpp | 6 +- .../{geodetics => geometry}/geodetic2.h | 2 +- modules/globebrowsing/globebrowsingmodule.cpp | 2 - modules/globebrowsing/globes/globemesh.cpp | 115 ------------------ modules/globebrowsing/globes/globemesh.h | 66 ---------- .../globebrowsing/globes/renderableglobe.cpp | 4 +- .../globebrowsing/globes/renderableglobe.h | 12 +- .../{other => tile}/TileProviderManager.cpp | 3 +- .../{other => tile}/TileProviderManager.h | 5 +- .../{other => tile}/asynctilereader.cpp | 7 +- .../{other => tile}/asynctilereader.h | 5 +- .../layeredtextureshaderprovider.cpp | 2 +- .../layeredtextureshaderprovider.h | 0 .../{other => tile}/temporaltileprovider.cpp | 7 +- .../{other => tile}/temporaltileprovider.h | 6 +- .../{other => tile}/tiledataset.cpp | 7 +- .../{other => tile}/tiledataset.h | 2 +- .../{other => tile}/tileprovider.cpp | 9 +- .../{other => tile}/tileprovider.h | 7 +- 38 files changed, 137 insertions(+), 292 deletions(-) rename modules/globebrowsing/{globes => chunk}/chunk.cpp (98%) rename modules/globebrowsing/{globes => chunk}/chunk.h (94%) rename modules/globebrowsing/{globes => chunk}/chunkedlodglobe.cpp (98%) rename modules/globebrowsing/{globes => chunk}/chunkedlodglobe.h (95%) rename modules/globebrowsing/{globes => chunk}/chunkindex.cpp (97%) rename modules/globebrowsing/{globes => chunk}/chunkindex.h (100%) rename modules/globebrowsing/{globes => chunk}/chunknode.cpp (97%) rename modules/globebrowsing/{globes => chunk}/chunknode.h (93%) rename modules/globebrowsing/{rendering => chunk}/chunkrenderer.cpp (99%) rename modules/globebrowsing/{rendering => chunk}/chunkrenderer.h (93%) rename modules/globebrowsing/{rendering => chunk}/culling.cpp (97%) rename modules/globebrowsing/{rendering => chunk}/culling.h (95%) rename modules/globebrowsing/{rendering => geometry}/aabb.cpp (99%) rename modules/globebrowsing/{rendering => geometry}/aabb.h (100%) rename modules/globebrowsing/{geodetics => geometry}/angle.h (99%) rename modules/globebrowsing/{geodetics => geometry}/angle.inl (99%) rename modules/globebrowsing/{geodetics => geometry}/ellipsoid.cpp (99%) rename modules/globebrowsing/{geodetics => geometry}/ellipsoid.h (98%) rename modules/globebrowsing/{geodetics => geometry}/geodetic2.cpp (98%) rename modules/globebrowsing/{geodetics => geometry}/geodetic2.h (99%) delete mode 100644 modules/globebrowsing/globes/globemesh.cpp delete mode 100644 modules/globebrowsing/globes/globemesh.h rename modules/globebrowsing/{other => tile}/TileProviderManager.cpp (99%) rename modules/globebrowsing/{other => tile}/TileProviderManager.h (96%) rename modules/globebrowsing/{other => tile}/asynctilereader.cpp (96%) rename modules/globebrowsing/{other => tile}/asynctilereader.h (97%) rename modules/globebrowsing/{other => tile}/layeredtextureshaderprovider.cpp (98%) rename modules/globebrowsing/{other => tile}/layeredtextureshaderprovider.h (100%) rename modules/globebrowsing/{other => tile}/temporaltileprovider.cpp (98%) rename modules/globebrowsing/{other => tile}/temporaltileprovider.h (98%) rename modules/globebrowsing/{other => tile}/tiledataset.cpp (99%) rename modules/globebrowsing/{other => tile}/tiledataset.h (99%) rename modules/globebrowsing/{other => tile}/tileprovider.cpp (97%) rename modules/globebrowsing/{other => tile}/tileprovider.h (97%) diff --git a/modules/globebrowsing/CMakeLists.txt b/modules/globebrowsing/CMakeLists.txt index c3c5d5a322..d8bc91a8ec 100644 --- a/modules/globebrowsing/CMakeLists.txt +++ b/modules/globebrowsing/CMakeLists.txt @@ -27,70 +27,74 @@ include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake) set(HEADER_FILES ${CMAKE_CURRENT_SOURCE_DIR}/globes/renderableglobe.h - ${CMAKE_CURRENT_SOURCE_DIR}/globes/globemesh.h - ${CMAKE_CURRENT_SOURCE_DIR}/globes/chunkedlodglobe.h - ${CMAKE_CURRENT_SOURCE_DIR}/globes/chunknode.h - ${CMAKE_CURRENT_SOURCE_DIR}/globes/chunkindex.h - ${CMAKE_CURRENT_SOURCE_DIR}/globes/chunk.h + + ${CMAKE_CURRENT_SOURCE_DIR}/chunk/chunkedlodglobe.h + ${CMAKE_CURRENT_SOURCE_DIR}/chunk/chunknode.h + ${CMAKE_CURRENT_SOURCE_DIR}/chunk/chunkindex.h + ${CMAKE_CURRENT_SOURCE_DIR}/chunk/chunk.h + ${CMAKE_CURRENT_SOURCE_DIR}/chunk/chunkrenderer.h + ${CMAKE_CURRENT_SOURCE_DIR}/chunk/culling.h + ${CMAKE_CURRENT_SOURCE_DIR}/meshes/trianglesoup.h ${CMAKE_CURRENT_SOURCE_DIR}/meshes/grid.h ${CMAKE_CURRENT_SOURCE_DIR}/meshes/basicgrid.h ${CMAKE_CURRENT_SOURCE_DIR}/meshes/skirtedgrid.h - ${CMAKE_CURRENT_SOURCE_DIR}/geodetics/geodetic2.h - ${CMAKE_CURRENT_SOURCE_DIR}/geodetics/angle.h - ${CMAKE_CURRENT_SOURCE_DIR}/geodetics/ellipsoid.h + ${CMAKE_CURRENT_SOURCE_DIR}/geometry/geodetic2.h + ${CMAKE_CURRENT_SOURCE_DIR}/geometry/angle.h + ${CMAKE_CURRENT_SOURCE_DIR}/geometry/ellipsoid.h + ${CMAKE_CURRENT_SOURCE_DIR}/geometry/aabb.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/chunkrenderer.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/culling.h - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/aabb.h + ${CMAKE_CURRENT_SOURCE_DIR}/tile/temporaltileprovider.h + ${CMAKE_CURRENT_SOURCE_DIR}/tile/tileprovider.h + ${CMAKE_CURRENT_SOURCE_DIR}/tile/tiledataset.h + ${CMAKE_CURRENT_SOURCE_DIR}/tile/asynctilereader.h + ${CMAKE_CURRENT_SOURCE_DIR}/tile/tileprovidermanager.h + ${CMAKE_CURRENT_SOURCE_DIR}/tile/layeredtextureshaderprovider.h ${CMAKE_CURRENT_SOURCE_DIR}/other/distanceswitch.h - ${CMAKE_CURRENT_SOURCE_DIR}/other/temporaltileprovider.h - ${CMAKE_CURRENT_SOURCE_DIR}/other/tileprovider.h - ${CMAKE_CURRENT_SOURCE_DIR}/other/tiledataset.h - ${CMAKE_CURRENT_SOURCE_DIR}/other/asynctilereader.h ${CMAKE_CURRENT_SOURCE_DIR}/other/lrucache.h ${CMAKE_CURRENT_SOURCE_DIR}/other/concurrentjobmanager.h ${CMAKE_CURRENT_SOURCE_DIR}/other/threadpool.h ${CMAKE_CURRENT_SOURCE_DIR}/other/concurrentqueue.h - ${CMAKE_CURRENT_SOURCE_DIR}/other/tileprovidermanager.h - ${CMAKE_CURRENT_SOURCE_DIR}/other/layeredtextureshaderprovider.h + ) set(SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/globes/renderableglobe.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/globes/globemesh.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/globes/chunkedlodglobe.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/globes/chunknode.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/globes/chunkindex.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/globes/chunk.cpp + + ${CMAKE_CURRENT_SOURCE_DIR}/chunk/chunkedlodglobe.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/chunk/chunknode.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/chunk/chunkindex.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/chunk/chunk.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/chunk/chunkrenderer.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/chunk/culling.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/meshes/trianglesoup.cpp ${CMAKE_CURRENT_SOURCE_DIR}/meshes/grid.cpp ${CMAKE_CURRENT_SOURCE_DIR}/meshes/basicgrid.cpp ${CMAKE_CURRENT_SOURCE_DIR}/meshes/skirtedgrid.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/geodetics/geodetic2.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/geodetics/angle.inl - ${CMAKE_CURRENT_SOURCE_DIR}/geodetics/ellipsoid.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/geometry/geodetic2.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/geometry/angle.inl + ${CMAKE_CURRENT_SOURCE_DIR}/geometry/ellipsoid.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/geometry/aabb.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/chunkrenderer.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/culling.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/rendering/aabb.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tile/temporaltileprovider.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tile/tileprovider.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tile/tiledataset.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tile/asynctilereader.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tile/tileprovidermanager.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tile/layeredtextureshaderprovider.cpp ${CMAKE_CURRENT_SOURCE_DIR}/other/distanceswitch.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/other/temporaltileprovider.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/other/tileprovider.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/other/tiledataset.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/other/asynctilereader.cpp ${CMAKE_CURRENT_SOURCE_DIR}/other/lrucache.inl ${CMAKE_CURRENT_SOURCE_DIR}/other/concurrentjobmanager.inl ${CMAKE_CURRENT_SOURCE_DIR}/other/threadpool.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/other/tileprovidermanager.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/other/layeredtextureshaderprovider.cpp + ) source_group("Source Files" FILES ${SOURCE_FILES}) diff --git a/modules/globebrowsing/globes/chunk.cpp b/modules/globebrowsing/chunk/chunk.cpp similarity index 98% rename from modules/globebrowsing/globes/chunk.cpp rename to modules/globebrowsing/chunk/chunk.cpp index c8c24d8b2f..943f2a3f8d 100644 --- a/modules/globebrowsing/globes/chunk.cpp +++ b/modules/globebrowsing/chunk/chunk.cpp @@ -27,8 +27,8 @@ #include -#include -#include +#include +#include #include diff --git a/modules/globebrowsing/globes/chunk.h b/modules/globebrowsing/chunk/chunk.h similarity index 94% rename from modules/globebrowsing/globes/chunk.h rename to modules/globebrowsing/chunk/chunk.h index df223d2d63..31953ad839 100644 --- a/modules/globebrowsing/globes/chunk.h +++ b/modules/globebrowsing/chunk/chunk.h @@ -30,11 +30,11 @@ #include #include -#include +#include +#include -#include -#include -#include +#include +#include namespace openspace { diff --git a/modules/globebrowsing/globes/chunkedlodglobe.cpp b/modules/globebrowsing/chunk/chunkedlodglobe.cpp similarity index 98% rename from modules/globebrowsing/globes/chunkedlodglobe.cpp rename to modules/globebrowsing/chunk/chunkedlodglobe.cpp index cecd5fb6b7..59601f3ec9 100644 --- a/modules/globebrowsing/globes/chunkedlodglobe.cpp +++ b/modules/globebrowsing/chunk/chunkedlodglobe.cpp @@ -22,10 +22,10 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include +#include #include -#include +#include // open space includes #include diff --git a/modules/globebrowsing/globes/chunkedlodglobe.h b/modules/globebrowsing/chunk/chunkedlodglobe.h similarity index 95% rename from modules/globebrowsing/globes/chunkedlodglobe.h rename to modules/globebrowsing/chunk/chunkedlodglobe.h index d28a218093..fda448708d 100644 --- a/modules/globebrowsing/globes/chunkedlodglobe.h +++ b/modules/globebrowsing/chunk/chunkedlodglobe.h @@ -38,10 +38,12 @@ #include -#include -#include -#include -#include +#include + +#include +#include + +#include namespace ghoul { namespace opengl { diff --git a/modules/globebrowsing/globes/chunkindex.cpp b/modules/globebrowsing/chunk/chunkindex.cpp similarity index 97% rename from modules/globebrowsing/globes/chunkindex.cpp rename to modules/globebrowsing/chunk/chunkindex.cpp index 06af21d7df..edc05e9edf 100644 --- a/modules/globebrowsing/globes/chunkindex.cpp +++ b/modules/globebrowsing/chunk/chunkindex.cpp @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include -#include +#include +#include namespace { diff --git a/modules/globebrowsing/globes/chunkindex.h b/modules/globebrowsing/chunk/chunkindex.h similarity index 100% rename from modules/globebrowsing/globes/chunkindex.h rename to modules/globebrowsing/chunk/chunkindex.h diff --git a/modules/globebrowsing/globes/chunknode.cpp b/modules/globebrowsing/chunk/chunknode.cpp similarity index 97% rename from modules/globebrowsing/globes/chunknode.cpp rename to modules/globebrowsing/chunk/chunknode.cpp index dd0b64c5d1..92e7cc62d6 100644 --- a/modules/globebrowsing/globes/chunknode.cpp +++ b/modules/globebrowsing/chunk/chunknode.cpp @@ -29,9 +29,9 @@ #include #include -#include -#include -#include +#include +#include +#include namespace { diff --git a/modules/globebrowsing/globes/chunknode.h b/modules/globebrowsing/chunk/chunknode.h similarity index 93% rename from modules/globebrowsing/globes/chunknode.h rename to modules/globebrowsing/chunk/chunknode.h index a32c5a9719..2ad4337a16 100644 --- a/modules/globebrowsing/globes/chunknode.h +++ b/modules/globebrowsing/chunk/chunknode.h @@ -31,10 +31,12 @@ #include #include -#include -#include -#include -#include +#include +#include +#include + +#include + diff --git a/modules/globebrowsing/rendering/chunkrenderer.cpp b/modules/globebrowsing/chunk/chunkrenderer.cpp similarity index 99% rename from modules/globebrowsing/rendering/chunkrenderer.cpp rename to modules/globebrowsing/chunk/chunkrenderer.cpp index 0554c1d953..463de9c309 100644 --- a/modules/globebrowsing/rendering/chunkrenderer.cpp +++ b/modules/globebrowsing/chunk/chunkrenderer.cpp @@ -23,8 +23,8 @@ ****************************************************************************************/ -#include -#include +#include +#include // open space includes #include diff --git a/modules/globebrowsing/rendering/chunkrenderer.h b/modules/globebrowsing/chunk/chunkrenderer.h similarity index 93% rename from modules/globebrowsing/rendering/chunkrenderer.h rename to modules/globebrowsing/chunk/chunkrenderer.h index 5dde331563..e2956c2545 100644 --- a/modules/globebrowsing/rendering/chunkrenderer.h +++ b/modules/globebrowsing/chunk/chunkrenderer.h @@ -31,15 +31,15 @@ // open space includes #include -#include -#include +#include +#include #include -#include -#include +#include +#include -#include +#include namespace ghoul { namespace opengl { diff --git a/modules/globebrowsing/rendering/culling.cpp b/modules/globebrowsing/chunk/culling.cpp similarity index 97% rename from modules/globebrowsing/rendering/culling.cpp rename to modules/globebrowsing/chunk/culling.cpp index e306797cd9..43395fc7be 100644 --- a/modules/globebrowsing/rendering/culling.cpp +++ b/modules/globebrowsing/chunk/culling.cpp @@ -23,10 +23,16 @@ ****************************************************************************************/ -#include -#include -#include -#include + + + +#include +#include +#include + + +#include + #include namespace { diff --git a/modules/globebrowsing/rendering/culling.h b/modules/globebrowsing/chunk/culling.h similarity index 95% rename from modules/globebrowsing/rendering/culling.h rename to modules/globebrowsing/chunk/culling.h index a6d28d51c1..3ed58b422d 100644 --- a/modules/globebrowsing/rendering/culling.h +++ b/modules/globebrowsing/chunk/culling.h @@ -31,9 +31,9 @@ // open space includes #include -#include -#include -#include +#include +#include +#include diff --git a/modules/globebrowsing/rendering/aabb.cpp b/modules/globebrowsing/geometry/aabb.cpp similarity index 99% rename from modules/globebrowsing/rendering/aabb.cpp rename to modules/globebrowsing/geometry/aabb.cpp index d9b519ca94..41536297ad 100644 --- a/modules/globebrowsing/rendering/aabb.cpp +++ b/modules/globebrowsing/geometry/aabb.cpp @@ -23,7 +23,7 @@ ****************************************************************************************/ -#include +#include #include diff --git a/modules/globebrowsing/rendering/aabb.h b/modules/globebrowsing/geometry/aabb.h similarity index 100% rename from modules/globebrowsing/rendering/aabb.h rename to modules/globebrowsing/geometry/aabb.h diff --git a/modules/globebrowsing/geodetics/angle.h b/modules/globebrowsing/geometry/angle.h similarity index 99% rename from modules/globebrowsing/geodetics/angle.h rename to modules/globebrowsing/geometry/angle.h index fc3e1a4692..38af821533 100644 --- a/modules/globebrowsing/geodetics/angle.h +++ b/modules/globebrowsing/geometry/angle.h @@ -177,7 +177,7 @@ using fAngle = Angle; -#include +#include diff --git a/modules/globebrowsing/geodetics/angle.inl b/modules/globebrowsing/geometry/angle.inl similarity index 99% rename from modules/globebrowsing/geodetics/angle.inl rename to modules/globebrowsing/geometry/angle.inl index e40f636b3d..a4cc312198 100644 --- a/modules/globebrowsing/geodetics/angle.inl +++ b/modules/globebrowsing/geometry/angle.inl @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include +#include diff --git a/modules/globebrowsing/geodetics/ellipsoid.cpp b/modules/globebrowsing/geometry/ellipsoid.cpp similarity index 99% rename from modules/globebrowsing/geodetics/ellipsoid.cpp rename to modules/globebrowsing/geometry/ellipsoid.cpp index cd37885a85..9c8fc8270f 100644 --- a/modules/globebrowsing/geodetics/ellipsoid.cpp +++ b/modules/globebrowsing/geometry/ellipsoid.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include +#include #define _USE_MATH_DEFINES #include diff --git a/modules/globebrowsing/geodetics/ellipsoid.h b/modules/globebrowsing/geometry/ellipsoid.h similarity index 98% rename from modules/globebrowsing/geodetics/ellipsoid.h rename to modules/globebrowsing/geometry/ellipsoid.h index 4f54a6727f..041d729ccd 100644 --- a/modules/globebrowsing/geodetics/ellipsoid.h +++ b/modules/globebrowsing/geometry/ellipsoid.h @@ -25,7 +25,7 @@ #ifndef __ELLIPSOID_H__ #define __ELLIPSOID_H__ -#include +#include namespace openspace { diff --git a/modules/globebrowsing/geodetics/geodetic2.cpp b/modules/globebrowsing/geometry/geodetic2.cpp similarity index 98% rename from modules/globebrowsing/geodetics/geodetic2.cpp rename to modules/globebrowsing/geometry/geodetic2.cpp index da8808fbeb..55e1d2e743 100644 --- a/modules/globebrowsing/geodetics/geodetic2.cpp +++ b/modules/globebrowsing/geometry/geodetic2.cpp @@ -22,9 +22,9 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include -#include -#include +#include +#include +#include #include diff --git a/modules/globebrowsing/geodetics/geodetic2.h b/modules/globebrowsing/geometry/geodetic2.h similarity index 99% rename from modules/globebrowsing/geodetics/geodetic2.h rename to modules/globebrowsing/geometry/geodetic2.h index ac4e8d2f22..a87f357e04 100644 --- a/modules/globebrowsing/geodetics/geodetic2.h +++ b/modules/globebrowsing/geometry/geodetic2.h @@ -33,7 +33,7 @@ #define _USE_MATH_DEFINES #include -#include +#include #include diff --git a/modules/globebrowsing/globebrowsingmodule.cpp b/modules/globebrowsing/globebrowsingmodule.cpp index f8402d11f3..510938e4cc 100644 --- a/modules/globebrowsing/globebrowsingmodule.cpp +++ b/modules/globebrowsing/globebrowsingmodule.cpp @@ -26,7 +26,6 @@ #include #include -#include #include #include @@ -63,7 +62,6 @@ void GlobeBrowsingModule::internalInitialize() { ghoul_assert(fRenderable, "Renderable factory was not created"); fRenderable->registerClass("RenderableGlobe"); - fRenderable->registerClass("GlobeMesh"); } } // namespace openspace diff --git a/modules/globebrowsing/globes/globemesh.cpp b/modules/globebrowsing/globes/globemesh.cpp deleted file mode 100644 index 509ae9787e..0000000000 --- a/modules/globebrowsing/globes/globemesh.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/***************************************************************************************** -* * -* OpenSpace * -* * -* Copyright (c) 2014-2016 * -* * -* Permission is hereby granted, free of charge, to any person obtaining a copy of this * -* software and associated documentation files (the "Software"), to deal in the Software * -* without restriction, including without limitation the rights to use, copy, modify, * -* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * -* permit persons to whom the Software is furnished to do so, subject to the following * -* conditions: * -* * -* The above copyright notice and this permission notice shall be included in all copies * -* or substantial portions of the Software. * -* * -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * -* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * -* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * -* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * -* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * -* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * -****************************************************************************************/ - -#include - -// open space includes -#include -#include -#include -#include - -// ghoul includes -#include - -#define _USE_MATH_DEFINES -#include - -namespace { - const std::string _loggerCat = "GlobeMesh"; -} - -namespace openspace { - GlobeMesh::GlobeMesh() - : _programObject(nullptr) - , _grid(10, 10, TriangleSoup::Positions::Yes, TriangleSoup::TextureCoordinates::No, TriangleSoup::Normals::No) - { - - } - - GlobeMesh::~GlobeMesh() { - } - - bool GlobeMesh::initialize() { - - RenderEngine& renderEngine = OsEng.renderEngine(); - if (_programObject == nullptr) { - _programObject = renderEngine.buildRenderProgram( - "simpleTextureProgram", - "${MODULE_GLOBEBROWSING}/shaders/simple_vs.glsl", - "${MODULE_GLOBEBROWSING}/shaders/simple_fs.glsl"); - if (!_programObject) return false; - } - - using IgnoreError = ghoul::opengl::ProgramObject::IgnoreError; - _programObject->setIgnoreSubroutineUniformLocationError(IgnoreError::Yes); - - return isReady(); - } - - bool GlobeMesh::deinitialize() { - - RenderEngine& renderEngine = OsEng.renderEngine(); - if (_programObject) { - renderEngine.removeRenderProgram(_programObject); - _programObject = nullptr; - } - - return true; - } - - bool GlobeMesh::isReady() const { - bool ready = true; - ready &= (_programObject != nullptr); - return ready; - } - - void GlobeMesh::render(const RenderData& data) - { - // activate shader - _programObject->activate(); - - // scale the planet to appropriate size since the planet is a unit sphere. Ehm no? - glm::mat4 transform = glm::mat4(1); - - // setup the data to the shader - // _programObject->setUniform("camdir", camSpaceEye); - _programObject->setUniform("ViewProjection", data.camera.viewProjectionMatrix()); - _programObject->setUniform("ModelTransform", transform); - setPscUniforms(*_programObject.get(), data.camera, data.position); - - glDisable(GL_CULL_FACE); - //glCullFace(GL_BACK); - - // render - _grid.geometry().drawUsingActiveProgram(); - - // disable shader - _programObject->deactivate(); - } - - void GlobeMesh::update(const UpdateData& data) { - } - -} // namespace openspace diff --git a/modules/globebrowsing/globes/globemesh.h b/modules/globebrowsing/globes/globemesh.h deleted file mode 100644 index 8eb031b98f..0000000000 --- a/modules/globebrowsing/globes/globemesh.h +++ /dev/null @@ -1,66 +0,0 @@ -/***************************************************************************************** -* * -* OpenSpace * -* * -* Copyright (c) 2014-2016 * -* * -* Permission is hereby granted, free of charge, to any person obtaining a copy of this * -* software and associated documentation files (the "Software"), to deal in the Software * -* without restriction, including without limitation the rights to use, copy, modify, * -* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * -* permit persons to whom the Software is furnished to do so, subject to the following * -* conditions: * -* * -* The above copyright notice and this permission notice shall be included in all copies * -* or substantial portions of the Software. * -* * -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * -* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * -* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * -* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * -* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * -* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * -****************************************************************************************/ - -#ifndef __GLOBEMESH_H__ -#define __GLOBEMESH_H__ - -// open space includes -#include - -#include -#include - -#include -#include -#include - -namespace ghoul { - namespace opengl { - class ProgramObject; - } -} - -namespace openspace { - - class GlobeMesh : public Renderable { - public: - GlobeMesh(); - virtual ~GlobeMesh(); - - bool initialize() override; - bool deinitialize() override; - bool isReady() const override; - - void render(const RenderData& data) override; - void update(const UpdateData& data) override; - - private: - std::unique_ptr _programObject; - - BasicGrid _grid; - }; - -} // namespace openspace - -#endif // __GLOBEMESH_H__ \ No newline at end of file diff --git a/modules/globebrowsing/globes/renderableglobe.cpp b/modules/globebrowsing/globes/renderableglobe.cpp index 010297738b..c76c097686 100644 --- a/modules/globebrowsing/globes/renderableglobe.cpp +++ b/modules/globebrowsing/globes/renderableglobe.cpp @@ -23,9 +23,9 @@ ****************************************************************************************/ #include -#include + #include -#include +#include // open space includes #include diff --git a/modules/globebrowsing/globes/renderableglobe.h b/modules/globebrowsing/globes/renderableglobe.h index 7ca2aef429..917229f5d9 100644 --- a/modules/globebrowsing/globes/renderableglobe.h +++ b/modules/globebrowsing/globes/renderableglobe.h @@ -35,13 +35,15 @@ #include #include -#include -#include -#include -#include -#include +#include + +#include + +#include + #include +#include namespace ghoul { namespace opengl { diff --git a/modules/globebrowsing/other/TileProviderManager.cpp b/modules/globebrowsing/tile/TileProviderManager.cpp similarity index 99% rename from modules/globebrowsing/other/TileProviderManager.cpp rename to modules/globebrowsing/tile/TileProviderManager.cpp index 3d1121796e..d5df9f0046 100644 --- a/modules/globebrowsing/other/TileProviderManager.cpp +++ b/modules/globebrowsing/tile/TileProviderManager.cpp @@ -22,7 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include +#include + #include #include "cpl_minixml.h" diff --git a/modules/globebrowsing/other/TileProviderManager.h b/modules/globebrowsing/tile/TileProviderManager.h similarity index 96% rename from modules/globebrowsing/other/TileProviderManager.h rename to modules/globebrowsing/tile/TileProviderManager.h index 3155370691..f2dc5e176d 100644 --- a/modules/globebrowsing/other/TileProviderManager.h +++ b/modules/globebrowsing/tile/TileProviderManager.h @@ -26,8 +26,9 @@ #define __TILE_PROVIDER_MANAGER_H__ -#include -#include +#include +#include + #include #include diff --git a/modules/globebrowsing/other/asynctilereader.cpp b/modules/globebrowsing/tile/asynctilereader.cpp similarity index 96% rename from modules/globebrowsing/other/asynctilereader.cpp rename to modules/globebrowsing/tile/asynctilereader.cpp index 0e9cb5b481..fcce97d5b9 100644 --- a/modules/globebrowsing/other/asynctilereader.cpp +++ b/modules/globebrowsing/tile/asynctilereader.cpp @@ -27,9 +27,10 @@ #include // abspath #include -#include -#include -#include +#include +#include + +#include namespace { const std::string _loggerCat = "AsyncTextureDataProvider"; diff --git a/modules/globebrowsing/other/asynctilereader.h b/modules/globebrowsing/tile/asynctilereader.h similarity index 97% rename from modules/globebrowsing/other/asynctilereader.h rename to modules/globebrowsing/tile/asynctilereader.h index 9d3667b008..acf69e8e5e 100644 --- a/modules/globebrowsing/other/asynctilereader.h +++ b/modules/globebrowsing/tile/asynctilereader.h @@ -30,11 +30,12 @@ #include -#include +#include #include #include -#include + +#include #include #include diff --git a/modules/globebrowsing/other/layeredtextureshaderprovider.cpp b/modules/globebrowsing/tile/layeredtextureshaderprovider.cpp similarity index 98% rename from modules/globebrowsing/other/layeredtextureshaderprovider.cpp rename to modules/globebrowsing/tile/layeredtextureshaderprovider.cpp index 9544fd550f..77e90e57c8 100644 --- a/modules/globebrowsing/other/layeredtextureshaderprovider.cpp +++ b/modules/globebrowsing/tile/layeredtextureshaderprovider.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include +#include #include #include diff --git a/modules/globebrowsing/other/layeredtextureshaderprovider.h b/modules/globebrowsing/tile/layeredtextureshaderprovider.h similarity index 100% rename from modules/globebrowsing/other/layeredtextureshaderprovider.h rename to modules/globebrowsing/tile/layeredtextureshaderprovider.h diff --git a/modules/globebrowsing/other/temporaltileprovider.cpp b/modules/globebrowsing/tile/temporaltileprovider.cpp similarity index 98% rename from modules/globebrowsing/other/temporaltileprovider.cpp rename to modules/globebrowsing/tile/temporaltileprovider.cpp index 9f3b206e49..8eae51a155 100644 --- a/modules/globebrowsing/other/temporaltileprovider.cpp +++ b/modules/globebrowsing/tile/temporaltileprovider.cpp @@ -22,10 +22,11 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include -#include +#include -#include +#include + +#include #include diff --git a/modules/globebrowsing/other/temporaltileprovider.h b/modules/globebrowsing/tile/temporaltileprovider.h similarity index 98% rename from modules/globebrowsing/other/temporaltileprovider.h rename to modules/globebrowsing/tile/temporaltileprovider.h index f58578f4bf..0c6bad3be8 100644 --- a/modules/globebrowsing/other/temporaltileprovider.h +++ b/modules/globebrowsing/tile/temporaltileprovider.h @@ -28,8 +28,10 @@ #include -#include -#include +#include + +#include + #include #include diff --git a/modules/globebrowsing/other/tiledataset.cpp b/modules/globebrowsing/tile/tiledataset.cpp similarity index 99% rename from modules/globebrowsing/other/tiledataset.cpp rename to modules/globebrowsing/tile/tiledataset.cpp index 564be88140..15da1bd632 100644 --- a/modules/globebrowsing/other/tiledataset.cpp +++ b/modules/globebrowsing/tile/tiledataset.cpp @@ -27,9 +27,10 @@ #include // abspath #include -#include -#include -#include +#include +#include + +#include #include diff --git a/modules/globebrowsing/other/tiledataset.h b/modules/globebrowsing/tile/tiledataset.h similarity index 99% rename from modules/globebrowsing/other/tiledataset.h rename to modules/globebrowsing/tile/tiledataset.h index 2fed6e554a..9f835f37ba 100644 --- a/modules/globebrowsing/other/tiledataset.h +++ b/modules/globebrowsing/tile/tiledataset.h @@ -29,7 +29,7 @@ #include -#include +#include #include #include "gdal_priv.h" diff --git a/modules/globebrowsing/other/tileprovider.cpp b/modules/globebrowsing/tile/tileprovider.cpp similarity index 97% rename from modules/globebrowsing/other/tileprovider.cpp rename to modules/globebrowsing/tile/tileprovider.cpp index d6f0aa8f2b..fc69a280e3 100644 --- a/modules/globebrowsing/other/tileprovider.cpp +++ b/modules/globebrowsing/tile/tileprovider.cpp @@ -22,11 +22,12 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include -#include -#include +#include -#include +#include +#include + +#include #include diff --git a/modules/globebrowsing/other/tileprovider.h b/modules/globebrowsing/tile/tileprovider.h similarity index 97% rename from modules/globebrowsing/other/tileprovider.h rename to modules/globebrowsing/tile/tileprovider.h index de1fe309f6..e71eabdbc3 100644 --- a/modules/globebrowsing/other/tileprovider.h +++ b/modules/globebrowsing/tile/tileprovider.h @@ -35,9 +35,12 @@ #include #include -#include +#include + +#include + #include -#include + ////////////////////////////////////////////////////////////////////////////////////////// // TILE PROVIDER //