Moving Kameleon into its own module

Moving fieldline rendering into its own module
This commit is contained in:
Alexander Bock
2015-05-26 23:51:15 +02:00
parent 77cc5dba49
commit 9d733eb613
25 changed files with 366 additions and 103 deletions

4
.gitmodules vendored
View File

@@ -4,6 +4,6 @@
[submodule "openspace-data"]
path = openspace-data
url = git@openspace.itn.liu.se:/openspace-data
[submodule "ext/kameleon"]
path = ext/kameleon
[submodule "modules/kameleon/ext/kameleon"]
path = modules/kameleon/ext/kameleon
url = git@openspace.itn.liu.se:/kameleon

View File

@@ -25,69 +25,64 @@
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
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/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
${CMAKE_CURRENT_SOURCE_DIR}/ephemeris/dynamicephemeris.h
${CMAKE_CURRENT_SOURCE_DIR}/ephemeris/spiceephemeris.h
${CMAKE_CURRENT_SOURCE_DIR}/ephemeris/staticephemeris.h
${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/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
${CMAKE_CURRENT_SOURCE_DIR}/ephemeris/dynamicephemeris.h
${CMAKE_CURRENT_SOURCE_DIR}/ephemeris/spiceephemeris.h
${CMAKE_CURRENT_SOURCE_DIR}/ephemeris/staticephemeris.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/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
${CMAKE_CURRENT_SOURCE_DIR}/ephemeris/dynamicephemeris.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ephemeris/spiceephemeris.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ephemeris/staticephemeris.cpp
${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/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
${CMAKE_CURRENT_SOURCE_DIR}/ephemeris/dynamicephemeris.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ephemeris/spiceephemeris.cpp
${CMAKE_CURRENT_SOURCE_DIR}/ephemeris/staticephemeris.cpp
)
source_group("Source Files" FILES ${SOURCE_FILES})
set(SHADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/shaders/constellationbounds_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/constellationbounds_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/ephemeris_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/ephemeris_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/fieldline_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/fieldline_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/fieldline_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/imageplane_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/imageplane_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/model_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/model_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/path_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/path_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/path_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/plane_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/plane_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/sphere_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/sphere_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/star_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/star_ge.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/star_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/constellationbounds_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/constellationbounds_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/ephemeris_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/ephemeris_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/imageplane_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/imageplane_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/model_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/model_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/path_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/path_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/path_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/plane_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/plane_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/sphere_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/sphere_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/star_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/star_ge.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/star_vs.glsl
)
source_group("Shader Files" FILES ${SHADER_FILES})

View File

@@ -36,7 +36,6 @@
#include <modules/base/rendering/renderablepath.h>
#include <modules/base/rendering/renderablesphere.h>
#include <modules/base/rendering/renderablesphericalgrid.h>
#include <modules/base/rendering/renderablefieldlines.h>
#include <modules/base/rendering/renderableplanet.h>
#include <modules/base/rendering/simplespheregeometry.h>
#include <modules/base/rendering/renderableplane.h>
@@ -76,7 +75,6 @@ bool BaseModule::initialize() {
fRenderable->registerClass<RenderableSphericalGrid>("RenderableSphericalGrid");
fRenderable->registerClass<RenderableModel>("RenderableModel");
fRenderable->registerClass<RenderablePlane>("RenderablePlane");
fRenderable->registerClass<RenderableFieldlines>("RenderableFieldlines");
auto fEphemeris = FactoryManager::ref().factory<Ephemeris>();
ghoul_assert(fEphemeris, "Ephemeris factory was not created");

View File

@@ -0,0 +1,48 @@
#########################################################################################
# #
# 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(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
set(HEADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablefieldlines.h
)
source_group("Header Files" FILES ${HEADER_FILES})
set(SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablefieldlines.cpp
)
source_group("Source Files" FILES ${SOURCE_FILES})
set(SHADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/shaders/fieldline_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/fieldline_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/fieldline_vs.glsl
)
source_group("Shader Files" FILES ${SHADER_FILES})
create_new_module(
"Fieldlines"
fieldlines_module
${HEADER_FILES} ${SOURCE_FILES} ${SHADER_FILES}
)

View File

@@ -0,0 +1,53 @@
/*****************************************************************************************
* *
* 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 <modules/fieldlines/fieldlinesmodule.h>
#include <openspace/rendering/renderable.h>
#include <openspace/util/factorymanager.h>
#include <ghoul/misc/assert.h>
#include <modules/fieldlines/rendering/renderablefieldlines.h>
namespace openspace {
FieldlinesModule::FieldlinesModule() {
setName("Fieldlines");
}
bool FieldlinesModule::initialize() {
bool success = OpenSpaceModule::initialize();
if (!success)
return false;
auto fRenderable = FactoryManager::ref().factory<Renderable>();
ghoul_assert(fRenderable, "No renderable factory existed");
fRenderable->registerClass<RenderableFieldlines>("RenderableFieldlines");
return true;
}
} // namespace openspace

View File

@@ -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 __FIELDLINESMODULE_H__
#define __FIELDLINESMODULE_H__
#include <openspace/util/openspacemodule.h>
namespace openspace {
class FieldlinesModule : public OpenSpaceModule {
public:
FieldlinesModule();
bool initialize() override;
};
} // namespace openspace
#endif // __FIELDLINESMODULE_H__

View File

@@ -0,0 +1,3 @@
set (OPENSPACE_DEPENDENCIES
kameleon
)

View File

@@ -22,10 +22,10 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#include <modules/base/rendering/renderablefieldlines.h>
#include <modules/fieldlines/rendering/renderablefieldlines.h>
#include <openspace/engine/openspaceengine.h>
#include <openspace/util/powerscaledcoordinate.h>
#include <openspace/util/kameleonwrapper.h>
#include <modules/kameleon/include/kameleonwrapper.h>
#include <openspace/util/constants.h>
#include <ghoul/filesystem/filesystem.h>

View File

@@ -0,0 +1,77 @@
#########################################################################################
# #
# 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(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
set(HEADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/include/kameleonwrapper.h
)
source_group("Header Files" FILES ${HEADER_FILES})
set(SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/src/kameleonwrapper.cpp
)
source_group("Source Files" FILES ${SOURCE_FILES})
create_new_module(
"Kameleon"
kameleon_module
${HEADER_FILES} ${SOURCE_FILES}
)
option(KAMELEON_LIBRARY_ONLY "Build with Kameleon as library only" ON)
if (WIN32)
option(BUILD_SHARED_LIBS "Build Shared Libraries" OFF)
else ()
option(BUILD_SHARED_LIBS "Build Shared Libraries" ON)
endif ()
mark_as_advanced(BUILD_SHARED_LIBS) # Change to set instead of option
option(KAMELEON_USE_HDF5 "Kameleon use HDF5" OFF)
set(KAMELEON_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ext/kameleon)
set(KAMELEON_INCLUDES ${KAMELEON_ROOT_DIR}/src)
set(BOOST_ROOT "${OPENSPACE_EXT_DIR}/ghoul/ext/boost")
add_subdirectory(${KAMELEON_ROOT_DIR})
target_include_directories(${kameleon_module} SYSTEM PUBLIC ${KAMELEON_INCLUDES})
target_link_libraries(${kameleon_module} ccmc)
if (OPENSPACE_DISABLE_EXTERNAL_WARNINGS)
if (MSVC)
target_compile_options(ccmc PUBLIC "/W0" "/MP")
else ()
target_compile_options(ccmc PUBLIC "-w")
endif ()
target_compile_definitions(ccmc PUBLIC "_SCL_SECURE_NO_WARNINGS")
endif ()
set_property(TARGET ccmc PROPERTY FOLDER "External")
if (TARGET cdf)
if (OPENSPACE_DISABLE_EXTERNAL_WARNINGS)
if (MSVC)
target_compile_options(cdf PUBLIC "/W0" "/MP")
else ()
target_compile_options(cdf PUBLIC "-w")
endif ()
endif ()
set_property(TARGET cdf PROPERTY FOLDER "External")
endif ()
#include_external_library(${onscreengui_module} Imgui ${CMAKE_CURRENT_SOURCE_DIR}/ext/kameleon)

View File

@@ -0,0 +1,41 @@
/*****************************************************************************************
* *
* 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 <modules/kameleon/kameleonmodule.h>
namespace openspace {
KameleonModule::KameleonModule() {
setName("Kameleon");
}
bool KameleonModule::initialize() {
bool success = OpenSpaceModule::initialize();
if (!success)
return false;
return true;
}
} // namespace openspace

View File

@@ -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 __KAMELEONMODULE_H__
#define __KAMELEONMODULE_H__
#include <openspace/util/openspacemodule.h>
namespace openspace {
class KameleonModule : public OpenSpaceModule {
public:
KameleonModule();
bool initialize() override;
};
} // namespace openspace
#endif // __KAMELEONMODULE_H__

View File

@@ -22,7 +22,7 @@
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#include <openspace/util/kameleonwrapper.h>
#include <modules/kameleon/include/kameleonwrapper.h>
#include <openspace/util/progressbar.h>
#include <ghoul/logging/logmanager.h>

View File

@@ -1 +1,3 @@
set(DEFAULT_MODULE ON)
set (OPENSPACE_DEPENDENCIES
kameleon
)

View File

@@ -25,7 +25,7 @@
// open space includes
#include <modules/volume/rendering/renderablevolume.h>
#include <openspace/engine/openspaceengine.h>
#include <openspace/util/kameleonwrapper.h>
#include <modules/kameleon/include/kameleonwrapper.h>
#include <openspace/util/constants.h>
#include <openspace/util/progressbar.h>

View File

@@ -28,7 +28,7 @@
#include <openspace/engine/configurationmanager.h>
#include <openspace/engine/openspaceengine.h>
#include <openspace/rendering/renderengine.h>
#include <openspace/util/kameleonwrapper.h>
#include <modules/kameleon/include/kameleonwrapper.h>
#include <openspace/util/constants.h>
#include <ghoul/filesystem/filesystem.h>

View File

@@ -71,7 +71,6 @@ set(OPENSPACE_SOURCE
${OPENSPACE_BASE_DIR}/src/scripting/scriptengine_lua.inl
${OPENSPACE_BASE_DIR}/src/util/camera.cpp
${OPENSPACE_BASE_DIR}/src/util/factorymanager.cpp
${OPENSPACE_BASE_DIR}/src/util/kameleonwrapper.cpp
${OPENSPACE_BASE_DIR}/src/util/openspacemodule.cpp
${OPENSPACE_BASE_DIR}/src/util/powerscaledcoordinate.cpp
${OPENSPACE_BASE_DIR}/src/util/powerscaledscalar.cpp
@@ -142,7 +141,6 @@ set(OPENSPACE_HEADER
${OPENSPACE_BASE_DIR}/include/openspace/util/constants.h
${OPENSPACE_BASE_DIR}/include/openspace/util/factorymanager.h
${OPENSPACE_BASE_DIR}/include/openspace/util/factorymanager.inl
${OPENSPACE_BASE_DIR}/include/openspace/util/kameleonwrapper.h
${OPENSPACE_BASE_DIR}/include/openspace/util/keys.h
${OPENSPACE_BASE_DIR}/include/openspace/util/openspacemodule.h
${OPENSPACE_BASE_DIR}/include/openspace/util/powerscaledcoordinate.h

View File

@@ -419,7 +419,6 @@ void RenderEngine::render(const glm::mat4 &projectionMatrix, const glm::mat4 &vi
//const PowerScaledScalar& pssl = (position - origin).length();
// Next 2 lines neccesary for instrument switching to work.
//double currentTime = Time::ref().currentTime();
// GUI PRINT
// Using a macro to shorten line length and increase readability
@@ -441,6 +440,7 @@ void RenderEngine::render(const glm::mat4 &projectionMatrix, const glm::mat4 &vi
//PrintText(i++, "Scaling: (% .5f, % .5f)", scaling[0], scaling[1]);
#ifdef OPENSPACE_MODULE_NEWHORIZONS_ENABLED
double currentTime = Time::ref().currentTime();
if (openspace::ImageSequencer2::ref().isReady()) {
double remaining = openspace::ImageSequencer2::ref().getNextCaptureTime() - currentTime;
double t = 1.0 - remaining / openspace::ImageSequencer2::ref().getIntervalLength();

View File

@@ -172,40 +172,6 @@ function (add_external_dependencies)
target_include_directories(libOpenSpace SYSTEM PUBLIC ${SPICE_INCLUDE_DIRS})
target_link_libraries(libOpenSpace ${SPICE_LIBRARIES})
# # Kameleon
option(KAMELEON_LIBRARY_ONLY "Build with Kameleon as library only" ON)
if (WIN32)
option(BUILD_SHARED_LIBS "Build Shared Libraries" OFF)
else ()
option(BUILD_SHARED_LIBS "Build Shared Libraries" ON)
endif ()
mark_as_advanced(BUILD_SHARED_LIBS) # Change to set instead of option
option(KAMELEON_USE_HDF5 "Kameleon use HDF5" OFF)
set(KAMELEON_ROOT_DIR ${OPENSPACE_EXT_DIR}/kameleon)
set(KAMELEON_INCLUDES ${KAMELEON_ROOT_DIR}/src)
set(BOOST_ROOT "${OPENSPACE_EXT_DIR}/ghoul/ext/boost")
add_subdirectory(${KAMELEON_ROOT_DIR})
target_include_directories(libOpenSpace SYSTEM PUBLIC ${KAMELEON_INCLUDES})
target_link_libraries(libOpenSpace ccmc)
if (OPENSPACE_DISABLE_EXTERNAL_WARNINGS)
if (MSVC)
target_compile_options(ccmc PUBLIC "/W0" "/MP")
else ()
target_compile_options(ccmc PUBLIC "-w")
endif ()
target_compile_definitions(ccmc PUBLIC "_SCL_SECURE_NO_WARNINGS")
endif ()
set_property(TARGET ccmc PROPERTY FOLDER "External")
if (TARGET cdf)
if (OPENSPACE_DISABLE_EXTERNAL_WARNINGS)
if (MSVC)
target_compile_options(cdf PUBLIC "/W0" "/MP")
else ()
target_compile_options(cdf PUBLIC "-w")
endif ()
endif ()
set_property(TARGET cdf PROPERTY FOLDER "External")
endif ()
endfunction ()
@@ -331,6 +297,8 @@ function (handle_internal_modules)
set(MODULE_HEADERS "")
set(MODULE_CLASSES "")
message(STATUS ${sortedModules})
# Add subdirectories in the correct order
foreach (module ${sortedModules})
create_option_name(${module} optionName)