Merge branch 'thesis/2019/spaceDebris' of https://github.com/OpenSpace/OpenSpace into thesis/2019/spaceDebris

This commit is contained in:
Jonathan Fransson
2019-03-27 11:49:15 -06:00
1090 changed files with 2953 additions and 3124 deletions

View File

@@ -37,40 +37,40 @@ set(SOURCE_FILES
source_group("Source Files" FILES ${SOURCE_FILES})
set(SHADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/shaders/atmosphere_common.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/atmosphere_deferred_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/atmosphere_deferred_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaE_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaE_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaJ_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaJ_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaJ_calc_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_calc_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_sup_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_sup_calc_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_sup_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_calc_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_sup_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_sup_calc_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_sup_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_final_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_final_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_sup_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_sup_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/transmittance_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/transmittance_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/atmosphere_common.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/atmosphere_deferred_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/atmosphere_deferred_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaE_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaE_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaJ_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaJ_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaJ_calc_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_calc_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_sup_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_sup_calc_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/deltaS_sup_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_calc_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_sup_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_sup_calc_gs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/inScattering_sup_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_final_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_final_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_sup_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/irradiance_sup_calc_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/transmittance_calc_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/transmittance_calc_fs.glsl
)
source_group("Shader Files" FILES ${SHADER_FILES})
create_new_module(
"Atmosphere"
atmosphere_module
STATIC
${HEADER_FILES} ${SOURCE_FILES} ${SHADER_FILES}
"Atmosphere"
atmosphere_module
STATIC
${HEADER_FILES} ${SOURCE_FILES} ${SHADER_FILES}
)

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -25,116 +25,116 @@
include(${OPENSPACE_CMAKE_EXT_DIR}/module_definition.cmake)
set(HEADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemangle.h
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemdate.h
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemdistance.h
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemframerate.h
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemmission.h
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemparallelconnection.h
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditempropertyvalue.h
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemsimulationincrement.h
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemspacing.h
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemvelocity.h
${CMAKE_CURRENT_SOURCE_DIR}/lightsource/cameralightsource.h
${CMAKE_CURRENT_SOURCE_DIR}/lightsource/scenegraphlightsource.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/modelgeometry.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/multimodelgeometry.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableboxgrid.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablecartesianaxes.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablemodel.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplane.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplaneimagelocal.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplaneimageonline.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablesphere.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablesphericalgrid.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletrail.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletrailorbit.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletrailtrajectory.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspacedashboard.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspaceframebuffer.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspaceimagelocal.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspaceimageonline.h
${CMAKE_CURRENT_SOURCE_DIR}/translation/luatranslation.h
${CMAKE_CURRENT_SOURCE_DIR}/translation/statictranslation.h
${CMAKE_CURRENT_SOURCE_DIR}/rotation/constantrotation.h
${CMAKE_CURRENT_SOURCE_DIR}/rotation/fixedrotation.h
${CMAKE_CURRENT_SOURCE_DIR}/rotation/luarotation.h
${CMAKE_CURRENT_SOURCE_DIR}/rotation/staticrotation.h
${CMAKE_CURRENT_SOURCE_DIR}/scale/luascale.h
${CMAKE_CURRENT_SOURCE_DIR}/scale/staticscale.h
${CMAKE_CURRENT_SOURCE_DIR}/scale/timedependentscale.h
${CMAKE_CURRENT_SOURCE_DIR}/timeframe/timeframeinterval.h
${CMAKE_CURRENT_SOURCE_DIR}/timeframe/timeframeunion.h
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemangle.h
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemdate.h
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemdistance.h
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemframerate.h
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemmission.h
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemparallelconnection.h
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditempropertyvalue.h
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemsimulationincrement.h
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemspacing.h
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemvelocity.h
${CMAKE_CURRENT_SOURCE_DIR}/lightsource/cameralightsource.h
${CMAKE_CURRENT_SOURCE_DIR}/lightsource/scenegraphlightsource.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/modelgeometry.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/multimodelgeometry.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableboxgrid.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablecartesianaxes.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablemodel.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplane.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplaneimagelocal.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplaneimageonline.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablesphere.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablesphericalgrid.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletrail.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletrailorbit.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletrailtrajectory.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspacedashboard.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspaceframebuffer.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspaceimagelocal.h
${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspaceimageonline.h
${CMAKE_CURRENT_SOURCE_DIR}/translation/luatranslation.h
${CMAKE_CURRENT_SOURCE_DIR}/translation/statictranslation.h
${CMAKE_CURRENT_SOURCE_DIR}/rotation/constantrotation.h
${CMAKE_CURRENT_SOURCE_DIR}/rotation/fixedrotation.h
${CMAKE_CURRENT_SOURCE_DIR}/rotation/luarotation.h
${CMAKE_CURRENT_SOURCE_DIR}/rotation/staticrotation.h
${CMAKE_CURRENT_SOURCE_DIR}/scale/luascale.h
${CMAKE_CURRENT_SOURCE_DIR}/scale/staticscale.h
${CMAKE_CURRENT_SOURCE_DIR}/scale/timedependentscale.h
${CMAKE_CURRENT_SOURCE_DIR}/timeframe/timeframeinterval.h
${CMAKE_CURRENT_SOURCE_DIR}/timeframe/timeframeunion.h
)
source_group("Header Files" FILES ${HEADER_FILES})
set(SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemangle.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemdate.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemdistance.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemframerate.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemmission.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemparallelconnection.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditempropertyvalue.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemsimulationincrement.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemspacing.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemvelocity.cpp
${CMAKE_CURRENT_SOURCE_DIR}/lightsource/cameralightsource.cpp
${CMAKE_CURRENT_SOURCE_DIR}/lightsource/scenegraphlightsource.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/modelgeometry.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/multimodelgeometry.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableboxgrid.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablecartesianaxes.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablemodel.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplane.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplaneimagelocal.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplaneimageonline.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablesphere.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablesphericalgrid.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletrail.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletrailorbit.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletrailtrajectory.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspacedashboard.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspaceframebuffer.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspaceimagelocal.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspaceimageonline.cpp
${CMAKE_CURRENT_SOURCE_DIR}/translation/luatranslation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/translation/statictranslation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rotation/constantrotation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rotation/fixedrotation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rotation/luarotation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rotation/staticrotation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/scale/luascale.cpp
${CMAKE_CURRENT_SOURCE_DIR}/scale/staticscale.cpp
${CMAKE_CURRENT_SOURCE_DIR}/scale/timedependentscale.cpp
${CMAKE_CURRENT_SOURCE_DIR}/timeframe/timeframeinterval.cpp
${CMAKE_CURRENT_SOURCE_DIR}/timeframe/timeframeunion.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemangle.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemdate.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemdistance.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemframerate.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemmission.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemparallelconnection.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditempropertyvalue.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemsimulationincrement.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemspacing.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dashboard/dashboarditemvelocity.cpp
${CMAKE_CURRENT_SOURCE_DIR}/lightsource/cameralightsource.cpp
${CMAKE_CURRENT_SOURCE_DIR}/lightsource/scenegraphlightsource.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/modelgeometry.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/multimodelgeometry.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableboxgrid.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablecartesianaxes.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablemodel.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplane.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplaneimagelocal.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplaneimageonline.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablesphere.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablesphericalgrid.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletrail.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletrailorbit.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderabletrailtrajectory.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspacedashboard.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspaceframebuffer.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspaceimagelocal.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspaceimageonline.cpp
${CMAKE_CURRENT_SOURCE_DIR}/translation/luatranslation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/translation/statictranslation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rotation/constantrotation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rotation/fixedrotation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rotation/luarotation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/rotation/staticrotation.cpp
${CMAKE_CURRENT_SOURCE_DIR}/scale/luascale.cpp
${CMAKE_CURRENT_SOURCE_DIR}/scale/staticscale.cpp
${CMAKE_CURRENT_SOURCE_DIR}/scale/timedependentscale.cpp
${CMAKE_CURRENT_SOURCE_DIR}/timeframe/timeframeinterval.cpp
${CMAKE_CURRENT_SOURCE_DIR}/timeframe/timeframeunion.cpp
)
source_group("Source Files" FILES ${SOURCE_FILES})
set(SHADER_FILES
${CMAKE_CURRENT_SOURCE_DIR}/shaders/axes_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/axes_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/grid_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/grid_fs.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/plane_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/plane_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/renderabletrail_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/renderabletrail_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/screenspace_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/screenspace_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/sphere_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/sphere_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/axes_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/axes_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/grid_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/grid_fs.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/plane_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/plane_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/renderabletrail_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/renderabletrail_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/screenspace_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/screenspace_vs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/sphere_fs.glsl
${CMAKE_CURRENT_SOURCE_DIR}/shaders/sphere_vs.glsl
)
source_group("Shader Files" FILES ${SHADER_FILES})
create_new_module(
"Base"
base_module
STATIC
${HEADER_FILES} ${SOURCE_FILES} ${SHADER_FILES}
"Base"
base_module
STATIC
${HEADER_FILES} ${SOURCE_FILES} ${SHADER_FILES}
)

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *
@@ -54,6 +54,78 @@ namespace {
"Type of the frame time display",
"This value determines the units in which the frame time is displayed."
};
constexpr const char* ValueDtAvg = "Average Deltatime";
constexpr const char* ValueDtExtremes = "Deltatime extremes";
constexpr const char* ValueDtStandardDeviation = "Deltatime standard deviation";
constexpr const char* ValueDtCov = "Deltatime coefficient of variation";
constexpr const char* ValueFps = "Frames per second";
constexpr const char* ValueFpsAvg = "Average frames per second";
constexpr const char* ValueNone = "None";
std::string formatDt() {
return fmt::format(
"Avg. Frametime: {:.2f} ms",
openspace::global::windowDelegate.averageDeltaTime() * 1000.0
);
}
std::string formatDtExtremes() {
return fmt::format(
"Frametimes between: {:.2f} and {:.2f} ms",
openspace::global::windowDelegate.minDeltaTime() * 1000.0,
openspace::global::windowDelegate.maxDeltaTime() * 1000.0
);
}
std::string formatDtStandardDeviation() {
return fmt::format(
"Frametime standard deviation : {:.2f} ms",
openspace::global::windowDelegate.deltaTimeStandardDeviation() * 1000.0
);
}
std::string formatDtCoefficientOfVariation() {
return fmt::format(
"Frametime coefficient of variation : {:.2f} %",
openspace::global::windowDelegate.deltaTimeStandardDeviation() /
openspace::global::windowDelegate.averageDeltaTime() * 100.0
);
}
std::string formatFps() {
return fmt::format(
"FPS: {:3.2f}",
1.0 / openspace::global::windowDelegate.deltaTime()
);
}
std::string formatAverageFps() {
return fmt::format(
"Avg. FPS: {:3.2f}",
1.0 / openspace::global::windowDelegate.averageDeltaTime()
);
}
std::string format(openspace::DashboardItemFramerate::FrametimeType frametimeType) {
using namespace openspace;
switch (frametimeType) {
case DashboardItemFramerate::FrametimeType::DtTimeAvg:
return formatDt();
case DashboardItemFramerate::FrametimeType::DtTimeExtremes:
return formatDtExtremes();
case DashboardItemFramerate::FrametimeType::DtStandardDeviation:
return formatDtStandardDeviation();
case DashboardItemFramerate::FrametimeType::DtCoefficientOfVariation:
return formatDtCoefficientOfVariation();
case DashboardItemFramerate::FrametimeType::FPS:
return formatFps();
case DashboardItemFramerate::FrametimeType::FPSAvg:
return formatAverageFps();
default:
return "";
}
}
} // namespace
namespace openspace {
@@ -84,9 +156,8 @@ documentation::Documentation DashboardItemFramerate::Documentation() {
},
{
FrametimeInfo.identifier,
new StringInListVerifier({
"Average Deltatime", "Frames per second", "Average frames per second",
"None"
new StringInListVerifier({ ValueDtAvg, ValueDtExtremes,
ValueDtStandardDeviation, ValueDtCov, ValueFps, ValueFpsAvg, ValueNone
}),
Optional::Yes,
FrametimeInfo.description
@@ -126,21 +197,41 @@ DashboardItemFramerate::DashboardItemFramerate(const ghoul::Dictionary& dictiona
addProperty(_fontSize);
_frametimeType.addOptions({
{ static_cast<int>(FrametimeType::DtTimeAvg), "Average Deltatime" },
{ static_cast<int>(FrametimeType::FPS), "Frames per second" },
{ static_cast<int>(FrametimeType::FPSAvg), "Average frames per second" },
{ static_cast<int>(FrametimeType::None), "None" }
{ static_cast<int>(FrametimeType::DtTimeAvg), ValueDtAvg },
{ static_cast<int>(FrametimeType::DtTimeExtremes), ValueDtExtremes },
{
static_cast<int>(FrametimeType::DtStandardDeviation),
ValueDtStandardDeviation
},
{
static_cast<int>(FrametimeType::DtCoefficientOfVariation),
ValueDtCov
},
{ static_cast<int>(FrametimeType::FPS), ValueFps },
{ static_cast<int>(FrametimeType::FPSAvg), ValueFpsAvg },
{ static_cast<int>(FrametimeType::None), ValueNone }
});
if (dictionary.hasKey(FrametimeInfo.identifier)) {
const std::string& v = dictionary.value<std::string>(FrametimeInfo.identifier);
if (v == "Average Deltatime") {
if (v == ValueDtAvg) {
_frametimeType = static_cast<int>(FrametimeType::DtTimeAvg);
}
else if (v == "Frames per second") {
else if (v == ValueDtExtremes) {
_frametimeType = static_cast<int>(FrametimeType::DtTimeExtremes);
}
else if (v == ValueDtStandardDeviation) {
_frametimeType =
static_cast<int>(FrametimeType::DtStandardDeviation);
}
else if (v == ValueDtCov) {
_frametimeType =
static_cast<int>(FrametimeType::DtCoefficientOfVariation);
}
else if (v == ValueFps) {
_frametimeType = static_cast<int>(FrametimeType::FPS);
}
else if (v == "Average frames per second") {
else if (v == ValueFpsAvg) {
_frametimeType = static_cast<int>(FrametimeType::FPSAvg);
}
else {
@@ -157,69 +248,33 @@ DashboardItemFramerate::DashboardItemFramerate(const ghoul::Dictionary& dictiona
void DashboardItemFramerate::render(glm::vec2& penPosition) {
FrametimeType frametimeType = FrametimeType(_frametimeType.value());
switch (frametimeType) {
case FrametimeType::DtTimeAvg:
penPosition.y -= _font->height();
RenderFont(
*_font,
penPosition,
fmt::format(
"Avg. Frametime: {:.5f}", global::windowDelegate.averageDeltaTime()
)
);
break;
case FrametimeType::FPS:
penPosition.y -= _font->height();
RenderFont(
*_font,
penPosition,
fmt::format("FPS: {:3.2f}", 1.0 / global::windowDelegate.deltaTime())
);
break;
case FrametimeType::FPSAvg:
penPosition.y -= _font->height();
RenderFont(
*_font,
penPosition,
fmt::format(
"Avg. FPS: {:3.2f}", 1.0 / global::windowDelegate.averageDeltaTime()
)
);
break;
case FrametimeType::None:
break;
}
const std::string output = format(frametimeType);
int nLines = output.empty() ? 0 :
(std::count(output.begin(), output.end(), '\n') + 1);
penPosition.y -= _font->height() * static_cast<float>(nLines);
ghoul::fontrendering::FontRenderer::defaultRenderer().render(
*_font,
penPosition,
output
);
}
glm::vec2 DashboardItemFramerate::size() const {
FrametimeType frametimeType = FrametimeType(_frametimeType.value());
switch (frametimeType) {
case FrametimeType::DtTimeAvg:
return ghoul::fontrendering::FontRenderer::defaultRenderer().boundingBox(
*_font,
fmt::format(
"Avg. Frametime: {:.5f}", global::windowDelegate.averageDeltaTime()
)
).boundingBox;
case FrametimeType::FPS:
return ghoul::fontrendering::FontRenderer::defaultRenderer().boundingBox(
*_font,
fmt::format(
"FPS: {:3.2f}", 1.0 / global::windowDelegate.deltaTime()
)
).boundingBox;
case FrametimeType::FPSAvg:
return ghoul::fontrendering::FontRenderer::defaultRenderer().boundingBox(
*_font,
fmt::format(
"Avg. FPS: %3.2f", 1.0 / global::windowDelegate.averageDeltaTime()
)
).boundingBox;
case FrametimeType::None:
return { 0.f, 0.f };
default:
return { 0.f, 0.f };
const std::string output = format(frametimeType);
if (output.empty()) {
return { 0.f, 0.f };
}
return ghoul::fontrendering::FontRenderer::defaultRenderer().boundingBox(
*_font,
output
).boundingBox;
}
} // namespace openspace

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *
@@ -42,6 +42,9 @@ class DashboardItemFramerate : public DashboardItem {
public:
enum class FrametimeType {
DtTimeAvg = 0,
DtTimeExtremes,
DtStandardDeviation,
DtCoefficientOfVariation,
FPS,
FPSAvg,
None

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -1,133 +0,0 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* *
* 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/base/rendering/wavefrontgeometry.h>
#include "ghoul/logging/logmanager.h"
#include <tiny_obj_loader.h>
namespace {
static const std::string _loggerCat = "WavefrontGeometry";
}
namespace openspace {
namespace modelgeometry {
WavefrontGeometry::WavefrontGeometry(const ghoul::Dictionary& dictionary)
: ModelGeometry(dictionary)
{
loadObj(_file);
}
bool WavefrontGeometry::initialize(Renderable* parent) {
bool success = ModelGeometry::initialize(parent);
return success;
}
void WavefrontGeometry::deinitialize() {
ModelGeometry::deinitialize();
}
bool WavefrontGeometry::loadModel(const std::string& filename) {
std::vector<tinyobj::shape_t> shapes;
std::vector<tinyobj::material_t> materials;
std::string err;
bool success = tinyobj::LoadObj(
shapes,
materials,
err,
filename.c_str(),
filename.c_str()
);
if (!success) {
LERROR(err);
return false;
}
if (shapes.size() > 1) {
LWARNING("Loading models with more than one shape is currently untested");
}
size_t totalSizeIndex = 0;
size_t totalSizeVertex = 0;
for (int i = 0; i < shapes.size(); ++i) {
totalSizeIndex += shapes[i].mesh.indices.size();
totalSizeVertex += shapes[i].mesh.positions.size();
if (shapes[i].mesh.positions.size() != shapes[i].mesh.normals.size())
LERROR(
"#positions (" << shapes[i].mesh.positions.size() << ")"
" != #normals (" << shapes[i].mesh.normals.size()
);
}
_vertices.resize(totalSizeVertex);
std::memset(_vertices.data(), 0, _vertices.size() * sizeof(Vertex));
_indices.resize(totalSizeIndex);
std::memset(_indices.data(), 0, _indices.size() * sizeof(int));
// We add all shapes of the model into the same vertex array, one after the other
// The _shapeCounts array stores for each shape, how many vertices that shape has
size_t currentPosition = 0;
size_t p = 0;
psc tmp;
for (int i = 0; i < shapes.size(); ++i) {
for (int j = 0; j < shapes[i].mesh.positions.size() / 3; ++j) {
tmp = PowerScaledCoordinate::CreatePowerScaledCoordinate(
shapes[i].mesh.positions[3 * j + 0],
shapes[i].mesh.positions[3 * j + 1],
shapes[i].mesh.positions[3 * j + 2]
);
_vertices[j + currentPosition].location[0] = tmp[0];
_vertices[j + currentPosition].location[1] = tmp[1];
_vertices[j + currentPosition].location[2] = tmp[2];
_vertices[j + currentPosition].location[3] = tmp[3];
_vertices[j + currentPosition].normal[0] = shapes[i].mesh.normals[3 * j + 0];
_vertices[j + currentPosition].normal[1] = shapes[i].mesh.normals[3 * j + 1];
_vertices[j + currentPosition].normal[2] = shapes[i].mesh.normals[3 * j + 2];
if (2 * j + 1 < shapes[i].mesh.texcoords.size()) {
_vertices[j + currentPosition].tex[0] = shapes[i].mesh.texcoords[2*j + 0];
_vertices[j + currentPosition].tex[1] = shapes[i].mesh.texcoords[2*j + 1];
}
}
currentPosition += shapes[i].mesh.positions.size() / 3;
std::copy(
shapes[i].mesh.indices.begin(),
shapes[i].mesh.indices.end(),
_indices.begin() + p
);
p += shapes[i].mesh.indices.size();
}
return true;
}
} // namespace modelgeometry
} // namespace openspace

View File

@@ -1,51 +0,0 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* *
* 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 __OPENSPACE_MODULE_BASE___WAVEFRONTGEOMETRY___H__
#define __OPENSPACE_MODULE_BASE___WAVEFRONTGEOMETRY___H__
#include <modules/base/rendering/modelgeometry.h>
namespace openspace {
class RenderableModel;
class RenderableModelProjection;
namespace modelgeometry {
class WavefrontGeometry : public ModelGeometry {
public:
WavefrontGeometry(const ghoul::Dictionary& dictionary);
bool initialize(Renderable* parent) override;
void deinitialize() override;
private:
bool loadModel(const std::string& filename);
};
} // namespace modelgeometry
} // namespace openspace
#endif // __OPENSPACE_MODULE_BASE___WAVEFRONTGEOMETRY___H__

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

View File

@@ -2,7 +2,7 @@
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* Copyright (c) 2014-2019 *
* *
* 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 *

Some files were not shown because too many files have changed in this diff Show More