From 523abd65298c4fb1cf55f39ee7c1018c5b9fa898 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Wed, 20 May 2015 19:19:10 +0200 Subject: [PATCH] Modularized the base classes --- CMakeLists.txt | 1 + include/openspace/engine/moduleengine.h | 50 ++++++++++ include/openspace/engine/openspaceengine.h | 3 + include/openspace/util/openspacemodule.h | 50 ++++++++++ modules/base/CMakeLists.txt | 46 +++++++++ modules/base/basemodule.cpp | 88 +++++++++++++++++ modules/base/basemodule.h | 40 ++++++++ .../base/rendering}/modelgeometry.cpp | 4 +- .../base/rendering}/modelgeometry.h | 2 +- .../base/rendering}/planetgeometry.cpp | 2 +- .../base/rendering}/planetgeometry.h | 2 +- .../renderableconstellationbounds.cpp | 2 +- .../renderableconstellationbounds.h | 0 .../rendering/renderablecrawlingline.cpp | 4 +- .../base}/rendering/renderablecrawlingline.h | 0 .../base}/rendering/renderablefieldlines.cpp | 2 +- .../base}/rendering/renderablefieldlines.h | 0 .../base/rendering}/renderablemodel.cpp | 5 +- .../base/rendering}/renderablemodel.h | 0 .../base}/rendering/renderablepath.cpp | 2 +- .../base}/rendering/renderablepath.h | 0 .../base}/rendering/renderableplane.cpp | 2 +- .../base}/rendering/renderableplane.h | 0 .../base/rendering}/renderableplanet.cpp | 4 +- .../base/rendering}/renderableplanet.h | 0 .../base}/rendering/renderablesphere.cpp | 2 +- .../base}/rendering/renderablesphere.h | 0 .../rendering/renderablesphericalgrid.cpp | 2 +- .../base}/rendering/renderablesphericalgrid.h | 0 .../base/rendering}/renderablestars.cpp | 2 +- .../base/rendering}/renderablestars.h | 0 .../base}/rendering/renderabletrail.cpp | 2 +- .../base}/rendering/renderabletrail.h | 0 .../base/rendering}/simplespheregeometry.cpp | 2 +- .../base/rendering}/simplespheregeometry.h | 2 +- .../base/rendering}/wavefrontgeometry.cpp | 2 +- .../base/rendering}/wavefrontgeometry.h | 2 +- .../rendering}/planetgeometryprojection.cpp | 0 .../rendering}/planetgeometryprojection.h | 0 .../projection}/rendering/renderablefov.cpp | 0 .../projection}/rendering/renderablefov.h | 0 .../rendering/renderableplaneprojection.cpp | 0 .../rendering/renderableplaneprojection.h | 0 .../rendering}/renderableplanetprojection.cpp | 0 .../rendering}/renderableplanetprojection.h | 0 .../simplespheregeometryprojection.cpp | 0 .../simplespheregeometryprojection.h | 0 .../projection/rendering}/writeToTexture.h | 0 .../volume}/rendering/renderablevolume.cpp | 0 .../volume}/rendering/renderablevolume.h | 0 .../volume}/rendering/renderablevolumegl.cpp | 0 .../volume}/rendering/renderablevolumegl.h | 0 openspace.cfg | 2 +- src/CMakeLists.txt | 4 + src/engine/moduleengine.cpp | 76 +++++++++++++++ src/engine/openspaceengine.cpp | 22 ++++- src/rendering/renderengine.cpp | 3 +- src/scene/scene.cpp | 2 +- src/scene/scenegraph.cpp | 6 +- src/scene/scenegraphnode.cpp | 2 + src/util/factorymanager.cpp | 95 ++++++------------- 61 files changed, 438 insertions(+), 99 deletions(-) create mode 100644 include/openspace/engine/moduleengine.h create mode 100644 include/openspace/util/openspacemodule.h create mode 100644 modules/base/CMakeLists.txt create mode 100644 modules/base/basemodule.cpp create mode 100644 modules/base/basemodule.h rename {src/rendering/model => modules/base/rendering}/modelgeometry.cpp (98%) rename {include/openspace/rendering/model => modules/base/rendering}/modelgeometry.h (98%) rename {src/rendering/planets => modules/base/rendering}/planetgeometry.cpp (98%) rename {include/openspace/rendering/planets => modules/base/rendering}/planetgeometry.h (97%) rename {src/rendering/stars => modules/base/rendering}/renderableconstellationbounds.cpp (99%) rename {include/openspace/rendering/stars => modules/base/rendering}/renderableconstellationbounds.h (100%) rename {src => modules/base}/rendering/renderablecrawlingline.cpp (98%) rename {include/openspace => modules/base}/rendering/renderablecrawlingline.h (100%) rename {src => modules/base}/rendering/renderablefieldlines.cpp (99%) rename {include/openspace => modules/base}/rendering/renderablefieldlines.h (100%) rename {src/rendering/model => modules/base/rendering}/renderablemodel.cpp (98%) rename {include/openspace/rendering/model => modules/base/rendering}/renderablemodel.h (100%) rename {src => modules/base}/rendering/renderablepath.cpp (99%) rename {include/openspace => modules/base}/rendering/renderablepath.h (100%) rename {src => modules/base}/rendering/renderableplane.cpp (99%) rename {include/openspace => modules/base}/rendering/renderableplane.h (100%) rename {src/rendering/planets => modules/base/rendering}/renderableplanet.cpp (98%) rename {include/openspace/rendering/planets => modules/base/rendering}/renderableplanet.h (100%) rename {src => modules/base}/rendering/renderablesphere.cpp (99%) rename {include/openspace => modules/base}/rendering/renderablesphere.h (100%) rename {src => modules/base}/rendering/renderablesphericalgrid.cpp (99%) rename {include/openspace => modules/base}/rendering/renderablesphericalgrid.h (100%) rename {src/rendering/stars => modules/base/rendering}/renderablestars.cpp (99%) rename {include/openspace/rendering/stars => modules/base/rendering}/renderablestars.h (100%) rename {src => modules/base}/rendering/renderabletrail.cpp (99%) rename {include/openspace => modules/base}/rendering/renderabletrail.h (100%) rename {src/rendering/planets => modules/base/rendering}/simplespheregeometry.cpp (98%) rename {include/openspace/rendering/planets => modules/base/rendering}/simplespheregeometry.h (98%) rename {src/rendering/model => modules/base/rendering}/wavefrontgeometry.cpp (98%) rename {include/openspace/rendering/model => modules/base/rendering}/wavefrontgeometry.h (97%) rename {src/rendering/planets => modules/projection/rendering}/planetgeometryprojection.cpp (100%) rename {include/openspace/rendering/planets => modules/projection/rendering}/planetgeometryprojection.h (100%) rename {src => modules/projection}/rendering/renderablefov.cpp (100%) rename {include/openspace => modules/projection}/rendering/renderablefov.h (100%) rename {src => modules/projection}/rendering/renderableplaneprojection.cpp (100%) rename {include/openspace => modules/projection}/rendering/renderableplaneprojection.h (100%) rename {src/rendering/planets => modules/projection/rendering}/renderableplanetprojection.cpp (100%) rename {include/openspace/rendering/planets => modules/projection/rendering}/renderableplanetprojection.h (100%) rename {src/rendering/planets => modules/projection/rendering}/simplespheregeometryprojection.cpp (100%) rename {include/openspace/rendering/planets => modules/projection/rendering}/simplespheregeometryprojection.h (100%) rename {include/openspace/rendering/planets => modules/projection/rendering}/writeToTexture.h (100%) rename {src => modules/volume}/rendering/renderablevolume.cpp (100%) rename {include/openspace => modules/volume}/rendering/renderablevolume.h (100%) rename {src => modules/volume}/rendering/renderablevolumegl.cpp (100%) rename {include/openspace => modules/volume}/rendering/renderablevolumegl.h (100%) create mode 100644 src/engine/moduleengine.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index be0d4644c7..efa5b8982f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,6 +145,7 @@ endif () ######################################################################################### add_subdirectory(src) +add_subdirectory(modules/base) option(BUILD_GUI_APPLICATIONS "Build GUI Applications" OFF) if (BUILD_GUI_APPLICATIONS) diff --git a/include/openspace/engine/moduleengine.h b/include/openspace/engine/moduleengine.h new file mode 100644 index 0000000000..229af21f84 --- /dev/null +++ b/include/openspace/engine/moduleengine.h @@ -0,0 +1,50 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2015 * + * * + * 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 __MODULEENGINE_H__ +#define __MODULEENGINE_H__ + +#include + +namespace openspace { + +class OpenSpaceModule; + +class ModuleEngine { +public: + bool initialize(); + bool deinitialize(); + + void registerModules(std::vector modules); + void registerModule(OpenSpaceModule* module); + const std::vector modules() const; + +protected: + std::vector _modules; +}; + + +} // namespace openspace + +#endif // __MODULEENGINE_H__ diff --git a/include/openspace/engine/openspaceengine.h b/include/openspace/engine/openspaceengine.h index e4b593d97c..78956f5a6a 100644 --- a/include/openspace/engine/openspaceengine.h +++ b/include/openspace/engine/openspaceengine.h @@ -44,6 +44,7 @@ class NetworkEngine; class GUI; class RenderEngine; class SyncBuffer; +class ModuleEngine; namespace interaction { class InteractionHandler; @@ -71,6 +72,7 @@ public: scripting::ScriptEngine* scriptEngine(); NetworkEngine* networkEngine(); LuaConsole* console(); + ModuleEngine* moduleEngine(); gui::GUI* gui(); @@ -116,6 +118,7 @@ private: NetworkEngine* _networkEngine; ghoul::cmdparser::CommandlineParser* _commandlineParser; LuaConsole* _console; + ModuleEngine* _moduleEngine; gui::GUI* _gui; bool _isMaster; diff --git a/include/openspace/util/openspacemodule.h b/include/openspace/util/openspacemodule.h new file mode 100644 index 0000000000..b0a73522ac --- /dev/null +++ b/include/openspace/util/openspacemodule.h @@ -0,0 +1,50 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2015 * + * * + * 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 __OPENSPACEMODULE_H__ +#define __OPENSPACEMODULE_H__ + +#include + +namespace openspace { + +class OpenSpaceModule { +public: + OpenSpaceModule() = default; + virtual ~OpenSpaceModule() = default; + + virtual bool initialize() { return true; } + virtual bool deinitialize() { return true; } + + std::string name() const { return _name; } + +protected: + void setName(std::string name) { _name = std::move(name); } + + std::string _name; +}; + +} // namespace openspace + +#endif // __OPENSPACEMODULE_H__ diff --git a/modules/base/CMakeLists.txt b/modules/base/CMakeLists.txt new file mode 100644 index 0000000000..151f1ca882 --- /dev/null +++ b/modules/base/CMakeLists.txt @@ -0,0 +1,46 @@ +set(HEADER_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/modelgeometry.h + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/planetgeometry.h + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableconstellationbounds.h + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablecrawlingline.h + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablefieldlines.h + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablemodel.h + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablepath.h + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplane.h + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplanet.h + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablesphere.h + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablesphericalgrid.h + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablestars.h + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletrail.h + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/simplespheregeometry.h + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/wavefrontgeometry.h +) +source_group("Header Files" FILES ${HEADER_FILES}) + +set(SOURCE_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/modelgeometry.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/planetgeometry.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableconstellationbounds.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablecrawlingline.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablefieldlines.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablemodel.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablepath.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplane.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplanet.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablesphere.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablesphericalgrid.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablestars.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletrail.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/simplespheregeometry.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/wavefrontgeometry.cpp +) +source_group("Source Files" FILES ${SOURCE_FILES}) + +set(MODULE_CLASS_FILES + ${CMAKE_CURRENT_SOURCE_DIR}/basemodule.h + ${CMAKE_CURRENT_SOURCE_DIR}/basemodule.cpp +) + +include_directories(${OPENSPACE_BASE_DIR}/include ${OPENSPACE_BASE_DIR}) + +add_library(openspace-module-base ${HEADER_FILES} ${SOURCE_FILES} ${MODULE_CLASS_FILES}) diff --git a/modules/base/basemodule.cpp b/modules/base/basemodule.cpp new file mode 100644 index 0000000000..bcf820d7b9 --- /dev/null +++ b/modules/base/basemodule.cpp @@ -0,0 +1,88 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2015 * + * * + * 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 + +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace { + const std::string _loggerCat = "BaseModule"; +} + +namespace openspace { + +bool BaseModule::initialize() { + FactoryManager::ref().addFactory(new ghoul::TemplateFactory); + FactoryManager::ref().addFactory(new ghoul::TemplateFactory); + + auto fRenderable = FactoryManager::ref().factory(); + ghoul_assert(fRenderable, "No renderable factory existed"); + + fRenderable->registerClass("RenderablePlanet"); + fRenderable->registerClass("RenderableStars"); + fRenderable->registerClass("RenderableConstellationBounds"); + fRenderable->registerClass("RenderablePath"); + fRenderable->registerClass("RenderableTrail"); + fRenderable->registerClass("RenderableSphere"); + fRenderable->registerClass("RenderableSphericalGrid"); + fRenderable->registerClass("RenderableModel"); + fRenderable->registerClass("RenderablePlane"); + fRenderable->registerClass("RenderableFieldlines"); + fRenderable->registerClass("RenderableCrawlingLine"); + + auto fPlanetGeometry = FactoryManager::ref().factory(); + ghoul_assert(fPlanetGeometry, "No planet geometry factory existed"); + fPlanetGeometry->registerClass("SimpleSphere"); + + auto fModelGeometry = FactoryManager::ref().factory(); + ghoul_assert(fModelGeometry, "No model geometry factory existed"); + fModelGeometry->registerClass("WavefrontGeometry"); + + return true; +} + +bool BaseModule::deinitialize() { + return false; +} + +} // namespace openspace diff --git a/modules/base/basemodule.h b/modules/base/basemodule.h new file mode 100644 index 0000000000..3a2fe48c0b --- /dev/null +++ b/modules/base/basemodule.h @@ -0,0 +1,40 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2015 * + * * + * 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 __BASEMODULE_H__ +#define __BASEMODULE_H__ + +#include + +namespace openspace { + +class BaseModule : public OpenSpaceModule { +public: + bool initialize() override; + bool deinitialize() override; +}; + +} // namespace openspace + +#endif // __BASEMODULE_H__ diff --git a/src/rendering/model/modelgeometry.cpp b/modules/base/rendering/modelgeometry.cpp similarity index 98% rename from src/rendering/model/modelgeometry.cpp rename to modules/base/rendering/modelgeometry.cpp index 5868e8f894..a390bae9a2 100644 --- a/src/rendering/model/modelgeometry.cpp +++ b/modules/base/rendering/modelgeometry.cpp @@ -22,14 +22,14 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include +#include #include #include #include #include #include -#include +#include namespace { const std::string _loggerCat = "ModelGeometry"; diff --git a/include/openspace/rendering/model/modelgeometry.h b/modules/base/rendering/modelgeometry.h similarity index 98% rename from include/openspace/rendering/model/modelgeometry.h rename to modules/base/rendering/modelgeometry.h index edebfa8480..b184ee172b 100644 --- a/include/openspace/rendering/model/modelgeometry.h +++ b/modules/base/rendering/modelgeometry.h @@ -26,7 +26,7 @@ #define __MODELGEOMETRY_H__ #include -#include +#include #include namespace openspace { diff --git a/src/rendering/planets/planetgeometry.cpp b/modules/base/rendering/planetgeometry.cpp similarity index 98% rename from src/rendering/planets/planetgeometry.cpp rename to modules/base/rendering/planetgeometry.cpp index 0d9a744820..062fb8db39 100644 --- a/src/rendering/planets/planetgeometry.cpp +++ b/modules/base/rendering/planetgeometry.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include +#include #include #include #include diff --git a/include/openspace/rendering/planets/planetgeometry.h b/modules/base/rendering/planetgeometry.h similarity index 97% rename from include/openspace/rendering/planets/planetgeometry.h rename to modules/base/rendering/planetgeometry.h index 329144cb67..58fa3ab3ef 100644 --- a/include/openspace/rendering/planets/planetgeometry.h +++ b/modules/base/rendering/planetgeometry.h @@ -26,7 +26,7 @@ #define __PLANETGEOMETRY_H__ #include -#include +#include #include namespace openspace { diff --git a/src/rendering/stars/renderableconstellationbounds.cpp b/modules/base/rendering/renderableconstellationbounds.cpp similarity index 99% rename from src/rendering/stars/renderableconstellationbounds.cpp rename to modules/base/rendering/renderableconstellationbounds.cpp index 25f87139b4..9837d56656 100644 --- a/src/rendering/stars/renderableconstellationbounds.cpp +++ b/modules/base/rendering/renderableconstellationbounds.cpp @@ -23,7 +23,7 @@ ****************************************************************************************/ // openspace -#include +#include #include #include diff --git a/include/openspace/rendering/stars/renderableconstellationbounds.h b/modules/base/rendering/renderableconstellationbounds.h similarity index 100% rename from include/openspace/rendering/stars/renderableconstellationbounds.h rename to modules/base/rendering/renderableconstellationbounds.h diff --git a/src/rendering/renderablecrawlingline.cpp b/modules/base/rendering/renderablecrawlingline.cpp similarity index 98% rename from src/rendering/renderablecrawlingline.cpp rename to modules/base/rendering/renderablecrawlingline.cpp index b9510bc6cd..58e3da9e85 100644 --- a/src/rendering/renderablecrawlingline.cpp +++ b/modules/base/rendering/renderablecrawlingline.cpp @@ -22,13 +22,13 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include +#include #include #include #include #include -#include +//#include namespace { const std::string _loggerCat = "RenderableCrawlingLine"; diff --git a/include/openspace/rendering/renderablecrawlingline.h b/modules/base/rendering/renderablecrawlingline.h similarity index 100% rename from include/openspace/rendering/renderablecrawlingline.h rename to modules/base/rendering/renderablecrawlingline.h diff --git a/src/rendering/renderablefieldlines.cpp b/modules/base/rendering/renderablefieldlines.cpp similarity index 99% rename from src/rendering/renderablefieldlines.cpp rename to modules/base/rendering/renderablefieldlines.cpp index 0df2d05e98..62a6503c67 100644 --- a/src/rendering/renderablefieldlines.cpp +++ b/modules/base/rendering/renderablefieldlines.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include +#include #include #include #include diff --git a/include/openspace/rendering/renderablefieldlines.h b/modules/base/rendering/renderablefieldlines.h similarity index 100% rename from include/openspace/rendering/renderablefieldlines.h rename to modules/base/rendering/renderablefieldlines.h diff --git a/src/rendering/model/renderablemodel.cpp b/modules/base/rendering/renderablemodel.cpp similarity index 98% rename from src/rendering/model/renderablemodel.cpp rename to modules/base/rendering/renderablemodel.cpp index d53f24d42e..ccd6bb70bd 100644 --- a/src/rendering/model/renderablemodel.cpp +++ b/modules/base/rendering/renderablemodel.cpp @@ -26,9 +26,9 @@ // ie after I see model on screen) // open space includes -#include +#include #include -#include +#include #include #include @@ -41,7 +41,6 @@ #include #include -#include "imgui.h" #define _USE_MATH_DEFINES #include diff --git a/include/openspace/rendering/model/renderablemodel.h b/modules/base/rendering/renderablemodel.h similarity index 100% rename from include/openspace/rendering/model/renderablemodel.h rename to modules/base/rendering/renderablemodel.h diff --git a/src/rendering/renderablepath.cpp b/modules/base/rendering/renderablepath.cpp similarity index 99% rename from src/rendering/renderablepath.cpp rename to modules/base/rendering/renderablepath.cpp index 9a3a2eff43..2108a23f6d 100644 --- a/src/rendering/renderablepath.cpp +++ b/modules/base/rendering/renderablepath.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include +#include #include #include diff --git a/include/openspace/rendering/renderablepath.h b/modules/base/rendering/renderablepath.h similarity index 100% rename from include/openspace/rendering/renderablepath.h rename to modules/base/rendering/renderablepath.h diff --git a/src/rendering/renderableplane.cpp b/modules/base/rendering/renderableplane.cpp similarity index 99% rename from src/rendering/renderableplane.cpp rename to modules/base/rendering/renderableplane.cpp index c001effc75..96b18ad9cf 100644 --- a/src/rendering/renderableplane.cpp +++ b/modules/base/rendering/renderableplane.cpp @@ -23,7 +23,7 @@ ****************************************************************************************/ #include -#include +#include #include #include #include diff --git a/include/openspace/rendering/renderableplane.h b/modules/base/rendering/renderableplane.h similarity index 100% rename from include/openspace/rendering/renderableplane.h rename to modules/base/rendering/renderableplane.h diff --git a/src/rendering/planets/renderableplanet.cpp b/modules/base/rendering/renderableplanet.cpp similarity index 98% rename from src/rendering/planets/renderableplanet.cpp rename to modules/base/rendering/renderableplanet.cpp index 803ed7c182..f84d7dc599 100644 --- a/src/rendering/planets/renderableplanet.cpp +++ b/modules/base/rendering/renderableplanet.cpp @@ -23,11 +23,11 @@ ****************************************************************************************/ // open space includes -#include +#include #include #include -#include +#include #include #include #include diff --git a/include/openspace/rendering/planets/renderableplanet.h b/modules/base/rendering/renderableplanet.h similarity index 100% rename from include/openspace/rendering/planets/renderableplanet.h rename to modules/base/rendering/renderableplanet.h diff --git a/src/rendering/renderablesphere.cpp b/modules/base/rendering/renderablesphere.cpp similarity index 99% rename from src/rendering/renderablesphere.cpp rename to modules/base/rendering/renderablesphere.cpp index 7606d7180e..996f5e9863 100644 --- a/src/rendering/renderablesphere.cpp +++ b/modules/base/rendering/renderablesphere.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include +#include #include #include diff --git a/include/openspace/rendering/renderablesphere.h b/modules/base/rendering/renderablesphere.h similarity index 100% rename from include/openspace/rendering/renderablesphere.h rename to modules/base/rendering/renderablesphere.h diff --git a/src/rendering/renderablesphericalgrid.cpp b/modules/base/rendering/renderablesphericalgrid.cpp similarity index 99% rename from src/rendering/renderablesphericalgrid.cpp rename to modules/base/rendering/renderablesphericalgrid.cpp index 5c6a1e8389..a1d0bce088 100644 --- a/src/rendering/renderablesphericalgrid.cpp +++ b/modules/base/rendering/renderablesphericalgrid.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include +#include #include #include diff --git a/include/openspace/rendering/renderablesphericalgrid.h b/modules/base/rendering/renderablesphericalgrid.h similarity index 100% rename from include/openspace/rendering/renderablesphericalgrid.h rename to modules/base/rendering/renderablesphericalgrid.h diff --git a/src/rendering/stars/renderablestars.cpp b/modules/base/rendering/renderablestars.cpp similarity index 99% rename from src/rendering/stars/renderablestars.cpp rename to modules/base/rendering/renderablestars.cpp index 2b3fc5d29c..079645859b 100644 --- a/src/rendering/stars/renderablestars.cpp +++ b/modules/base/rendering/renderablestars.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * *****************************************************************************************/ -#include +#include #include diff --git a/include/openspace/rendering/stars/renderablestars.h b/modules/base/rendering/renderablestars.h similarity index 100% rename from include/openspace/rendering/stars/renderablestars.h rename to modules/base/rendering/renderablestars.h diff --git a/src/rendering/renderabletrail.cpp b/modules/base/rendering/renderabletrail.cpp similarity index 99% rename from src/rendering/renderabletrail.cpp rename to modules/base/rendering/renderabletrail.cpp index b02ec2d3f2..6110b6056a 100644 --- a/src/rendering/renderabletrail.cpp +++ b/modules/base/rendering/renderabletrail.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include +#include #include #include diff --git a/include/openspace/rendering/renderabletrail.h b/modules/base/rendering/renderabletrail.h similarity index 100% rename from include/openspace/rendering/renderabletrail.h rename to modules/base/rendering/renderabletrail.h diff --git a/src/rendering/planets/simplespheregeometry.cpp b/modules/base/rendering/simplespheregeometry.cpp similarity index 98% rename from src/rendering/planets/simplespheregeometry.cpp rename to modules/base/rendering/simplespheregeometry.cpp index caa0a7cc19..99dd290833 100644 --- a/src/rendering/planets/simplespheregeometry.cpp +++ b/modules/base/rendering/simplespheregeometry.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include +#include #include #include diff --git a/include/openspace/rendering/planets/simplespheregeometry.h b/modules/base/rendering/simplespheregeometry.h similarity index 98% rename from include/openspace/rendering/planets/simplespheregeometry.h rename to modules/base/rendering/simplespheregeometry.h index 6a34d8e138..2da64b8109 100644 --- a/include/openspace/rendering/planets/simplespheregeometry.h +++ b/modules/base/rendering/simplespheregeometry.h @@ -25,7 +25,7 @@ #ifndef __SIMPLESPHEREGEOMETRY_H__ #define __SIMPLESPHEREGEOMETRY_H__ -#include +#include #include #include diff --git a/src/rendering/model/wavefrontgeometry.cpp b/modules/base/rendering/wavefrontgeometry.cpp similarity index 98% rename from src/rendering/model/wavefrontgeometry.cpp rename to modules/base/rendering/wavefrontgeometry.cpp index 4d7df39c73..ae308b01be 100644 --- a/src/rendering/model/wavefrontgeometry.cpp +++ b/modules/base/rendering/wavefrontgeometry.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include +#include #include #include "ghoul/logging/logmanager.h" diff --git a/include/openspace/rendering/model/wavefrontgeometry.h b/modules/base/rendering/wavefrontgeometry.h similarity index 97% rename from include/openspace/rendering/model/wavefrontgeometry.h rename to modules/base/rendering/wavefrontgeometry.h index 31720b2b7c..aa61388ac6 100644 --- a/include/openspace/rendering/model/wavefrontgeometry.h +++ b/modules/base/rendering/wavefrontgeometry.h @@ -25,7 +25,7 @@ #ifndef __WAVEFRONTGEOMETRY_H__ #define __WAVEFRONTGEOMETRY_H__ -#include +#include namespace openspace { diff --git a/src/rendering/planets/planetgeometryprojection.cpp b/modules/projection/rendering/planetgeometryprojection.cpp similarity index 100% rename from src/rendering/planets/planetgeometryprojection.cpp rename to modules/projection/rendering/planetgeometryprojection.cpp diff --git a/include/openspace/rendering/planets/planetgeometryprojection.h b/modules/projection/rendering/planetgeometryprojection.h similarity index 100% rename from include/openspace/rendering/planets/planetgeometryprojection.h rename to modules/projection/rendering/planetgeometryprojection.h diff --git a/src/rendering/renderablefov.cpp b/modules/projection/rendering/renderablefov.cpp similarity index 100% rename from src/rendering/renderablefov.cpp rename to modules/projection/rendering/renderablefov.cpp diff --git a/include/openspace/rendering/renderablefov.h b/modules/projection/rendering/renderablefov.h similarity index 100% rename from include/openspace/rendering/renderablefov.h rename to modules/projection/rendering/renderablefov.h diff --git a/src/rendering/renderableplaneprojection.cpp b/modules/projection/rendering/renderableplaneprojection.cpp similarity index 100% rename from src/rendering/renderableplaneprojection.cpp rename to modules/projection/rendering/renderableplaneprojection.cpp diff --git a/include/openspace/rendering/renderableplaneprojection.h b/modules/projection/rendering/renderableplaneprojection.h similarity index 100% rename from include/openspace/rendering/renderableplaneprojection.h rename to modules/projection/rendering/renderableplaneprojection.h diff --git a/src/rendering/planets/renderableplanetprojection.cpp b/modules/projection/rendering/renderableplanetprojection.cpp similarity index 100% rename from src/rendering/planets/renderableplanetprojection.cpp rename to modules/projection/rendering/renderableplanetprojection.cpp diff --git a/include/openspace/rendering/planets/renderableplanetprojection.h b/modules/projection/rendering/renderableplanetprojection.h similarity index 100% rename from include/openspace/rendering/planets/renderableplanetprojection.h rename to modules/projection/rendering/renderableplanetprojection.h diff --git a/src/rendering/planets/simplespheregeometryprojection.cpp b/modules/projection/rendering/simplespheregeometryprojection.cpp similarity index 100% rename from src/rendering/planets/simplespheregeometryprojection.cpp rename to modules/projection/rendering/simplespheregeometryprojection.cpp diff --git a/include/openspace/rendering/planets/simplespheregeometryprojection.h b/modules/projection/rendering/simplespheregeometryprojection.h similarity index 100% rename from include/openspace/rendering/planets/simplespheregeometryprojection.h rename to modules/projection/rendering/simplespheregeometryprojection.h diff --git a/include/openspace/rendering/planets/writeToTexture.h b/modules/projection/rendering/writeToTexture.h similarity index 100% rename from include/openspace/rendering/planets/writeToTexture.h rename to modules/projection/rendering/writeToTexture.h diff --git a/src/rendering/renderablevolume.cpp b/modules/volume/rendering/renderablevolume.cpp similarity index 100% rename from src/rendering/renderablevolume.cpp rename to modules/volume/rendering/renderablevolume.cpp diff --git a/include/openspace/rendering/renderablevolume.h b/modules/volume/rendering/renderablevolume.h similarity index 100% rename from include/openspace/rendering/renderablevolume.h rename to modules/volume/rendering/renderablevolume.h diff --git a/src/rendering/renderablevolumegl.cpp b/modules/volume/rendering/renderablevolumegl.cpp similarity index 100% rename from src/rendering/renderablevolumegl.cpp rename to modules/volume/rendering/renderablevolumegl.cpp diff --git a/include/openspace/rendering/renderablevolumegl.h b/modules/volume/rendering/renderablevolumegl.h similarity index 100% rename from include/openspace/rendering/renderablevolumegl.h rename to modules/volume/rendering/renderablevolumegl.h diff --git a/openspace.cfg b/openspace.cfg index 505bf7812c..dec8375c58 100644 --- a/openspace.cfg +++ b/openspace.cfg @@ -7,7 +7,7 @@ return { -- Sets the scene that is to be loaded by OpenSpace. A scene file is a description -- of all entities that will be visible during an instance of OpenSpace - Scene = "${OPENSPACE_DATA}/scene/default_nh.scene", + Scene = "${OPENSPACE_DATA}/scene/default.scene", Paths = { SGCT = "${BASE_PATH}/config/sgct", diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d8f8e10cad..014d3dfe24 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -151,7 +151,11 @@ if (UNIX AND NOT APPLE) endif (UNIX AND NOT APPLE) +set(DEPENDENT_LIBS ${DEPENDENT_LIBS} openspace-module-base) +message(${DEPENDENT_LIBS}) + include_directories("${HEADER_ROOT_DIR}") +include_directories("${OPENSPACE_BASE_DIR}") add_executable(OpenSpace ${SOURCE_ROOT_DIR}/main.cpp ${OPENSPACE_HEADER} ${OPENSPACE_SOURCE}) target_link_libraries(OpenSpace ${DEPENDENT_LIBS}) diff --git a/src/engine/moduleengine.cpp b/src/engine/moduleengine.cpp new file mode 100644 index 0000000000..821b7abe68 --- /dev/null +++ b/src/engine/moduleengine.cpp @@ -0,0 +1,76 @@ +/***************************************************************************************** + * * + * OpenSpace * + * * + * Copyright (c) 2014-2015 * + * * + * 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 + +#include + +#include + +namespace { + const std::string _loggerCat = "ModuleEngine"; +} + +namespace openspace { + +bool ModuleEngine::initialize() { + LDEBUG("Initializing modules"); + for (OpenSpaceModule* m : _modules) { + bool success = m->initialize(); + if (!success) { + LERROR("Could not initialize module '" << m->name() << "'"); + return false; + } + } + LDEBUG("Finished initializing modules"); + return true; +} + +bool ModuleEngine::deinitialize() { + LDEBUG("Deinitializing modules"); + for (OpenSpaceModule* m : _modules) { + bool success = m->deinitialize(); + if (!success) { + LERROR("Could not deinitialize module '" << m->name() << "'"); + return false; + } + } + LDEBUG("Finished Deinitializing modules"); + return true; +} + +void ModuleEngine::registerModules(std::vector modules) { + _modules.insert(_modules.end(), modules.begin(), modules.end()); +} + +void ModuleEngine::registerModule(OpenSpaceModule* module) { + _modules.push_back(std::move(module)); +} + +const std::vector ModuleEngine::modules() const { + return _modules; +} + + +} // namespace openspace diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index f1277c5d58..02f5ab38e5 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -46,7 +46,7 @@ #include #include #include // testing - +#include #include @@ -89,6 +89,7 @@ namespace { } commandlineArgumentPlaceholders; } +#include namespace openspace { @@ -102,14 +103,19 @@ OpenSpaceEngine::OpenSpaceEngine(std::string programName) , _networkEngine(new NetworkEngine) , _commandlineParser(new ghoul::cmdparser::CommandlineParser(programName, true)) , _console(new LuaConsole) + , _moduleEngine(new ModuleEngine) , _gui(new gui::GUI) , _isMaster(false) , _syncBuffer(nullptr) { - SpiceManager::initialize(); - Time::initialize(); - FactoryManager::initialize(); - ghoul::systemcapabilities::SystemCapabilities::initialize(); + FactoryManager::initialize(); + SpiceManager::initialize(); + Time::initialize(); + ghoul::systemcapabilities::SystemCapabilities::initialize(); + + // Register modules + _moduleEngine->registerModule(new BaseModule); + _moduleEngine->initialize(); } OpenSpaceEngine::~OpenSpaceEngine() { @@ -122,6 +128,7 @@ OpenSpaceEngine::~OpenSpaceEngine() { delete _networkEngine; delete _commandlineParser; delete _console; + delete _moduleEngine; delete _gui; if(_syncBuffer) @@ -259,6 +266,7 @@ bool OpenSpaceEngine::create( } void OpenSpaceEngine::destroy() { + _engine->_moduleEngine->deinitialize(); _engine->_console->deinitialize(); delete _engine; ghoul::systemcapabilities::SystemCapabilities::deinitialize(); @@ -745,4 +753,8 @@ NetworkEngine* OpenSpaceEngine::networkEngine() { return _networkEngine; } +ModuleEngine* OpenSpaceEngine::moduleEngine() { + return _moduleEngine; +} + } // namespace openspace diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index 354c40088b..ef601ec52b 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -41,7 +41,8 @@ #include #include #include -#include +//#include +#include #include #include #include diff --git a/src/scene/scene.cpp b/src/scene/scene.cpp index 4e6546b773..1a07cd914f 100644 --- a/src/scene/scene.cpp +++ b/src/scene/scene.cpp @@ -377,7 +377,7 @@ bool Scene::loadSceneInternal(const std::string& sceneDescriptionFilePath) { // the camera position const SceneGraphNode* fn = OsEng.interactionHandler()->focusNode(); - //psc relative = fn->worldPosition() - c->position(); + // Check crash for when fn == nullptr glm::mat4 la = glm::lookAt(cameraPosition.vec3(), fn->worldPosition().vec3(), c->lookUpVector()); diff --git a/src/scene/scenegraph.cpp b/src/scene/scenegraph.cpp index 8dab57e29a..1e19bb0534 100644 --- a/src/scene/scenegraph.cpp +++ b/src/scene/scenegraph.cpp @@ -47,8 +47,9 @@ namespace { namespace openspace { -SceneGraph::SceneGraph() { -} +SceneGraph::SceneGraph() + : _rootNode(nullptr) +{} void SceneGraph::clear() { // Untested ---abock @@ -58,6 +59,7 @@ void SceneGraph::clear() { } _nodes.clear(); + _rootNode = nullptr; } bool SceneGraph::loadFromFile(const std::string& sceneDescription) { diff --git a/src/scene/scenegraphnode.cpp b/src/scene/scenegraphnode.cpp index 4b6f28ea98..2fb1b3f6ba 100644 --- a/src/scene/scenegraphnode.cpp +++ b/src/scene/scenegraphnode.cpp @@ -79,6 +79,7 @@ SceneGraphNode* SceneGraphNode::createFromDictionary(const ghoul::Dictionary& di if (result->_renderable == nullptr) { LERROR("Failed to create renderable for SceneGraphNode '" << result->name() << "'"); + delete result; return nullptr; } result->addPropertySubOwner(result->_renderable); @@ -92,6 +93,7 @@ SceneGraphNode* SceneGraphNode::createFromDictionary(const ghoul::Dictionary& di if (result->_ephemeris == nullptr) { LERROR("Failed to create ephemeris for SceneGraphNode '" << result->name() << "'"); + delete result; return nullptr; } //result->addPropertySubOwner(result->_ephemeris); diff --git a/src/util/factorymanager.cpp b/src/util/factorymanager.cpp index cffaf3db17..67dfc490ef 100644 --- a/src/util/factorymanager.cpp +++ b/src/util/factorymanager.cpp @@ -25,24 +25,25 @@ #include // renderables -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include +//#include // positioninformation #include @@ -50,9 +51,9 @@ #include // projection -#include -#include -#include +//#include +//#include +//#include #include #include @@ -73,37 +74,7 @@ void FactoryManager::initialize() _manager = new FactoryManager; assert(_manager != nullptr); - // TODO: This has to be moved into a sort of module structure (ab) - // Add Renderables _manager->addFactory(new ghoul::TemplateFactory); - _manager->factory()->registerClass("RenderablePlanet"); - _manager->factory()->registerClass("RenderablePlanetProjection"); - _manager->factory()->registerClass("RenderableStars"); - _manager->factory()->registerClass - ("RenderableConstellationBounds"); - //will replace ephemeris class soon... - _manager->factory()->registerClass( - "RenderablePath"); - _manager->factory()->registerClass( - "RenderableTrail"); - _manager->factory()->registerClass( - "RenderableFov"); - _manager->factory()->registerClass( - "RenderableSphere"); - _manager->factory()->registerClass( - "RenderableSphericalGrid"); - _manager->factory()->registerClass( - "RenderableModel"); - _manager->factory()->registerClass( - "RenderablePlane"); - _manager->factory()->registerClass( - "RenderablePlaneProjection"); - _manager->factory()->registerClass( - "RenderableVolumeGL"); - _manager->factory()->registerClass( - "RenderableFieldlines"); - _manager->factory()->registerClass( - "RenderableCrawlingLine"); // Add Ephemerides _manager->addFactory(new ghoul::TemplateFactory); @@ -116,20 +87,14 @@ void FactoryManager::initialize() _manager->factory()->registerClass("Target"); - // Add PlanetGeometry - _manager->addFactory(new ghoul::TemplateFactory); - _manager->factory() - ->registerClass("SimpleSphere"); - - // Add PlanetGeometryProjection - _manager->addFactory(new ghoul::TemplateFactory); - _manager->factory() - ->registerClass("SimpleSphereProjection"); - - // Add ModelGeometry - _manager->addFactory(new ghoul::TemplateFactory); - _manager->factory() - ->registerClass("WavefrontGeometry"); + //_manager->addFactory(new ghoul::TemplateFactory); + //_manager->addFactory(new ghoul::TemplateFactory); + + + //// Add PlanetGeometryProjection + //_manager->addFactory(new ghoul::TemplateFactory); + //_manager->factory() + // ->registerClass("SimpleSphereProjection"); } void FactoryManager::deinitialize()