From be8a5f9764204dfabaf0800a1c4962d0407c21c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Lemaire?= Date: Tue, 24 Mar 2020 23:03:54 +0100 Subject: [PATCH] Regrouped basics/system/definition/software into core --- .gitignore | 2 +- src/basics/ColorHSL.h | 15 -- src/basics/basics.pro | 32 ---- src/basics/basics_global.h | 34 ---- src/common.pri | 2 +- .../AtmosphereDefinition.cpp | 0 .../AtmosphereDefinition.h | 4 +- .../AtmosphereModelBruneton.cpp | 0 .../AtmosphereModelBruneton.h | 4 +- .../software => core}/AtmosphereRenderer.cpp | 0 .../software => core}/AtmosphereRenderer.h | 2 +- .../software => core}/AtmosphereResult.cpp | 0 .../software => core}/AtmosphereResult.h | 4 +- .../BaseCloudLayerRenderer.cpp | 2 +- .../BaseCloudLayerRenderer.h | 2 +- .../clouds => core}/BaseCloudsModel.cpp | 0 .../clouds => core}/BaseCloudsModel.h | 4 +- src/{basics => core}/BoundingBox.cpp | 0 src/{basics => core}/BoundingBox.h | 4 +- src/{system => core}/CacheFile.cpp | 0 src/{system => core}/CacheFile.h | 4 +- src/{definition => core}/CameraDefinition.cpp | 0 src/{definition => core}/CameraDefinition.h | 4 +- src/{render/software => core}/Canvas.cpp | 0 src/{render/software => core}/Canvas.h | 4 +- .../software => core}/CanvasFragment.cpp | 0 .../software => core}/CanvasFragment.h | 4 +- .../software => core}/CanvasLiveClient.cpp | 0 .../software => core}/CanvasLiveClient.h | 4 +- .../software => core}/CanvasPictureWriter.cpp | 0 .../software => core}/CanvasPictureWriter.h | 4 +- src/{render/software => core}/CanvasPixel.cpp | 0 src/{render/software => core}/CanvasPixel.h | 4 +- .../software => core}/CanvasPixelShader.cpp | 0 .../software => core}/CanvasPixelShader.h | 2 +- .../software => core}/CanvasPortion.cpp | 0 src/{render/software => core}/CanvasPortion.h | 4 +- .../software => core}/CanvasPreview.cpp | 0 src/{render/software => core}/CanvasPreview.h | 4 +- src/{basics => core}/CappedCylinder.cpp | 0 src/{basics => core}/CappedCylinder.h | 4 +- .../CelestialBodyDefinition.cpp | 0 .../CelestialBodyDefinition.h | 4 +- .../CloudBasicLayerRenderer.cpp | 2 +- .../CloudBasicLayerRenderer.h | 4 +- .../CloudLayerDefinition.cpp | 0 .../CloudLayerDefinition.h | 4 +- .../clouds => core}/CloudModelAltoCumulus.cpp | 0 .../clouds => core}/CloudModelAltoCumulus.h | 2 +- .../clouds => core}/CloudModelCirrus.cpp | 0 .../clouds => core}/CloudModelCirrus.h | 2 +- .../CloudModelCumuloNimbus.cpp | 0 .../clouds => core}/CloudModelCumuloNimbus.h | 2 +- .../CloudModelStratoCumulus.cpp | 0 .../clouds => core}/CloudModelStratoCumulus.h | 2 +- src/{definition => core}/CloudsDefinition.cpp | 0 src/{definition => core}/CloudsDefinition.h | 4 +- .../software => core}/CloudsRenderer.cpp | 10 +- .../software => core}/CloudsRenderer.h | 4 +- src/{basics => core}/Color.cpp | 0 src/{basics => core}/Color.h | 18 +- src/{definition => core}/ColorDiff.cpp | 0 src/{definition => core}/ColorDiff.h | 4 +- src/{basics => core}/ColorHSL.cpp | 0 src/core/ColorHSL.h | 15 ++ src/{definition => core}/ColorNode.cpp | 0 src/{definition => core}/ColorNode.h | 4 +- src/{basics => core}/ColorProfile.cpp | 0 src/{basics => core}/ColorProfile.h | 4 +- src/{basics => core}/Curve.cpp | 0 src/{basics => core}/Curve.h | 4 +- src/{system => core}/DataFile.cpp | 0 src/{system => core}/DataFile.h | 4 +- src/{definition => core}/DefinitionDiff.cpp | 0 src/{definition => core}/DefinitionDiff.h | 4 +- src/{definition => core}/DefinitionNode.cpp | 0 src/{definition => core}/DefinitionNode.h | 4 +- .../DefinitionWatcher.cpp | 0 src/{definition => core}/DefinitionWatcher.h | 4 +- src/{definition => core}/DiffManager.cpp | 0 src/{definition => core}/DiffManager.h | 4 +- src/{basics => core}/Disk.cpp | 0 src/{basics => core}/Disk.h | 4 +- src/{system => core}/FileSystem.cpp | 0 src/{system => core}/FileSystem.h | 4 +- src/{definition => core}/FloatDiff.cpp | 0 src/{definition => core}/FloatDiff.h | 4 +- src/{definition => core}/FloatNode.cpp | 0 src/{definition => core}/FloatNode.h | 4 +- .../FluidMediumInterface.cpp | 0 .../software => core}/FluidMediumInterface.h | 4 +- .../software => core}/FluidMediumManager.cpp | 0 .../software => core}/FluidMediumManager.h | 4 +- src/{basics => core}/FractalNoise.cpp | 0 src/{basics => core}/FractalNoise.h | 4 +- src/{basics => core}/Geometry.cpp | 0 src/{basics => core}/Geometry.h | 4 +- .../GodRaysDefinition.cpp | 0 src/{definition => core}/GodRaysDefinition.h | 4 +- .../software => core}/GodRaysResult.cpp | 0 src/{render/software => core}/GodRaysResult.h | 4 +- .../software => core}/GodRaysSampler.cpp | 0 .../software => core}/GodRaysSampler.h | 4 +- src/{basics => core}/InfiniteCylinder.cpp | 0 src/{basics => core}/InfiniteCylinder.h | 4 +- src/{basics => core}/InfinitePlane.cpp | 0 src/{basics => core}/InfinitePlane.h | 4 +- src/{basics => core}/InfiniteRay.cpp | 0 src/{basics => core}/InfiniteRay.h | 4 +- src/{definition => core}/IntDiff.cpp | 0 src/{definition => core}/IntDiff.h | 4 +- src/{definition => core}/IntNode.cpp | 0 src/{definition => core}/IntNode.h | 4 +- src/{basics => core}/Interpolation.cpp | 0 src/{basics => core}/Interpolation.h | 4 +- src/{definition => core}/Layers.cpp | 0 src/{definition => core}/Layers.h | 4 +- src/{definition => core}/LayersDiff.cpp | 0 src/{definition => core}/LayersDiff.h | 4 +- .../software => core}/LightComponent.cpp | 0 .../software => core}/LightComponent.h | 4 +- src/{render/software => core}/LightFilter.cpp | 0 src/{render/software => core}/LightFilter.h | 4 +- src/{render/software => core}/LightSource.cpp | 0 src/{render/software => core}/LightSource.h | 4 +- src/{render/software => core}/LightStatus.cpp | 0 src/{render/software => core}/LightStatus.h | 4 +- .../software => core}/LightingManager.cpp | 0 .../software => core}/LightingManager.h | 4 +- src/{system => core}/Logs.cpp | 0 src/{system => core}/Logs.h | 4 +- src/{definition => core}/MaterialNode.cpp | 0 src/{definition => core}/MaterialNode.h | 4 +- src/{basics => core}/Maths.cpp | 0 src/{basics => core}/Maths.h | 4 +- src/{basics => core}/Matrix4.cpp | 0 src/{basics => core}/Matrix4.h | 4 +- src/{system => core}/Memory.cpp | 0 src/{system => core}/Memory.h | 4 +- .../software => core}/MoonRenderer.cpp | 0 src/{render/software => core}/MoonRenderer.h | 4 +- src/{system => core}/Mutex.cpp | 0 src/{system => core}/Mutex.h | 4 +- src/{render/software => core}/NightSky.cpp | 0 src/{render/software => core}/NightSky.h | 4 +- src/{basics => core}/NoiseFunctionPerlin.cpp | 0 src/{basics => core}/NoiseFunctionPerlin.h | 4 +- src/{basics => core}/NoiseFunctionSimplex.cpp | 0 src/{basics => core}/NoiseFunctionSimplex.h | 4 +- src/{basics => core}/NoiseGenerator.cpp | 0 src/{basics => core}/NoiseGenerator.h | 4 +- src/{definition => core}/NoiseNode.cpp | 0 src/{definition => core}/NoiseNode.h | 4 +- src/{basics => core}/NoiseState.cpp | 0 src/{basics => core}/NoiseState.h | 4 +- .../software => core}/OverlayRasterizer.cpp | 0 .../software => core}/OverlayRasterizer.h | 4 +- src/{system => core}/PackStream.cpp | 0 src/{system => core}/PackStream.h | 4 +- src/{definition => core}/PaintedGrid.cpp | 0 src/{definition => core}/PaintedGrid.h | 4 +- src/{definition => core}/PaintedGridBrush.cpp | 0 src/{definition => core}/PaintedGridBrush.h | 14 +- src/{definition => core}/PaintedGridData.cpp | 0 src/{definition => core}/PaintedGridData.h | 2 +- src/{system => core}/ParallelPool.cpp | 0 src/{system => core}/ParallelPool.h | 4 +- src/{system => core}/ParallelWork.cpp | 0 src/{system => core}/ParallelWork.h | 4 +- src/{system => core}/ParallelWorker.cpp | 0 src/{system => core}/ParallelWorker.h | 4 +- src/{system => core}/PictureWriter.cpp | 0 src/{system => core}/PictureWriter.h | 4 +- src/{system => core}/RandomGenerator.cpp | 0 src/{system => core}/RandomGenerator.h | 4 +- src/{render/software => core}/Rasterizer.cpp | 0 src/{render/software => core}/Rasterizer.h | 4 +- .../software => core}/RayCastingManager.cpp | 0 .../software => core}/RayCastingManager.h | 4 +- .../software => core}/RayCastingResult.cpp | 0 .../software => core}/RayCastingResult.h | 4 +- .../software => core}/RenderConfig.cpp | 0 src/{render/software => core}/RenderConfig.h | 4 +- .../software => core}/RenderProgress.cpp | 0 .../software => core}/RenderProgress.h | 4 +- src/{definition => core}/Scenery.cpp | 0 src/{definition => core}/Scenery.h | 4 +- src/{system => core}/Semaphore.cpp | 0 src/{system => core}/Semaphore.h | 2 +- .../software => core}/SkyRasterizer.cpp | 0 src/{render/software => core}/SkyRasterizer.h | 4 +- .../SoftwareCanvasRenderer.cpp | 0 .../SoftwareCanvasRenderer.h | 4 +- .../software => core}/SoftwareRenderer.cpp | 0 .../software => core}/SoftwareRenderer.h | 4 +- src/{basics => core}/SpaceGridIterator.cpp | 0 src/{basics => core}/SpaceGridIterator.h | 4 +- src/{basics => core}/SpaceSegment.cpp | 0 src/{basics => core}/SpaceSegment.h | 4 +- src/{basics => core}/Sphere.cpp | 0 src/{basics => core}/Sphere.h | 4 +- src/{definition => core}/SurfaceMaterial.cpp | 0 src/{definition => core}/SurfaceMaterial.h | 4 +- src/{system => core}/System.cpp | 0 src/{system => core}/System.h | 4 +- .../TerrainDefinition.cpp | 0 src/{definition => core}/TerrainDefinition.h | 4 +- src/{definition => core}/TerrainHeightMap.cpp | 0 src/{definition => core}/TerrainHeightMap.h | 4 +- .../software => core}/TerrainRasterizer.cpp | 0 .../software => core}/TerrainRasterizer.h | 4 +- .../software => core}/TerrainRayWalker.cpp | 0 .../software => core}/TerrainRayWalker.h | 4 +- .../software => core}/TerrainRenderer.cpp | 0 .../software => core}/TerrainRenderer.h | 4 +- src/{basics => core}/Texture2D.cpp | 0 src/{basics => core}/Texture2D.h | 4 +- src/{basics => core}/Texture3D.cpp | 0 src/{basics => core}/Texture3D.h | 4 +- src/{basics => core}/Texture4D.cpp | 0 src/{basics => core}/Texture4D.h | 4 +- .../TextureLayerDefinition.cpp | 0 .../TextureLayerDefinition.h | 4 +- .../TexturesDefinition.cpp | 0 src/{definition => core}/TexturesDefinition.h | 4 +- .../software => core}/TexturesRenderer.cpp | 0 .../software => core}/TexturesRenderer.h | 4 +- src/{system => core}/Thread.cpp | 0 src/{system => core}/Thread.h | 4 +- src/{definition => core}/TimeManager.cpp | 0 src/{definition => core}/TimeManager.h | 4 +- src/{system => core}/Timing.cpp | 0 src/{system => core}/Timing.h | 4 +- src/{basics => core}/Vector3.cpp | 0 src/{basics => core}/Vector3.h | 18 +- .../VegetationDefinition.cpp | 0 .../VegetationDefinition.h | 4 +- .../VegetationInstance.cpp | 0 src/{definition => core}/VegetationInstance.h | 4 +- .../VegetationLayerDefinition.cpp | 0 .../VegetationLayerDefinition.h | 4 +- .../VegetationModelDefinition.cpp | 0 .../VegetationModelDefinition.h | 4 +- .../VegetationModelRenderer.cpp | 0 .../VegetationModelRenderer.h | 4 +- .../VegetationPresenceDefinition.cpp | 0 .../VegetationPresenceDefinition.h | 4 +- .../VegetationRasterizer.cpp | 0 .../software => core}/VegetationRasterizer.h | 4 +- .../software => core}/VegetationRenderer.cpp | 0 .../software => core}/VegetationRenderer.h | 4 +- .../software => core}/VegetationResult.cpp | 0 .../software => core}/VegetationResult.h | 4 +- src/{definition => core}/WaterDefinition.cpp | 0 src/{definition => core}/WaterDefinition.h | 4 +- .../software => core}/WaterRasterizer.cpp | 0 .../software => core}/WaterRasterizer.h | 2 +- .../software => core}/WaterRenderer.cpp | 0 src/{render/software => core}/WaterRenderer.h | 4 +- src/{definition => core}/Zone.cpp | 0 src/{definition => core}/Zone.h | 4 +- src/{system/system.pro => core/core.pro} | 8 +- src/core/core_global.h | 175 ++++++++++++++++++ src/definition/definition.pro | 38 ---- src/definition/definition_global.h | 57 ------ src/interface/commandline/commandline.pro | 28 +-- src/interface/commandline/tests.cpp | 2 +- src/interface/modeler/modeler.pro | 28 +-- src/interface/modeler/modeler_global.h | 4 +- src/paysages.pro | 5 +- src/render/opengl/opengl.pro | 28 +-- src/render/opengl/opengl_global.h | 2 +- src/render/software/software.pro | 47 ----- src/render/software/software_global.h | 72 ------- src/system/system_global.h | 47 ----- src/tests/GodRaysSampler_Test.cpp | 8 +- src/tests/tests.pro | 28 +-- 277 files changed, 494 insertions(+), 723 deletions(-) delete mode 100644 src/basics/ColorHSL.h delete mode 100644 src/basics/basics.pro delete mode 100644 src/basics/basics_global.h rename src/{definition => core}/AtmosphereDefinition.cpp (100%) rename src/{definition => core}/AtmosphereDefinition.h (94%) rename src/{render/software => core}/AtmosphereModelBruneton.cpp (100%) rename src/{render/software => core}/AtmosphereModelBruneton.h (88%) rename src/{render/software => core}/AtmosphereRenderer.cpp (100%) rename src/{render/software => core}/AtmosphereRenderer.h (97%) rename src/{render/software => core}/AtmosphereResult.cpp (100%) rename src/{render/software => core}/AtmosphereResult.h (77%) rename src/{render/software => core}/BaseCloudLayerRenderer.cpp (98%) rename src/{render/software => core}/BaseCloudLayerRenderer.h (95%) rename src/{render/software/clouds => core}/BaseCloudsModel.cpp (100%) rename src/{render/software/clouds => core}/BaseCloudsModel.h (92%) rename src/{basics => core}/BoundingBox.cpp (100%) rename src/{basics => core}/BoundingBox.h (80%) rename src/{system => core}/CacheFile.cpp (100%) rename src/{system => core}/CacheFile.h (83%) rename src/{definition => core}/CameraDefinition.cpp (100%) rename src/{definition => core}/CameraDefinition.h (96%) rename src/{render/software => core}/Canvas.cpp (100%) rename src/{render/software => core}/Canvas.h (95%) rename src/{render/software => core}/CanvasFragment.cpp (100%) rename src/{render/software => core}/CanvasFragment.h (93%) rename src/{render/software => core}/CanvasLiveClient.cpp (100%) rename src/{render/software => core}/CanvasLiveClient.h (81%) rename src/{render/software => core}/CanvasPictureWriter.cpp (100%) rename src/{render/software => core}/CanvasPictureWriter.h (90%) rename src/{render/software => core}/CanvasPixel.cpp (100%) rename src/{render/software => core}/CanvasPixel.h (92%) rename src/{render/software => core}/CanvasPixelShader.cpp (100%) rename src/{render/software => core}/CanvasPixelShader.h (96%) rename src/{render/software => core}/CanvasPortion.cpp (100%) rename src/{render/software => core}/CanvasPortion.h (96%) rename src/{render/software => core}/CanvasPreview.cpp (100%) rename src/{render/software => core}/CanvasPreview.h (93%) rename src/{basics => core}/CappedCylinder.cpp (100%) rename src/{basics => core}/CappedCylinder.h (91%) rename src/{definition => core}/CelestialBodyDefinition.cpp (100%) rename src/{definition => core}/CelestialBodyDefinition.h (91%) rename src/{render/software => core}/CloudBasicLayerRenderer.cpp (99%) rename src/{render/software => core}/CloudBasicLayerRenderer.h (89%) rename src/{definition => core}/CloudLayerDefinition.cpp (100%) rename src/{definition => core}/CloudLayerDefinition.h (92%) rename src/{render/software/clouds => core}/CloudModelAltoCumulus.cpp (100%) rename src/{render/software/clouds => core}/CloudModelAltoCumulus.h (94%) rename src/{render/software/clouds => core}/CloudModelCirrus.cpp (100%) rename src/{render/software/clouds => core}/CloudModelCirrus.h (93%) rename src/{render/software/clouds => core}/CloudModelCumuloNimbus.cpp (100%) rename src/{render/software/clouds => core}/CloudModelCumuloNimbus.h (94%) rename src/{render/software/clouds => core}/CloudModelStratoCumulus.cpp (100%) rename src/{render/software/clouds => core}/CloudModelStratoCumulus.h (94%) rename src/{definition => core}/CloudsDefinition.cpp (100%) rename src/{definition => core}/CloudsDefinition.h (81%) rename src/{render/software => core}/CloudsRenderer.cpp (96%) rename src/{render/software => core}/CloudsRenderer.h (95%) rename src/{basics => core}/Color.cpp (100%) rename src/{basics => core}/Color.h (75%) rename src/{definition => core}/ColorDiff.cpp (100%) rename src/{definition => core}/ColorDiff.h (86%) rename src/{basics => core}/ColorHSL.cpp (100%) create mode 100644 src/core/ColorHSL.h rename src/{definition => core}/ColorNode.cpp (100%) rename src/{definition => core}/ColorNode.h (91%) rename src/{basics => core}/ColorProfile.cpp (100%) rename src/{basics => core}/ColorProfile.h (90%) rename src/{basics => core}/Curve.cpp (100%) rename src/{basics => core}/Curve.h (93%) rename src/{system => core}/DataFile.cpp (100%) rename src/{system => core}/DataFile.h (90%) rename src/{definition => core}/DefinitionDiff.cpp (100%) rename src/{definition => core}/DefinitionDiff.h (90%) rename src/{definition => core}/DefinitionNode.cpp (100%) rename src/{definition => core}/DefinitionNode.h (97%) rename src/{definition => core}/DefinitionWatcher.cpp (100%) rename src/{definition => core}/DefinitionWatcher.h (95%) rename src/{definition => core}/DiffManager.cpp (100%) rename src/{definition => core}/DiffManager.h (95%) rename src/{basics => core}/Disk.cpp (100%) rename src/{basics => core}/Disk.h (90%) rename src/{system => core}/FileSystem.cpp (100%) rename src/{system => core}/FileSystem.h (88%) rename src/{definition => core}/FloatDiff.cpp (100%) rename src/{definition => core}/FloatDiff.h (84%) rename src/{definition => core}/FloatNode.cpp (100%) rename src/{definition => core}/FloatNode.h (91%) rename src/{render/software => core}/FluidMediumInterface.cpp (100%) rename src/{render/software => core}/FluidMediumInterface.h (82%) rename src/{render/software => core}/FluidMediumManager.cpp (100%) rename src/{render/software => core}/FluidMediumManager.h (94%) rename src/{basics => core}/FractalNoise.cpp (100%) rename src/{basics => core}/FractalNoise.h (97%) rename src/{basics => core}/Geometry.cpp (100%) rename src/{basics => core}/Geometry.h (88%) rename src/{definition => core}/GodRaysDefinition.cpp (100%) rename src/{definition => core}/GodRaysDefinition.h (81%) rename src/{render/software => core}/GodRaysResult.cpp (100%) rename src/{render/software => core}/GodRaysResult.h (88%) rename src/{render/software => core}/GodRaysSampler.cpp (100%) rename src/{render/software => core}/GodRaysSampler.h (97%) rename src/{basics => core}/InfiniteCylinder.cpp (100%) rename src/{basics => core}/InfiniteCylinder.h (93%) rename src/{basics => core}/InfinitePlane.cpp (100%) rename src/{basics => core}/InfinitePlane.h (92%) rename src/{basics => core}/InfiniteRay.cpp (100%) rename src/{basics => core}/InfiniteRay.h (92%) rename src/{definition => core}/IntDiff.cpp (100%) rename src/{definition => core}/IntDiff.h (84%) rename src/{definition => core}/IntNode.cpp (100%) rename src/{definition => core}/IntNode.h (91%) rename src/{basics => core}/Interpolation.cpp (100%) rename src/{basics => core}/Interpolation.h (90%) rename src/{definition => core}/Layers.cpp (100%) rename src/{definition => core}/Layers.h (94%) rename src/{definition => core}/LayersDiff.cpp (100%) rename src/{definition => core}/LayersDiff.h (90%) rename src/{render/software => core}/LightComponent.cpp (100%) rename src/{render/software => core}/LightComponent.h (90%) rename src/{render/software => core}/LightFilter.cpp (100%) rename src/{render/software => core}/LightFilter.h (84%) rename src/{render/software => core}/LightSource.cpp (100%) rename src/{render/software => core}/LightSource.h (85%) rename src/{render/software => core}/LightStatus.cpp (100%) rename src/{render/software => core}/LightStatus.h (94%) rename src/{render/software => core}/LightingManager.cpp (100%) rename src/{render/software => core}/LightingManager.h (97%) rename src/{system => core}/Logs.cpp (100%) rename src/{system => core}/Logs.h (88%) rename src/{definition => core}/MaterialNode.cpp (100%) rename src/{definition => core}/MaterialNode.h (93%) rename src/{basics => core}/Maths.cpp (100%) rename src/{basics => core}/Maths.h (94%) rename src/{basics => core}/Matrix4.cpp (100%) rename src/{basics => core}/Matrix4.h (97%) rename src/{system => core}/Memory.cpp (100%) rename src/{system => core}/Memory.h (74%) rename src/{render/software => core}/MoonRenderer.cpp (100%) rename src/{render/software => core}/MoonRenderer.h (87%) rename src/{system => core}/Mutex.cpp (100%) rename src/{system => core}/Mutex.h (78%) rename src/{render/software => core}/NightSky.cpp (100%) rename src/{render/software => core}/NightSky.h (88%) rename src/{basics => core}/NoiseFunctionPerlin.cpp (100%) rename src/{basics => core}/NoiseFunctionPerlin.h (81%) rename src/{basics => core}/NoiseFunctionSimplex.cpp (100%) rename src/{basics => core}/NoiseFunctionSimplex.h (85%) rename src/{basics => core}/NoiseGenerator.cpp (100%) rename src/{basics => core}/NoiseGenerator.h (97%) rename src/{definition => core}/NoiseNode.cpp (100%) rename src/{definition => core}/NoiseNode.h (92%) rename src/{basics => core}/NoiseState.cpp (100%) rename src/{basics => core}/NoiseState.h (92%) rename src/{render/software => core}/OverlayRasterizer.cpp (100%) rename src/{render/software => core}/OverlayRasterizer.h (87%) rename src/{system => core}/PackStream.cpp (100%) rename src/{system => core}/PackStream.h (95%) rename src/{definition => core}/PaintedGrid.cpp (100%) rename src/{definition => core}/PaintedGrid.h (95%) rename src/{definition => core}/PaintedGridBrush.cpp (100%) rename src/{definition => core}/PaintedGridBrush.h (84%) rename src/{definition => core}/PaintedGridData.cpp (100%) rename src/{definition => core}/PaintedGridData.h (96%) rename src/{system => core}/ParallelPool.cpp (100%) rename src/{system => core}/ParallelPool.h (89%) rename src/{system => core}/ParallelWork.cpp (100%) rename src/{system => core}/ParallelWork.h (95%) rename src/{system => core}/ParallelWorker.cpp (100%) rename src/{system => core}/ParallelWorker.h (89%) rename src/{system => core}/PictureWriter.cpp (100%) rename src/{system => core}/PictureWriter.h (85%) rename src/{system => core}/RandomGenerator.cpp (100%) rename src/{system => core}/RandomGenerator.h (85%) rename src/{render/software => core}/Rasterizer.cpp (100%) rename src/{render/software => core}/Rasterizer.h (98%) rename src/{render/software => core}/RayCastingManager.cpp (100%) rename src/{render/software => core}/RayCastingManager.h (77%) rename src/{render/software => core}/RayCastingResult.cpp (100%) rename src/{render/software => core}/RayCastingResult.h (72%) rename src/{render/software => core}/RenderConfig.cpp (100%) rename src/{render/software => core}/RenderConfig.h (76%) rename src/{render/software => core}/RenderProgress.cpp (100%) rename src/{render/software => core}/RenderProgress.h (92%) rename src/{definition => core}/Scenery.cpp (100%) rename src/{definition => core}/Scenery.h (97%) rename src/{system => core}/Semaphore.cpp (100%) rename src/{system => core}/Semaphore.h (91%) rename src/{render/software => core}/SkyRasterizer.cpp (100%) rename src/{render/software => core}/SkyRasterizer.h (85%) rename src/{render/software => core}/SoftwareCanvasRenderer.cpp (100%) rename src/{render/software => core}/SoftwareCanvasRenderer.h (96%) rename src/{render/software => core}/SoftwareRenderer.cpp (100%) rename src/{render/software => core}/SoftwareRenderer.h (97%) rename src/{basics => core}/SpaceGridIterator.cpp (100%) rename src/{basics => core}/SpaceGridIterator.h (85%) rename src/{basics => core}/SpaceSegment.cpp (100%) rename src/{basics => core}/SpaceSegment.h (97%) rename src/{basics => core}/Sphere.cpp (100%) rename src/{basics => core}/Sphere.h (94%) rename src/{definition => core}/SurfaceMaterial.cpp (100%) rename src/{definition => core}/SurfaceMaterial.h (88%) rename src/{system => core}/System.cpp (100%) rename src/{system => core}/System.h (87%) rename src/{definition => core}/TerrainDefinition.cpp (100%) rename src/{definition => core}/TerrainDefinition.h (92%) rename src/{definition => core}/TerrainHeightMap.cpp (100%) rename src/{definition => core}/TerrainHeightMap.h (91%) rename src/{render/software => core}/TerrainRasterizer.cpp (100%) rename src/{render/software => core}/TerrainRasterizer.h (96%) rename src/{render/software => core}/TerrainRayWalker.cpp (100%) rename src/{render/software => core}/TerrainRayWalker.h (96%) rename src/{render/software => core}/TerrainRenderer.cpp (100%) rename src/{render/software => core}/TerrainRenderer.h (93%) rename src/{basics => core}/Texture2D.cpp (100%) rename src/{basics => core}/Texture2D.h (91%) rename src/{basics => core}/Texture3D.cpp (100%) rename src/{basics => core}/Texture3D.h (92%) rename src/{basics => core}/Texture4D.cpp (100%) rename src/{basics => core}/Texture4D.h (92%) rename src/{definition => core}/TextureLayerDefinition.cpp (100%) rename src/{definition => core}/TextureLayerDefinition.h (93%) rename src/{definition => core}/TexturesDefinition.cpp (100%) rename src/{definition => core}/TexturesDefinition.h (84%) rename src/{render/software => core}/TexturesRenderer.cpp (100%) rename src/{render/software => core}/TexturesRenderer.h (96%) rename src/{system => core}/Thread.cpp (100%) rename src/{system => core}/Thread.h (93%) rename src/{definition => core}/TimeManager.cpp (100%) rename src/{definition => core}/TimeManager.h (87%) rename src/{system => core}/Timing.cpp (100%) rename src/{system => core}/Timing.h (76%) rename src/{basics => core}/Vector3.cpp (100%) rename src/{basics => core}/Vector3.h (84%) rename src/{definition => core}/VegetationDefinition.cpp (100%) rename src/{definition => core}/VegetationDefinition.h (87%) rename src/{definition => core}/VegetationInstance.cpp (100%) rename src/{definition => core}/VegetationInstance.h (91%) rename src/{definition => core}/VegetationLayerDefinition.cpp (100%) rename src/{definition => core}/VegetationLayerDefinition.h (88%) rename src/{definition => core}/VegetationModelDefinition.cpp (100%) rename src/{definition => core}/VegetationModelDefinition.h (92%) rename src/{render/software => core}/VegetationModelRenderer.cpp (100%) rename src/{render/software => core}/VegetationModelRenderer.h (90%) rename src/{definition => core}/VegetationPresenceDefinition.cpp (100%) rename src/{definition => core}/VegetationPresenceDefinition.h (89%) rename src/{render/software => core}/VegetationRasterizer.cpp (100%) rename src/{render/software => core}/VegetationRasterizer.h (83%) rename src/{render/software => core}/VegetationRenderer.cpp (100%) rename src/{render/software => core}/VegetationRenderer.h (93%) rename src/{render/software => core}/VegetationResult.cpp (100%) rename src/{render/software => core}/VegetationResult.h (90%) rename src/{definition => core}/WaterDefinition.cpp (100%) rename src/{definition => core}/WaterDefinition.h (93%) rename src/{render/software => core}/WaterRasterizer.cpp (100%) rename src/{render/software => core}/WaterRasterizer.h (96%) rename src/{render/software => core}/WaterRenderer.cpp (100%) rename src/{render/software => core}/WaterRenderer.h (89%) rename src/{definition => core}/Zone.cpp (100%) rename src/{definition => core}/Zone.h (92%) rename src/{system/system.pro => core/core.pro} (73%) create mode 100644 src/core/core_global.h delete mode 100644 src/definition/definition.pro delete mode 100644 src/definition/definition_global.h delete mode 100644 src/render/software/software.pro delete mode 100644 src/render/software/software_global.h delete mode 100644 src/system/system_global.h diff --git a/.gitignore b/.gitignore index c7498ee..1a9adb1 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ /output/ /perf.* /pic*.png -core +/core *.pro.user *.pro.user.* qrc_*.cpp diff --git a/src/basics/ColorHSL.h b/src/basics/ColorHSL.h deleted file mode 100644 index be8871e..0000000 --- a/src/basics/ColorHSL.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -#include "basics_global.h" - -typedef struct { - double h; - double s; - double l; - double a; -} ColorHSL; - -BASICSSHARED_EXPORT Color colorFromHSL(const ColorHSL &col); -BASICSSHARED_EXPORT ColorHSL colorToHSL(const Color &col); - -BASICSSHARED_EXPORT ColorHSL colorHSLFromValues(double h, double s, double l, double a); diff --git a/src/basics/basics.pro b/src/basics/basics.pro deleted file mode 100644 index 271b244..0000000 --- a/src/basics/basics.pro +++ /dev/null @@ -1,32 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2013-10-29T17:15:02 -# -#------------------------------------------------- - -QT -= gui - -TARGET = paysages_basics -TEMPLATE = lib - -DEFINES += BASICS_LIBRARY - -include(../common.pri) - -SOURCES += $$files(*.cpp) -HEADERS += $$files(*.h) - -unix:!symbian { - maemo5 { - target.path = /opt/usr/lib - } else { - target.path = /usr/lib - } - INSTALLS += target -} - -win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../system/release/ -lpaysages_system -else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../system/debug/ -lpaysages_system -else:unix: LIBS += -L$$OUT_PWD/../system/ -lpaysages_system -INCLUDEPATH += $$PWD/../system -DEPENDPATH += $$PWD/../system diff --git a/src/basics/basics_global.h b/src/basics/basics_global.h deleted file mode 100644 index d8e73f0..0000000 --- a/src/basics/basics_global.h +++ /dev/null @@ -1,34 +0,0 @@ -#pragma once - -#include "system_global.h" - -#if defined(BASICS_LIBRARY) -#define BASICSSHARED_EXPORT DECL_EXPORT -#else -#define BASICSSHARED_EXPORT DECL_IMPORT -#endif - -namespace paysages { -namespace basics { -class Vector3; -class Matrix4; -class BoundingBox; -class SpaceGridIterator; -class SpaceSegment; -class Color; -class NoiseGenerator; -class NoiseState; -class FractalNoise; -class NoiseFunctionSimplex; -class Curve; -class ColorProfile; -class Texture2D; -class Texture3D; -class Texture4D; -class CappedCylinder; -class InfiniteRay; -class Sphere; -class InfinitePlane; -} -} -using namespace paysages::basics; diff --git a/src/common.pri b/src/common.pri index bddeac7..885a45c 100644 --- a/src/common.pri +++ b/src/common.pri @@ -1,3 +1,3 @@ CONFIG(release, debug|release): DEFINES += NDEBUG QT_NO_DEBUG_OUTPUT -CONFIG += c++14 +CONFIG += c++17 diff --git a/src/definition/AtmosphereDefinition.cpp b/src/core/AtmosphereDefinition.cpp similarity index 100% rename from src/definition/AtmosphereDefinition.cpp rename to src/core/AtmosphereDefinition.cpp diff --git a/src/definition/AtmosphereDefinition.h b/src/core/AtmosphereDefinition.h similarity index 94% rename from src/definition/AtmosphereDefinition.h rename to src/core/AtmosphereDefinition.h index 8518483..e374e7e 100644 --- a/src/definition/AtmosphereDefinition.h +++ b/src/core/AtmosphereDefinition.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "DefinitionNode.h" @@ -10,7 +10,7 @@ namespace paysages { namespace definition { -class DEFINITIONSHARED_EXPORT AtmosphereDefinition : public DefinitionNode { +class CORESHARED_EXPORT AtmosphereDefinition : public DefinitionNode { public: typedef struct { Vector3 location; diff --git a/src/render/software/AtmosphereModelBruneton.cpp b/src/core/AtmosphereModelBruneton.cpp similarity index 100% rename from src/render/software/AtmosphereModelBruneton.cpp rename to src/core/AtmosphereModelBruneton.cpp diff --git a/src/render/software/AtmosphereModelBruneton.h b/src/core/AtmosphereModelBruneton.h similarity index 88% rename from src/render/software/AtmosphereModelBruneton.h rename to src/core/AtmosphereModelBruneton.h index bd41af7..9c955a1 100644 --- a/src/render/software/AtmosphereModelBruneton.h +++ b/src/core/AtmosphereModelBruneton.h @@ -1,13 +1,13 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "LightSource.h" namespace paysages { namespace software { -class SOFTWARESHARED_EXPORT AtmosphereModelBruneton : public LightSource { +class CORESHARED_EXPORT AtmosphereModelBruneton : public LightSource { public: AtmosphereModelBruneton(SoftwareRenderer *parent); virtual ~AtmosphereModelBruneton(); diff --git a/src/render/software/AtmosphereRenderer.cpp b/src/core/AtmosphereRenderer.cpp similarity index 100% rename from src/render/software/AtmosphereRenderer.cpp rename to src/core/AtmosphereRenderer.cpp diff --git a/src/render/software/AtmosphereRenderer.h b/src/core/AtmosphereRenderer.h similarity index 97% rename from src/render/software/AtmosphereRenderer.h rename to src/core/AtmosphereRenderer.h index 901c4ba..5f27efa 100644 --- a/src/render/software/AtmosphereRenderer.h +++ b/src/core/AtmosphereRenderer.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "LightSource.h" diff --git a/src/render/software/AtmosphereResult.cpp b/src/core/AtmosphereResult.cpp similarity index 100% rename from src/render/software/AtmosphereResult.cpp rename to src/core/AtmosphereResult.cpp diff --git a/src/render/software/AtmosphereResult.h b/src/core/AtmosphereResult.h similarity index 77% rename from src/render/software/AtmosphereResult.h rename to src/core/AtmosphereResult.h index 0736d5e..6ca4476 100644 --- a/src/render/software/AtmosphereResult.h +++ b/src/core/AtmosphereResult.h @@ -1,13 +1,13 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "Color.h" namespace paysages { namespace software { -class SOFTWARESHARED_EXPORT AtmosphereResult { +class CORESHARED_EXPORT AtmosphereResult { public: AtmosphereResult(); void updateFinal(); diff --git a/src/render/software/BaseCloudLayerRenderer.cpp b/src/core/BaseCloudLayerRenderer.cpp similarity index 98% rename from src/render/software/BaseCloudLayerRenderer.cpp rename to src/core/BaseCloudLayerRenderer.cpp index 2fa991d..d044189 100644 --- a/src/render/software/BaseCloudLayerRenderer.cpp +++ b/src/core/BaseCloudLayerRenderer.cpp @@ -1,7 +1,7 @@ #include "BaseCloudLayerRenderer.h" #include "Vector3.h" -#include "clouds/BaseCloudsModel.h" +#include "BaseCloudsModel.h" BaseCloudLayerRenderer::BaseCloudLayerRenderer(SoftwareRenderer *parent) : parent(parent) { setQuality(0.5); diff --git a/src/render/software/BaseCloudLayerRenderer.h b/src/core/BaseCloudLayerRenderer.h similarity index 95% rename from src/render/software/BaseCloudLayerRenderer.h rename to src/core/BaseCloudLayerRenderer.h index 15bf747..068264c 100644 --- a/src/render/software/BaseCloudLayerRenderer.h +++ b/src/core/BaseCloudLayerRenderer.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" namespace paysages { namespace software { diff --git a/src/render/software/clouds/BaseCloudsModel.cpp b/src/core/BaseCloudsModel.cpp similarity index 100% rename from src/render/software/clouds/BaseCloudsModel.cpp rename to src/core/BaseCloudsModel.cpp diff --git a/src/render/software/clouds/BaseCloudsModel.h b/src/core/BaseCloudsModel.h similarity index 92% rename from src/render/software/clouds/BaseCloudsModel.h rename to src/core/BaseCloudsModel.h index a10d4f6..f0026eb 100644 --- a/src/render/software/clouds/BaseCloudsModel.h +++ b/src/core/BaseCloudsModel.h @@ -1,6 +1,6 @@ #pragma once -#include "../software_global.h" +#include "core_global.h" #include "Color.h" @@ -10,7 +10,7 @@ namespace software { /** * Abstract class for all cloud models (cirrus, cumulus...). */ -class SOFTWARESHARED_EXPORT BaseCloudsModel { +class CORESHARED_EXPORT BaseCloudsModel { public: BaseCloudsModel(CloudLayerDefinition *layer); virtual ~BaseCloudsModel(); diff --git a/src/basics/BoundingBox.cpp b/src/core/BoundingBox.cpp similarity index 100% rename from src/basics/BoundingBox.cpp rename to src/core/BoundingBox.cpp diff --git a/src/basics/BoundingBox.h b/src/core/BoundingBox.h similarity index 80% rename from src/basics/BoundingBox.h rename to src/core/BoundingBox.h index cb56adf..9548534 100644 --- a/src/basics/BoundingBox.h +++ b/src/core/BoundingBox.h @@ -1,11 +1,11 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" namespace paysages { namespace basics { -class BASICSSHARED_EXPORT BoundingBox { +class CORESHARED_EXPORT BoundingBox { public: BoundingBox(); diff --git a/src/system/CacheFile.cpp b/src/core/CacheFile.cpp similarity index 100% rename from src/system/CacheFile.cpp rename to src/core/CacheFile.cpp diff --git a/src/system/CacheFile.h b/src/core/CacheFile.h similarity index 83% rename from src/system/CacheFile.h rename to src/core/CacheFile.h index 01b591b..e7aa963 100644 --- a/src/system/CacheFile.h +++ b/src/core/CacheFile.h @@ -1,13 +1,13 @@ #pragma once -#include "system_global.h" +#include "core_global.h" #include namespace paysages { namespace system { -class SYSTEMSHARED_EXPORT CacheFile { +class CORESHARED_EXPORT CacheFile { public: CacheFile(const string &module, const string &ext, const string &tag1, int tag2, int tag3, int tag4, int tag5, int tag6); diff --git a/src/definition/CameraDefinition.cpp b/src/core/CameraDefinition.cpp similarity index 100% rename from src/definition/CameraDefinition.cpp rename to src/core/CameraDefinition.cpp diff --git a/src/definition/CameraDefinition.h b/src/core/CameraDefinition.h similarity index 96% rename from src/definition/CameraDefinition.h rename to src/core/CameraDefinition.h index 7c5cc5f..84a6b11 100644 --- a/src/definition/CameraDefinition.h +++ b/src/core/CameraDefinition.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "DefinitionNode.h" @@ -17,7 +17,7 @@ typedef struct { double zfar; } CameraPerspective; -class DEFINITIONSHARED_EXPORT CameraDefinition : public DefinitionNode { +class CORESHARED_EXPORT CameraDefinition : public DefinitionNode { public: CameraDefinition(DefinitionNode *parent = NULL); diff --git a/src/render/software/Canvas.cpp b/src/core/Canvas.cpp similarity index 100% rename from src/render/software/Canvas.cpp rename to src/core/Canvas.cpp diff --git a/src/render/software/Canvas.h b/src/core/Canvas.h similarity index 95% rename from src/render/software/Canvas.h rename to src/core/Canvas.h index a007723..1fc5ace 100644 --- a/src/render/software/Canvas.h +++ b/src/core/Canvas.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include #include @@ -14,7 +14,7 @@ namespace software { * Software rendering is done in portions of Canvas (in CanvasPortion class). * This splitting in portions allows to keep memory consumption low. */ -class SOFTWARESHARED_EXPORT Canvas { +class CORESHARED_EXPORT Canvas { public: Canvas(); ~Canvas(); diff --git a/src/render/software/CanvasFragment.cpp b/src/core/CanvasFragment.cpp similarity index 100% rename from src/render/software/CanvasFragment.cpp rename to src/core/CanvasFragment.cpp diff --git a/src/render/software/CanvasFragment.h b/src/core/CanvasFragment.h similarity index 93% rename from src/render/software/CanvasFragment.h rename to src/core/CanvasFragment.h index 2925aad..5c9230e 100644 --- a/src/render/software/CanvasFragment.h +++ b/src/core/CanvasFragment.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "Color.h" #include "Vector3.h" @@ -11,7 +11,7 @@ namespace software { /** * Representation of world coordinates projected in a canvas pixel. */ -class SOFTWARESHARED_EXPORT CanvasFragment { +class CORESHARED_EXPORT CanvasFragment { public: CanvasFragment() = default; CanvasFragment(bool front_facing, const Vector3 &pixel, const Vector3 &location, int client = 0, diff --git a/src/render/software/CanvasLiveClient.cpp b/src/core/CanvasLiveClient.cpp similarity index 100% rename from src/render/software/CanvasLiveClient.cpp rename to src/core/CanvasLiveClient.cpp diff --git a/src/render/software/CanvasLiveClient.h b/src/core/CanvasLiveClient.h similarity index 81% rename from src/render/software/CanvasLiveClient.h rename to src/core/CanvasLiveClient.h index 8b55e7e..a95155e 100644 --- a/src/render/software/CanvasLiveClient.h +++ b/src/core/CanvasLiveClient.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" namespace paysages { namespace software { @@ -8,7 +8,7 @@ namespace software { /** * Abstract class to receive live modifications from canvas preview. */ -class SOFTWARESHARED_EXPORT CanvasLiveClient { +class CORESHARED_EXPORT CanvasLiveClient { public: CanvasLiveClient(); diff --git a/src/render/software/CanvasPictureWriter.cpp b/src/core/CanvasPictureWriter.cpp similarity index 100% rename from src/render/software/CanvasPictureWriter.cpp rename to src/core/CanvasPictureWriter.cpp diff --git a/src/render/software/CanvasPictureWriter.h b/src/core/CanvasPictureWriter.h similarity index 90% rename from src/render/software/CanvasPictureWriter.h rename to src/core/CanvasPictureWriter.h index e1cedd0..a00ba9a 100644 --- a/src/render/software/CanvasPictureWriter.h +++ b/src/core/CanvasPictureWriter.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "PictureWriter.h" @@ -10,7 +10,7 @@ namespace software { /** * Picture writer to create the final image from canvas portions. */ -class SOFTWARESHARED_EXPORT CanvasPictureWriter : public PictureWriter { +class CORESHARED_EXPORT CanvasPictureWriter : public PictureWriter { public: CanvasPictureWriter(const Canvas *canvas); virtual ~CanvasPictureWriter(); diff --git a/src/render/software/CanvasPixel.cpp b/src/core/CanvasPixel.cpp similarity index 100% rename from src/render/software/CanvasPixel.cpp rename to src/core/CanvasPixel.cpp diff --git a/src/render/software/CanvasPixel.h b/src/core/CanvasPixel.h similarity index 92% rename from src/render/software/CanvasPixel.h rename to src/core/CanvasPixel.h index 34334e8..c0ac5fc 100644 --- a/src/render/software/CanvasPixel.h +++ b/src/core/CanvasPixel.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "CanvasFragment.h" @@ -14,7 +14,7 @@ namespace software { * * A pixel stores superimposed fragments (CanvasFragment), sorted by their distance to camera. */ -class SOFTWARESHARED_EXPORT CanvasPixel { +class CORESHARED_EXPORT CanvasPixel { public: CanvasPixel(); diff --git a/src/render/software/CanvasPixelShader.cpp b/src/core/CanvasPixelShader.cpp similarity index 100% rename from src/render/software/CanvasPixelShader.cpp rename to src/core/CanvasPixelShader.cpp diff --git a/src/render/software/CanvasPixelShader.h b/src/core/CanvasPixelShader.h similarity index 96% rename from src/render/software/CanvasPixelShader.h rename to src/core/CanvasPixelShader.h index d7219be..a20269e 100644 --- a/src/render/software/CanvasPixelShader.h +++ b/src/core/CanvasPixelShader.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "ParallelWorker.h" diff --git a/src/render/software/CanvasPortion.cpp b/src/core/CanvasPortion.cpp similarity index 100% rename from src/render/software/CanvasPortion.cpp rename to src/core/CanvasPortion.cpp diff --git a/src/render/software/CanvasPortion.h b/src/core/CanvasPortion.h similarity index 96% rename from src/render/software/CanvasPortion.h rename to src/core/CanvasPortion.h index 396d99d..ce6006f 100644 --- a/src/render/software/CanvasPortion.h +++ b/src/core/CanvasPortion.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include @@ -14,7 +14,7 @@ namespace software { * * Pixels are not allocated until preparePixels is called. */ -class SOFTWARESHARED_EXPORT CanvasPortion { +class CORESHARED_EXPORT CanvasPortion { public: CanvasPortion(int index = 0, CanvasPreview *preview = NULL); virtual ~CanvasPortion(); diff --git a/src/render/software/CanvasPreview.cpp b/src/core/CanvasPreview.cpp similarity index 100% rename from src/render/software/CanvasPreview.cpp rename to src/core/CanvasPreview.cpp diff --git a/src/render/software/CanvasPreview.h b/src/core/CanvasPreview.h similarity index 93% rename from src/render/software/CanvasPreview.h rename to src/core/CanvasPreview.h index ea0deb0..153c88a 100644 --- a/src/render/software/CanvasPreview.h +++ b/src/core/CanvasPreview.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" namespace paysages { namespace software { @@ -8,7 +8,7 @@ namespace software { /** * Smaller preview of a Canvas rendering, that can be watched live. */ -class SOFTWARESHARED_EXPORT CanvasPreview { +class CORESHARED_EXPORT CanvasPreview { public: CanvasPreview(); ~CanvasPreview(); diff --git a/src/basics/CappedCylinder.cpp b/src/core/CappedCylinder.cpp similarity index 100% rename from src/basics/CappedCylinder.cpp rename to src/core/CappedCylinder.cpp diff --git a/src/basics/CappedCylinder.h b/src/core/CappedCylinder.h similarity index 91% rename from src/basics/CappedCylinder.h rename to src/core/CappedCylinder.h index 40675a4..1cf219a 100644 --- a/src/basics/CappedCylinder.h +++ b/src/core/CappedCylinder.h @@ -1,6 +1,6 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" #include "InfiniteCylinder.h" #include "Sphere.h" @@ -11,7 +11,7 @@ namespace basics { /** * Geometric cylinder, with capped ends (not infinite). */ -class BASICSSHARED_EXPORT CappedCylinder : public InfiniteCylinder { +class CORESHARED_EXPORT CappedCylinder : public InfiniteCylinder { public: CappedCylinder() = default; CappedCylinder(const Vector3 &base, const Vector3 &direction, double radius, double length); diff --git a/src/definition/CelestialBodyDefinition.cpp b/src/core/CelestialBodyDefinition.cpp similarity index 100% rename from src/definition/CelestialBodyDefinition.cpp rename to src/core/CelestialBodyDefinition.cpp diff --git a/src/definition/CelestialBodyDefinition.h b/src/core/CelestialBodyDefinition.h similarity index 91% rename from src/definition/CelestialBodyDefinition.h rename to src/core/CelestialBodyDefinition.h index 14e820e..12c044a 100644 --- a/src/definition/CelestialBodyDefinition.h +++ b/src/core/CelestialBodyDefinition.h @@ -1,13 +1,13 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "DefinitionNode.h" namespace paysages { namespace definition { -class DEFINITIONSHARED_EXPORT CelestialBodyDefinition : public DefinitionNode { +class CORESHARED_EXPORT CelestialBodyDefinition : public DefinitionNode { public: CelestialBodyDefinition(DefinitionNode *parent, const string &name); diff --git a/src/render/software/CloudBasicLayerRenderer.cpp b/src/core/CloudBasicLayerRenderer.cpp similarity index 99% rename from src/render/software/CloudBasicLayerRenderer.cpp rename to src/core/CloudBasicLayerRenderer.cpp index b4c9a85..7969b4e 100644 --- a/src/render/software/CloudBasicLayerRenderer.cpp +++ b/src/core/CloudBasicLayerRenderer.cpp @@ -11,7 +11,7 @@ #include "NoiseGenerator.h" #include "SoftwareRenderer.h" #include "SurfaceMaterial.h" -#include "clouds/BaseCloudsModel.h" +#include "BaseCloudsModel.h" #include #include #include diff --git a/src/render/software/CloudBasicLayerRenderer.h b/src/core/CloudBasicLayerRenderer.h similarity index 89% rename from src/render/software/CloudBasicLayerRenderer.h rename to src/core/CloudBasicLayerRenderer.h index e9c74dc..346f7df 100644 --- a/src/render/software/CloudBasicLayerRenderer.h +++ b/src/core/CloudBasicLayerRenderer.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "BaseCloudLayerRenderer.h" @@ -15,7 +15,7 @@ namespace software { * This renderer simply iters through the cloud layer, collecting cloud segments. * It does not account for local density variations. */ -class SOFTWARESHARED_EXPORT CloudBasicLayerRenderer : public BaseCloudLayerRenderer { +class CORESHARED_EXPORT CloudBasicLayerRenderer : public BaseCloudLayerRenderer { public: CloudBasicLayerRenderer(SoftwareRenderer *parent); diff --git a/src/definition/CloudLayerDefinition.cpp b/src/core/CloudLayerDefinition.cpp similarity index 100% rename from src/definition/CloudLayerDefinition.cpp rename to src/core/CloudLayerDefinition.cpp diff --git a/src/definition/CloudLayerDefinition.h b/src/core/CloudLayerDefinition.h similarity index 92% rename from src/definition/CloudLayerDefinition.h rename to src/core/CloudLayerDefinition.h index 99332c0..bc464d3 100644 --- a/src/definition/CloudLayerDefinition.h +++ b/src/core/CloudLayerDefinition.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "DefinitionNode.h" @@ -9,7 +9,7 @@ namespace paysages { namespace definition { -class DEFINITIONSHARED_EXPORT CloudLayerDefinition : public DefinitionNode { +class CORESHARED_EXPORT CloudLayerDefinition : public DefinitionNode { public: CloudLayerDefinition(DefinitionNode *parent, const string &name); virtual ~CloudLayerDefinition(); diff --git a/src/render/software/clouds/CloudModelAltoCumulus.cpp b/src/core/CloudModelAltoCumulus.cpp similarity index 100% rename from src/render/software/clouds/CloudModelAltoCumulus.cpp rename to src/core/CloudModelAltoCumulus.cpp diff --git a/src/render/software/clouds/CloudModelAltoCumulus.h b/src/core/CloudModelAltoCumulus.h similarity index 94% rename from src/render/software/clouds/CloudModelAltoCumulus.h rename to src/core/CloudModelAltoCumulus.h index f8aa7e8..fd140a4 100644 --- a/src/render/software/clouds/CloudModelAltoCumulus.h +++ b/src/core/CloudModelAltoCumulus.h @@ -1,6 +1,6 @@ #pragma once -#include "../software_global.h" +#include "core_global.h" #include "BaseCloudsModel.h" diff --git a/src/render/software/clouds/CloudModelCirrus.cpp b/src/core/CloudModelCirrus.cpp similarity index 100% rename from src/render/software/clouds/CloudModelCirrus.cpp rename to src/core/CloudModelCirrus.cpp diff --git a/src/render/software/clouds/CloudModelCirrus.h b/src/core/CloudModelCirrus.h similarity index 93% rename from src/render/software/clouds/CloudModelCirrus.h rename to src/core/CloudModelCirrus.h index e2338e5..e9afe1b 100644 --- a/src/render/software/clouds/CloudModelCirrus.h +++ b/src/core/CloudModelCirrus.h @@ -1,6 +1,6 @@ #pragma once -#include "../software_global.h" +#include "core_global.h" #include "BaseCloudsModel.h" diff --git a/src/render/software/clouds/CloudModelCumuloNimbus.cpp b/src/core/CloudModelCumuloNimbus.cpp similarity index 100% rename from src/render/software/clouds/CloudModelCumuloNimbus.cpp rename to src/core/CloudModelCumuloNimbus.cpp diff --git a/src/render/software/clouds/CloudModelCumuloNimbus.h b/src/core/CloudModelCumuloNimbus.h similarity index 94% rename from src/render/software/clouds/CloudModelCumuloNimbus.h rename to src/core/CloudModelCumuloNimbus.h index 5db1cb6..99c9ef7 100644 --- a/src/render/software/clouds/CloudModelCumuloNimbus.h +++ b/src/core/CloudModelCumuloNimbus.h @@ -1,6 +1,6 @@ #pragma once -#include "../software_global.h" +#include "core_global.h" #include "BaseCloudsModel.h" diff --git a/src/render/software/clouds/CloudModelStratoCumulus.cpp b/src/core/CloudModelStratoCumulus.cpp similarity index 100% rename from src/render/software/clouds/CloudModelStratoCumulus.cpp rename to src/core/CloudModelStratoCumulus.cpp diff --git a/src/render/software/clouds/CloudModelStratoCumulus.h b/src/core/CloudModelStratoCumulus.h similarity index 94% rename from src/render/software/clouds/CloudModelStratoCumulus.h rename to src/core/CloudModelStratoCumulus.h index 77269b9..1e5afa3 100644 --- a/src/render/software/clouds/CloudModelStratoCumulus.h +++ b/src/core/CloudModelStratoCumulus.h @@ -1,6 +1,6 @@ #pragma once -#include "../software_global.h" +#include "core_global.h" #include "BaseCloudsModel.h" diff --git a/src/definition/CloudsDefinition.cpp b/src/core/CloudsDefinition.cpp similarity index 100% rename from src/definition/CloudsDefinition.cpp rename to src/core/CloudsDefinition.cpp diff --git a/src/definition/CloudsDefinition.h b/src/core/CloudsDefinition.h similarity index 81% rename from src/definition/CloudsDefinition.h rename to src/core/CloudsDefinition.h index ac56eef..7144799 100644 --- a/src/definition/CloudsDefinition.h +++ b/src/core/CloudsDefinition.h @@ -1,13 +1,13 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "Layers.h" namespace paysages { namespace definition { -class DEFINITIONSHARED_EXPORT CloudsDefinition : public Layers { +class CORESHARED_EXPORT CloudsDefinition : public Layers { public: CloudsDefinition(DefinitionNode *parent); diff --git a/src/render/software/CloudsRenderer.cpp b/src/core/CloudsRenderer.cpp similarity index 96% rename from src/render/software/CloudsRenderer.cpp rename to src/core/CloudsRenderer.cpp index e5aa26e..2dea700 100644 --- a/src/render/software/CloudsRenderer.cpp +++ b/src/core/CloudsRenderer.cpp @@ -9,11 +9,11 @@ #include "Scenery.h" #include "SoftwareRenderer.h" -#include "clouds/BaseCloudsModel.h" -#include "clouds/CloudModelAltoCumulus.h" -#include "clouds/CloudModelCirrus.h" -#include "clouds/CloudModelCumuloNimbus.h" -#include "clouds/CloudModelStratoCumulus.h" +#include "BaseCloudsModel.h" +#include "CloudModelAltoCumulus.h" +#include "CloudModelCirrus.h" +#include "CloudModelCumuloNimbus.h" +#include "CloudModelStratoCumulus.h" CloudsRenderer::CloudsRenderer(SoftwareRenderer *parent) : parent(parent) { quality = 0.5; diff --git a/src/render/software/CloudsRenderer.h b/src/core/CloudsRenderer.h similarity index 95% rename from src/render/software/CloudsRenderer.h rename to src/core/CloudsRenderer.h index 3fcf634..5044dbd 100644 --- a/src/render/software/CloudsRenderer.h +++ b/src/core/CloudsRenderer.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "LightFilter.h" @@ -12,7 +12,7 @@ namespace software { /** * Software renderer of a group of cloud layers. */ -class SOFTWARESHARED_EXPORT CloudsRenderer : public LightFilter { +class CORESHARED_EXPORT CloudsRenderer : public LightFilter { public: CloudsRenderer(SoftwareRenderer *parent); virtual ~CloudsRenderer(); diff --git a/src/basics/Color.cpp b/src/core/Color.cpp similarity index 100% rename from src/basics/Color.cpp rename to src/core/Color.cpp diff --git a/src/basics/Color.h b/src/core/Color.h similarity index 75% rename from src/basics/Color.h rename to src/core/Color.h index 1efa01c..9bccd95 100644 --- a/src/basics/Color.h +++ b/src/core/Color.h @@ -1,11 +1,11 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" namespace paysages { namespace basics { -class BASICSSHARED_EXPORT Color { +class CORESHARED_EXPORT Color { public: Color() = default; Color(const Color &col); @@ -55,12 +55,12 @@ class BASICSSHARED_EXPORT Color { double a; }; -BASICSSHARED_EXPORT extern const Color COLOR_TRANSPARENT; -BASICSSHARED_EXPORT extern const Color COLOR_BLACK; -BASICSSHARED_EXPORT extern const Color COLOR_RED; -BASICSSHARED_EXPORT extern const Color COLOR_GREEN; -BASICSSHARED_EXPORT extern const Color COLOR_BLUE; -BASICSSHARED_EXPORT extern const Color COLOR_WHITE; -BASICSSHARED_EXPORT extern const Color COLOR_GREY; +CORESHARED_EXPORT extern const Color COLOR_TRANSPARENT; +CORESHARED_EXPORT extern const Color COLOR_BLACK; +CORESHARED_EXPORT extern const Color COLOR_RED; +CORESHARED_EXPORT extern const Color COLOR_GREEN; +CORESHARED_EXPORT extern const Color COLOR_BLUE; +CORESHARED_EXPORT extern const Color COLOR_WHITE; +CORESHARED_EXPORT extern const Color COLOR_GREY; } } diff --git a/src/definition/ColorDiff.cpp b/src/core/ColorDiff.cpp similarity index 100% rename from src/definition/ColorDiff.cpp rename to src/core/ColorDiff.cpp diff --git a/src/definition/ColorDiff.h b/src/core/ColorDiff.h similarity index 86% rename from src/definition/ColorDiff.h rename to src/core/ColorDiff.h index a678e31..090879e 100644 --- a/src/definition/ColorDiff.h +++ b/src/core/ColorDiff.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "Color.h" #include "DefinitionDiff.h" @@ -11,7 +11,7 @@ namespace definition { /** * Diff for a ColorNode. */ -class DEFINITIONSHARED_EXPORT ColorDiff : public DefinitionDiff { +class CORESHARED_EXPORT ColorDiff : public DefinitionDiff { public: ColorDiff(const DefinitionNode *node, const Color &oldvalue, const Color &newvalue); ColorDiff(const ColorDiff *other, const Color &oldvalue, const Color &newvalue); diff --git a/src/basics/ColorHSL.cpp b/src/core/ColorHSL.cpp similarity index 100% rename from src/basics/ColorHSL.cpp rename to src/core/ColorHSL.cpp diff --git a/src/core/ColorHSL.h b/src/core/ColorHSL.h new file mode 100644 index 0000000..ecd48c7 --- /dev/null +++ b/src/core/ColorHSL.h @@ -0,0 +1,15 @@ +#pragma once + +#include "core_global.h" + +typedef struct { + double h; + double s; + double l; + double a; +} ColorHSL; + +CORESHARED_EXPORT Color colorFromHSL(const ColorHSL &col); +CORESHARED_EXPORT ColorHSL colorToHSL(const Color &col); + +CORESHARED_EXPORT ColorHSL colorHSLFromValues(double h, double s, double l, double a); diff --git a/src/definition/ColorNode.cpp b/src/core/ColorNode.cpp similarity index 100% rename from src/definition/ColorNode.cpp rename to src/core/ColorNode.cpp diff --git a/src/definition/ColorNode.h b/src/core/ColorNode.h similarity index 91% rename from src/definition/ColorNode.h rename to src/core/ColorNode.h index 9fc79da..5734b1f 100644 --- a/src/definition/ColorNode.h +++ b/src/core/ColorNode.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "Color.h" #include "DefinitionNode.h" @@ -11,7 +11,7 @@ namespace definition { /** * Node with a single color value, for the definition tree. */ -class DEFINITIONSHARED_EXPORT ColorNode : public DefinitionNode { +class CORESHARED_EXPORT ColorNode : public DefinitionNode { public: ColorNode(DefinitionNode *parent, const string &name, const Color &value = COLOR_TRANSPARENT); diff --git a/src/basics/ColorProfile.cpp b/src/core/ColorProfile.cpp similarity index 100% rename from src/basics/ColorProfile.cpp rename to src/core/ColorProfile.cpp diff --git a/src/basics/ColorProfile.h b/src/core/ColorProfile.h similarity index 90% rename from src/basics/ColorProfile.h rename to src/core/ColorProfile.h index 4827068..8edbb6f 100644 --- a/src/basics/ColorProfile.h +++ b/src/core/ColorProfile.h @@ -1,14 +1,14 @@ #ifndef COLORPROFILE_H #define COLORPROFILE_H -#include "basics_global.h" +#include "core_global.h" #include "Color.h" namespace paysages { namespace basics { -class BASICSSHARED_EXPORT ColorProfile { +class CORESHARED_EXPORT ColorProfile { public: typedef enum { TONE_MAPPING_UNCHARTED, TONE_MAPPING_REIHNARD, TONE_MAPPING_CLAMP } ToneMappingOperator; diff --git a/src/basics/Curve.cpp b/src/core/Curve.cpp similarity index 100% rename from src/basics/Curve.cpp rename to src/core/Curve.cpp diff --git a/src/basics/Curve.h b/src/core/Curve.h similarity index 93% rename from src/basics/Curve.h rename to src/core/Curve.h index 71e74bd..aa7c54a 100644 --- a/src/basics/Curve.h +++ b/src/core/Curve.h @@ -1,6 +1,6 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" namespace paysages { namespace basics { @@ -10,7 +10,7 @@ typedef struct { double value; } CurvePoint; -class BASICSSHARED_EXPORT Curve { +class CORESHARED_EXPORT Curve { public: Curve(); ~Curve(); diff --git a/src/system/DataFile.cpp b/src/core/DataFile.cpp similarity index 100% rename from src/system/DataFile.cpp rename to src/core/DataFile.cpp diff --git a/src/system/DataFile.h b/src/core/DataFile.h similarity index 90% rename from src/system/DataFile.h rename to src/core/DataFile.h index 9e8dadd..2cde717 100644 --- a/src/system/DataFile.h +++ b/src/core/DataFile.h @@ -1,6 +1,6 @@ #pragma once -#include "system_global.h" +#include "core_global.h" #include @@ -12,7 +12,7 @@ namespace system { /** * Locator of data files. */ -class SYSTEMSHARED_EXPORT DataFile { +class CORESHARED_EXPORT DataFile { public: /** * Find a data file. diff --git a/src/definition/DefinitionDiff.cpp b/src/core/DefinitionDiff.cpp similarity index 100% rename from src/definition/DefinitionDiff.cpp rename to src/core/DefinitionDiff.cpp diff --git a/src/definition/DefinitionDiff.h b/src/core/DefinitionDiff.h similarity index 90% rename from src/definition/DefinitionDiff.h rename to src/core/DefinitionDiff.h index 5c12e58..b096e04 100644 --- a/src/definition/DefinitionDiff.h +++ b/src/core/DefinitionDiff.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include @@ -12,7 +12,7 @@ namespace definition { * * Diffs are used to undo/redo changes. */ -class DEFINITIONSHARED_EXPORT DefinitionDiff { +class CORESHARED_EXPORT DefinitionDiff { public: DefinitionDiff(const DefinitionNode *node); DefinitionDiff(const DefinitionDiff *other); diff --git a/src/definition/DefinitionNode.cpp b/src/core/DefinitionNode.cpp similarity index 100% rename from src/definition/DefinitionNode.cpp rename to src/core/DefinitionNode.cpp diff --git a/src/definition/DefinitionNode.h b/src/core/DefinitionNode.h similarity index 97% rename from src/definition/DefinitionNode.h rename to src/core/DefinitionNode.h index bcdb86f..2f9cc6a 100644 --- a/src/definition/DefinitionNode.h +++ b/src/core/DefinitionNode.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include #include @@ -11,7 +11,7 @@ namespace definition { /** * Base class for all nodes of the definition tree. */ -class DEFINITIONSHARED_EXPORT DefinitionNode { +class CORESHARED_EXPORT DefinitionNode { public: DefinitionNode(DefinitionNode *parent, const string &name, const string &type_name = ""); virtual ~DefinitionNode(); diff --git a/src/definition/DefinitionWatcher.cpp b/src/core/DefinitionWatcher.cpp similarity index 100% rename from src/definition/DefinitionWatcher.cpp rename to src/core/DefinitionWatcher.cpp diff --git a/src/definition/DefinitionWatcher.h b/src/core/DefinitionWatcher.h similarity index 95% rename from src/definition/DefinitionWatcher.h rename to src/core/DefinitionWatcher.h index d439fef..972cc61 100644 --- a/src/definition/DefinitionWatcher.h +++ b/src/core/DefinitionWatcher.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include #include @@ -13,7 +13,7 @@ namespace definition { * * Watchers will be registered in DiffManager to receive DefinitionDiff objects. */ -class DEFINITIONSHARED_EXPORT DefinitionWatcher { +class CORESHARED_EXPORT DefinitionWatcher { public: DefinitionWatcher(const string &name); virtual ~DefinitionWatcher(); diff --git a/src/definition/DiffManager.cpp b/src/core/DiffManager.cpp similarity index 100% rename from src/definition/DiffManager.cpp rename to src/core/DiffManager.cpp diff --git a/src/definition/DiffManager.h b/src/core/DiffManager.h similarity index 95% rename from src/definition/DiffManager.h rename to src/core/DiffManager.h index d93d59d..accd42c 100644 --- a/src/definition/DiffManager.h +++ b/src/core/DiffManager.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include @@ -12,7 +12,7 @@ namespace definition { * * Watchers can register themselves to received these diffs. */ -class DEFINITIONSHARED_EXPORT DiffManager { +class CORESHARED_EXPORT DiffManager { public: DiffManager(DefinitionNode *tree); ~DiffManager(); diff --git a/src/basics/Disk.cpp b/src/core/Disk.cpp similarity index 100% rename from src/basics/Disk.cpp rename to src/core/Disk.cpp diff --git a/src/basics/Disk.h b/src/core/Disk.h similarity index 90% rename from src/basics/Disk.h rename to src/core/Disk.h index e0c4176..16185bd 100644 --- a/src/basics/Disk.h +++ b/src/core/Disk.h @@ -1,6 +1,6 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" #include "InfinitePlane.h" @@ -10,7 +10,7 @@ namespace basics { /** * Geometric plane disk. */ -class BASICSSHARED_EXPORT Disk : public InfinitePlane { +class CORESHARED_EXPORT Disk : public InfinitePlane { public: Disk() = default; Disk(const Vector3 &point, const Vector3 &normal, double radius); diff --git a/src/system/FileSystem.cpp b/src/core/FileSystem.cpp similarity index 100% rename from src/system/FileSystem.cpp rename to src/core/FileSystem.cpp diff --git a/src/system/FileSystem.h b/src/core/FileSystem.h similarity index 88% rename from src/system/FileSystem.h rename to src/core/FileSystem.h index 09ac30b..a654382 100644 --- a/src/system/FileSystem.h +++ b/src/core/FileSystem.h @@ -1,13 +1,13 @@ #pragma once -#include "system_global.h" +#include "core_global.h" #include namespace paysages { namespace system { -class SYSTEMSHARED_EXPORT FileSystem { +class CORESHARED_EXPORT FileSystem { public: /** * Get an absolute path to a temporary file. diff --git a/src/definition/FloatDiff.cpp b/src/core/FloatDiff.cpp similarity index 100% rename from src/definition/FloatDiff.cpp rename to src/core/FloatDiff.cpp diff --git a/src/definition/FloatDiff.h b/src/core/FloatDiff.h similarity index 84% rename from src/definition/FloatDiff.h rename to src/core/FloatDiff.h index ba332b5..02df33b 100644 --- a/src/definition/FloatDiff.h +++ b/src/core/FloatDiff.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "DefinitionDiff.h" @@ -10,7 +10,7 @@ namespace definition { /** * Diff for a FloatNode. */ -class DEFINITIONSHARED_EXPORT FloatDiff : public DefinitionDiff { +class CORESHARED_EXPORT FloatDiff : public DefinitionDiff { public: FloatDiff(const DefinitionNode *node, double oldvalue, double newvalue); FloatDiff(const FloatDiff *other, double oldvalue, double newvalue); diff --git a/src/definition/FloatNode.cpp b/src/core/FloatNode.cpp similarity index 100% rename from src/definition/FloatNode.cpp rename to src/core/FloatNode.cpp diff --git a/src/definition/FloatNode.h b/src/core/FloatNode.h similarity index 91% rename from src/definition/FloatNode.h rename to src/core/FloatNode.h index 99a3dc8..77a1072 100644 --- a/src/definition/FloatNode.h +++ b/src/core/FloatNode.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "DefinitionNode.h" @@ -10,7 +10,7 @@ namespace definition { /** * Node with a single floating point numeric value, for the definition tree. */ -class DEFINITIONSHARED_EXPORT FloatNode : public DefinitionNode { +class CORESHARED_EXPORT FloatNode : public DefinitionNode { public: FloatNode(DefinitionNode *parent, const string &name, double value = 0.0); diff --git a/src/render/software/FluidMediumInterface.cpp b/src/core/FluidMediumInterface.cpp similarity index 100% rename from src/render/software/FluidMediumInterface.cpp rename to src/core/FluidMediumInterface.cpp diff --git a/src/render/software/FluidMediumInterface.h b/src/core/FluidMediumInterface.h similarity index 82% rename from src/render/software/FluidMediumInterface.h rename to src/core/FluidMediumInterface.h index e4e328e..81b0cfb 100644 --- a/src/render/software/FluidMediumInterface.h +++ b/src/core/FluidMediumInterface.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" namespace paysages { namespace software { @@ -8,7 +8,7 @@ namespace software { /** * Interface to a fluid medium compatible class. */ -class SOFTWARESHARED_EXPORT FluidMediumInterface { +class CORESHARED_EXPORT FluidMediumInterface { public: /** * Return true if the object may change the fluid medium on the given segment. diff --git a/src/render/software/FluidMediumManager.cpp b/src/core/FluidMediumManager.cpp similarity index 100% rename from src/render/software/FluidMediumManager.cpp rename to src/core/FluidMediumManager.cpp diff --git a/src/render/software/FluidMediumManager.h b/src/core/FluidMediumManager.h similarity index 94% rename from src/render/software/FluidMediumManager.h rename to src/core/FluidMediumManager.h index b576b8c..a233fd0 100644 --- a/src/render/software/FluidMediumManager.h +++ b/src/core/FluidMediumManager.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "SpaceSegment.h" @@ -21,7 +21,7 @@ typedef struct { * medium density and properties. * It is mainly used to compute the alteration made by such media on light. */ -class SOFTWARESHARED_EXPORT FluidMediumManager { +class CORESHARED_EXPORT FluidMediumManager { public: FluidMediumManager(SoftwareRenderer *renderer); virtual ~FluidMediumManager(); diff --git a/src/basics/FractalNoise.cpp b/src/core/FractalNoise.cpp similarity index 100% rename from src/basics/FractalNoise.cpp rename to src/core/FractalNoise.cpp diff --git a/src/basics/FractalNoise.h b/src/core/FractalNoise.h similarity index 97% rename from src/basics/FractalNoise.h rename to src/core/FractalNoise.h index 3123915..d8cfad4 100644 --- a/src/basics/FractalNoise.h +++ b/src/core/FractalNoise.h @@ -1,6 +1,6 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" #include "NoiseState.h" #include @@ -11,7 +11,7 @@ namespace basics { /** * Fractal noise generator, based on a sum of simple noise functions. */ -class BASICSSHARED_EXPORT FractalNoise { +class CORESHARED_EXPORT FractalNoise { public: FractalNoise(); virtual ~FractalNoise(); diff --git a/src/basics/Geometry.cpp b/src/core/Geometry.cpp similarity index 100% rename from src/basics/Geometry.cpp rename to src/core/Geometry.cpp diff --git a/src/basics/Geometry.h b/src/core/Geometry.h similarity index 88% rename from src/basics/Geometry.h rename to src/core/Geometry.h index 83ae48d..335a2f2 100644 --- a/src/basics/Geometry.h +++ b/src/core/Geometry.h @@ -1,11 +1,11 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" namespace paysages { namespace basics { -class BASICSSHARED_EXPORT Geometry { +class CORESHARED_EXPORT Geometry { public: static double get2DAngle(double x, double y); static Vector3 getNormalFromTriangle(const Vector3 ¢er, const Vector3 &bottom, const Vector3 &right); diff --git a/src/definition/GodRaysDefinition.cpp b/src/core/GodRaysDefinition.cpp similarity index 100% rename from src/definition/GodRaysDefinition.cpp rename to src/core/GodRaysDefinition.cpp diff --git a/src/definition/GodRaysDefinition.h b/src/core/GodRaysDefinition.h similarity index 81% rename from src/definition/GodRaysDefinition.h rename to src/core/GodRaysDefinition.h index 3b612c9..6d4ce32 100644 --- a/src/definition/GodRaysDefinition.h +++ b/src/core/GodRaysDefinition.h @@ -1,13 +1,13 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "DefinitionNode.h" namespace paysages { namespace definition { -class DEFINITIONSHARED_EXPORT GodRaysDefinition : public DefinitionNode { +class CORESHARED_EXPORT GodRaysDefinition : public DefinitionNode { public: GodRaysDefinition(DefinitionNode *parent); diff --git a/src/render/software/GodRaysResult.cpp b/src/core/GodRaysResult.cpp similarity index 100% rename from src/render/software/GodRaysResult.cpp rename to src/core/GodRaysResult.cpp diff --git a/src/render/software/GodRaysResult.h b/src/core/GodRaysResult.h similarity index 88% rename from src/render/software/GodRaysResult.h rename to src/core/GodRaysResult.h index 1ab78a4..2509a28 100644 --- a/src/render/software/GodRaysResult.h +++ b/src/core/GodRaysResult.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "Color.h" @@ -10,7 +10,7 @@ namespace software { /** * Result of god rays computation. */ -class SOFTWARESHARED_EXPORT GodRaysResult { +class CORESHARED_EXPORT GodRaysResult { public: typedef struct { double penetration; diff --git a/src/render/software/GodRaysSampler.cpp b/src/core/GodRaysSampler.cpp similarity index 100% rename from src/render/software/GodRaysSampler.cpp rename to src/core/GodRaysSampler.cpp diff --git a/src/render/software/GodRaysSampler.h b/src/core/GodRaysSampler.h similarity index 97% rename from src/render/software/GodRaysSampler.h rename to src/core/GodRaysSampler.h index b8cae1f..f000e9d 100644 --- a/src/render/software/GodRaysSampler.h +++ b/src/core/GodRaysSampler.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" namespace paysages { namespace software { @@ -8,7 +8,7 @@ namespace software { /** * 3D sampler for "god rays". */ -class SOFTWARESHARED_EXPORT GodRaysSampler { +class CORESHARED_EXPORT GodRaysSampler { public: GodRaysSampler(); ~GodRaysSampler(); diff --git a/src/basics/InfiniteCylinder.cpp b/src/core/InfiniteCylinder.cpp similarity index 100% rename from src/basics/InfiniteCylinder.cpp rename to src/core/InfiniteCylinder.cpp diff --git a/src/basics/InfiniteCylinder.h b/src/core/InfiniteCylinder.h similarity index 93% rename from src/basics/InfiniteCylinder.h rename to src/core/InfiniteCylinder.h index fa70e60..a448997 100644 --- a/src/basics/InfiniteCylinder.h +++ b/src/core/InfiniteCylinder.h @@ -1,6 +1,6 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" #include "InfiniteRay.h" @@ -10,7 +10,7 @@ namespace basics { /** * Geometric cylinder, with infinite length. */ -class BASICSSHARED_EXPORT InfiniteCylinder { +class CORESHARED_EXPORT InfiniteCylinder { public: InfiniteCylinder() = default; InfiniteCylinder(const InfiniteRay &axis, double radius); diff --git a/src/basics/InfinitePlane.cpp b/src/core/InfinitePlane.cpp similarity index 100% rename from src/basics/InfinitePlane.cpp rename to src/core/InfinitePlane.cpp diff --git a/src/basics/InfinitePlane.h b/src/core/InfinitePlane.h similarity index 92% rename from src/basics/InfinitePlane.h rename to src/core/InfinitePlane.h index c6359e7..a48a340 100644 --- a/src/basics/InfinitePlane.h +++ b/src/core/InfinitePlane.h @@ -1,6 +1,6 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" #include "Vector3.h" @@ -10,7 +10,7 @@ namespace basics { /** * Infinite 3d geometric plane. */ -class BASICSSHARED_EXPORT InfinitePlane { +class CORESHARED_EXPORT InfinitePlane { public: InfinitePlane(); InfinitePlane(const Vector3 &point, const Vector3 &normal); diff --git a/src/basics/InfiniteRay.cpp b/src/core/InfiniteRay.cpp similarity index 100% rename from src/basics/InfiniteRay.cpp rename to src/core/InfiniteRay.cpp diff --git a/src/basics/InfiniteRay.h b/src/core/InfiniteRay.h similarity index 92% rename from src/basics/InfiniteRay.h rename to src/core/InfiniteRay.h index edf77f2..816cc8c 100644 --- a/src/basics/InfiniteRay.h +++ b/src/core/InfiniteRay.h @@ -1,6 +1,6 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" #include "Vector3.h" @@ -10,7 +10,7 @@ namespace basics { /** * Infinite ray (line). */ -class BASICSSHARED_EXPORT InfiniteRay { +class CORESHARED_EXPORT InfiniteRay { public: InfiniteRay() = default; InfiniteRay(const Vector3 &origin, const Vector3 &direction); diff --git a/src/definition/IntDiff.cpp b/src/core/IntDiff.cpp similarity index 100% rename from src/definition/IntDiff.cpp rename to src/core/IntDiff.cpp diff --git a/src/definition/IntDiff.h b/src/core/IntDiff.h similarity index 84% rename from src/definition/IntDiff.h rename to src/core/IntDiff.h index 7b0e9e7..294c1c7 100644 --- a/src/definition/IntDiff.h +++ b/src/core/IntDiff.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "DefinitionDiff.h" @@ -10,7 +10,7 @@ namespace definition { /** * Diff for an IntNode. */ -class DEFINITIONSHARED_EXPORT IntDiff : public DefinitionDiff { +class CORESHARED_EXPORT IntDiff : public DefinitionDiff { public: IntDiff(const DefinitionNode *node, int oldvalue, int newvalue); IntDiff(const IntDiff *other, int oldvalue, int newvalue); diff --git a/src/definition/IntNode.cpp b/src/core/IntNode.cpp similarity index 100% rename from src/definition/IntNode.cpp rename to src/core/IntNode.cpp diff --git a/src/definition/IntNode.h b/src/core/IntNode.h similarity index 91% rename from src/definition/IntNode.h rename to src/core/IntNode.h index a7183d6..99961fc 100644 --- a/src/definition/IntNode.h +++ b/src/core/IntNode.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "DefinitionNode.h" @@ -10,7 +10,7 @@ namespace definition { /** * Node with a single integer value, for the definition tree. */ -class DEFINITIONSHARED_EXPORT IntNode : public DefinitionNode { +class CORESHARED_EXPORT IntNode : public DefinitionNode { public: IntNode(DefinitionNode *parent, const string &name, int value = 0); diff --git a/src/basics/Interpolation.cpp b/src/core/Interpolation.cpp similarity index 100% rename from src/basics/Interpolation.cpp rename to src/core/Interpolation.cpp diff --git a/src/basics/Interpolation.h b/src/core/Interpolation.h similarity index 90% rename from src/basics/Interpolation.h rename to src/core/Interpolation.h index 17b1d5f..3adffc5 100644 --- a/src/basics/Interpolation.h +++ b/src/core/Interpolation.h @@ -1,11 +1,11 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" namespace paysages { namespace basics { -class BASICSSHARED_EXPORT Interpolation { +class CORESHARED_EXPORT Interpolation { public: static inline double linear(double p1, double p2, double x) { return p1 + x * (p2 - p1); diff --git a/src/definition/Layers.cpp b/src/core/Layers.cpp similarity index 100% rename from src/definition/Layers.cpp rename to src/core/Layers.cpp diff --git a/src/definition/Layers.h b/src/core/Layers.h similarity index 94% rename from src/definition/Layers.h rename to src/core/Layers.h index b84e711..9c0d491 100644 --- a/src/definition/Layers.h +++ b/src/core/Layers.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "DefinitionNode.h" @@ -12,7 +12,7 @@ typedef DefinitionNode *(*LayerConstructor)(Layers *parent, const string &name); /** * Layers of definitions, ideally all of the same type. */ -class DEFINITIONSHARED_EXPORT Layers : public DefinitionNode { +class CORESHARED_EXPORT Layers : public DefinitionNode { public: Layers(DefinitionNode *parent, const string &name, LayerConstructor layer_constructor); virtual ~Layers(); diff --git a/src/definition/LayersDiff.cpp b/src/core/LayersDiff.cpp similarity index 100% rename from src/definition/LayersDiff.cpp rename to src/core/LayersDiff.cpp diff --git a/src/definition/LayersDiff.h b/src/core/LayersDiff.h similarity index 90% rename from src/definition/LayersDiff.h rename to src/core/LayersDiff.h index e93f819..9161086 100644 --- a/src/definition/LayersDiff.h +++ b/src/core/LayersDiff.h @@ -1,13 +1,13 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "DefinitionDiff.h" namespace paysages { namespace definition { -class DEFINITIONSHARED_EXPORT LayersDiff : public DefinitionDiff { +class CORESHARED_EXPORT LayersDiff : public DefinitionDiff { public: typedef enum { LAYER_ADDED, LAYER_REMOVED } LayersDiffOp; diff --git a/src/render/software/LightComponent.cpp b/src/core/LightComponent.cpp similarity index 100% rename from src/render/software/LightComponent.cpp rename to src/core/LightComponent.cpp diff --git a/src/render/software/LightComponent.h b/src/core/LightComponent.h similarity index 90% rename from src/render/software/LightComponent.h rename to src/core/LightComponent.h index 03dee40..5a7e31a 100644 --- a/src/render/software/LightComponent.h +++ b/src/core/LightComponent.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "Color.h" #include "Vector3.h" @@ -13,7 +13,7 @@ namespace software { * * A light component represents the amount of light received at a point from a given direction. */ -class SOFTWARESHARED_EXPORT LightComponent { +class CORESHARED_EXPORT LightComponent { public: LightComponent() = default; LightComponent(const Color &color, const Vector3 &direction, double reflection = 0.0, bool altered = true); diff --git a/src/render/software/LightFilter.cpp b/src/core/LightFilter.cpp similarity index 100% rename from src/render/software/LightFilter.cpp rename to src/core/LightFilter.cpp diff --git a/src/render/software/LightFilter.h b/src/core/LightFilter.h similarity index 84% rename from src/render/software/LightFilter.h rename to src/core/LightFilter.h index 630863d..c332f86 100644 --- a/src/render/software/LightFilter.h +++ b/src/core/LightFilter.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" namespace paysages { namespace software { @@ -8,7 +8,7 @@ namespace software { /** * Interface for rendering parts that can alter light. */ -class SOFTWARESHARED_EXPORT LightFilter { +class CORESHARED_EXPORT LightFilter { public: /** * Apply filtering on a light component. diff --git a/src/render/software/LightSource.cpp b/src/core/LightSource.cpp similarity index 100% rename from src/render/software/LightSource.cpp rename to src/core/LightSource.cpp diff --git a/src/render/software/LightSource.h b/src/core/LightSource.h similarity index 85% rename from src/render/software/LightSource.h rename to src/core/LightSource.h index 2c6a892..6b53518 100644 --- a/src/render/software/LightSource.h +++ b/src/core/LightSource.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include @@ -10,7 +10,7 @@ namespace software { /** * Source of dynamic lights. */ -class SOFTWARESHARED_EXPORT LightSource { +class CORESHARED_EXPORT LightSource { public: LightSource() = default; diff --git a/src/render/software/LightStatus.cpp b/src/core/LightStatus.cpp similarity index 100% rename from src/render/software/LightStatus.cpp rename to src/core/LightStatus.cpp diff --git a/src/render/software/LightStatus.h b/src/core/LightStatus.h similarity index 94% rename from src/render/software/LightStatus.h rename to src/core/LightStatus.h index f2e9c62..9b27800 100644 --- a/src/render/software/LightStatus.h +++ b/src/core/LightStatus.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "LightComponent.h" @@ -14,7 +14,7 @@ namespace software { * * The light status is the combination of all LightComponent received at a given location. */ -class SOFTWARESHARED_EXPORT LightStatus { +class CORESHARED_EXPORT LightStatus { public: LightStatus(LightingManager *manager, const Vector3 &location, const Vector3 &eye, bool filtered = true); diff --git a/src/render/software/LightingManager.cpp b/src/core/LightingManager.cpp similarity index 100% rename from src/render/software/LightingManager.cpp rename to src/core/LightingManager.cpp diff --git a/src/render/software/LightingManager.h b/src/core/LightingManager.h similarity index 97% rename from src/render/software/LightingManager.h rename to src/core/LightingManager.h index 0196916..5e705c1 100644 --- a/src/render/software/LightingManager.h +++ b/src/core/LightingManager.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "LightComponent.h" @@ -17,7 +17,7 @@ namespace software { * There are both static and dynamic lights. * A dynamic light depends on the location at which the lighting occurs. */ -class SOFTWARESHARED_EXPORT LightingManager { +class CORESHARED_EXPORT LightingManager { public: LightingManager(); diff --git a/src/system/Logs.cpp b/src/core/Logs.cpp similarity index 100% rename from src/system/Logs.cpp rename to src/core/Logs.cpp diff --git a/src/system/Logs.h b/src/core/Logs.h similarity index 88% rename from src/system/Logs.h rename to src/core/Logs.h index 1cc5e5b..74b77e5 100644 --- a/src/system/Logs.h +++ b/src/core/Logs.h @@ -1,6 +1,6 @@ #pragma once -#include "system_global.h" +#include "core_global.h" #include @@ -10,7 +10,7 @@ namespace system { /** * Logger streams */ -class SYSTEMSHARED_EXPORT Logs { +class CORESHARED_EXPORT Logs { public: static ostream &debug(const string &logger); static ostream &warning(const string &logger); diff --git a/src/definition/MaterialNode.cpp b/src/core/MaterialNode.cpp similarity index 100% rename from src/definition/MaterialNode.cpp rename to src/core/MaterialNode.cpp diff --git a/src/definition/MaterialNode.h b/src/core/MaterialNode.h similarity index 93% rename from src/definition/MaterialNode.h rename to src/core/MaterialNode.h index a482508..b6e94da 100644 --- a/src/definition/MaterialNode.h +++ b/src/core/MaterialNode.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "DefinitionNode.h" #include @@ -11,7 +11,7 @@ namespace definition { /** * Raw surface material for the definition tree, with an optional bump mapping noise. */ -class DEFINITIONSHARED_EXPORT MaterialNode : public DefinitionNode { +class CORESHARED_EXPORT MaterialNode : public DefinitionNode { public: MaterialNode(DefinitionNode *parent, const string &name); diff --git a/src/basics/Maths.cpp b/src/core/Maths.cpp similarity index 100% rename from src/basics/Maths.cpp rename to src/core/Maths.cpp diff --git a/src/basics/Maths.h b/src/core/Maths.h similarity index 94% rename from src/basics/Maths.h rename to src/core/Maths.h index 1e0bd45..f4530e2 100644 --- a/src/basics/Maths.h +++ b/src/core/Maths.h @@ -1,6 +1,6 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" namespace paysages { namespace basics { @@ -8,7 +8,7 @@ namespace basics { /** * Basic math utilities. */ -class BASICSSHARED_EXPORT Maths { +class CORESHARED_EXPORT Maths { public: /** * Constraint a value in the [min,max[ range, by applying a modulo. diff --git a/src/basics/Matrix4.cpp b/src/core/Matrix4.cpp similarity index 100% rename from src/basics/Matrix4.cpp rename to src/core/Matrix4.cpp diff --git a/src/basics/Matrix4.h b/src/core/Matrix4.h similarity index 97% rename from src/basics/Matrix4.h rename to src/core/Matrix4.h index 0e6dc4c..e27b1af 100644 --- a/src/basics/Matrix4.h +++ b/src/core/Matrix4.h @@ -1,11 +1,11 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" namespace paysages { namespace basics { -class BASICSSHARED_EXPORT Matrix4 { +class CORESHARED_EXPORT Matrix4 { public: Matrix4(bool identity = true); Matrix4(double a, double b, double c, double d, double e, double f, double g, double h, double i, double j, diff --git a/src/system/Memory.cpp b/src/core/Memory.cpp similarity index 100% rename from src/system/Memory.cpp rename to src/core/Memory.cpp diff --git a/src/system/Memory.h b/src/core/Memory.h similarity index 74% rename from src/system/Memory.h rename to src/core/Memory.h index efffc0c..d18f86a 100644 --- a/src/system/Memory.h +++ b/src/core/Memory.h @@ -1,11 +1,11 @@ #pragma once -#include "system_global.h" +#include "core_global.h" namespace paysages { namespace system { -class SYSTEMSHARED_EXPORT Memory { +class CORESHARED_EXPORT Memory { public: static void *naiveArrayInsert(void **array, unsigned long item_size, int item_count, int location); }; diff --git a/src/render/software/MoonRenderer.cpp b/src/core/MoonRenderer.cpp similarity index 100% rename from src/render/software/MoonRenderer.cpp rename to src/core/MoonRenderer.cpp diff --git a/src/render/software/MoonRenderer.h b/src/core/MoonRenderer.h similarity index 87% rename from src/render/software/MoonRenderer.h rename to src/core/MoonRenderer.h index 73e5e30..986447f 100644 --- a/src/render/software/MoonRenderer.h +++ b/src/core/MoonRenderer.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "DefinitionWatcher.h" #include "LightSource.h" @@ -13,7 +13,7 @@ namespace software { /** * Moon renderer. */ -class SOFTWARESHARED_EXPORT MoonRenderer : public DefinitionWatcher, public LightSource { +class CORESHARED_EXPORT MoonRenderer : public DefinitionWatcher, public LightSource { public: MoonRenderer(CelestialBodyDefinition *moon_node); virtual ~MoonRenderer(); diff --git a/src/system/Mutex.cpp b/src/core/Mutex.cpp similarity index 100% rename from src/system/Mutex.cpp rename to src/core/Mutex.cpp diff --git a/src/system/Mutex.h b/src/core/Mutex.h similarity index 78% rename from src/system/Mutex.h rename to src/core/Mutex.h index 7afd576..9b2f592 100644 --- a/src/system/Mutex.h +++ b/src/core/Mutex.h @@ -1,6 +1,6 @@ #pragma once -#include "system_global.h" +#include "core_global.h" #include @@ -10,7 +10,7 @@ namespace system { /** * System mutex */ -class SYSTEMSHARED_EXPORT Mutex : private mutex { +class CORESHARED_EXPORT Mutex : private mutex { public: /** * Create a new mutex diff --git a/src/render/software/NightSky.cpp b/src/core/NightSky.cpp similarity index 100% rename from src/render/software/NightSky.cpp rename to src/core/NightSky.cpp diff --git a/src/render/software/NightSky.h b/src/core/NightSky.h similarity index 88% rename from src/render/software/NightSky.h rename to src/core/NightSky.h index e5542da..3c97b66 100644 --- a/src/render/software/NightSky.h +++ b/src/core/NightSky.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "LightSource.h" @@ -10,7 +10,7 @@ namespace software { /** * Night sky renderer. */ -class SOFTWARESHARED_EXPORT NightSky : public LightSource { +class CORESHARED_EXPORT NightSky : public LightSource { public: NightSky(SoftwareRenderer *renderer); virtual ~NightSky(); diff --git a/src/basics/NoiseFunctionPerlin.cpp b/src/core/NoiseFunctionPerlin.cpp similarity index 100% rename from src/basics/NoiseFunctionPerlin.cpp rename to src/core/NoiseFunctionPerlin.cpp diff --git a/src/basics/NoiseFunctionPerlin.h b/src/core/NoiseFunctionPerlin.h similarity index 81% rename from src/basics/NoiseFunctionPerlin.h rename to src/core/NoiseFunctionPerlin.h index a1b8ecd..ae4be7d 100644 --- a/src/basics/NoiseFunctionPerlin.h +++ b/src/core/NoiseFunctionPerlin.h @@ -1,11 +1,11 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" namespace paysages { namespace basics { -class BASICSSHARED_EXPORT NoiseFunctionPerlin { +class CORESHARED_EXPORT NoiseFunctionPerlin { public: NoiseFunctionPerlin(); }; diff --git a/src/basics/NoiseFunctionSimplex.cpp b/src/core/NoiseFunctionSimplex.cpp similarity index 100% rename from src/basics/NoiseFunctionSimplex.cpp rename to src/core/NoiseFunctionSimplex.cpp diff --git a/src/basics/NoiseFunctionSimplex.h b/src/core/NoiseFunctionSimplex.h similarity index 85% rename from src/basics/NoiseFunctionSimplex.h rename to src/core/NoiseFunctionSimplex.h index 2821644..0549971 100644 --- a/src/basics/NoiseFunctionSimplex.h +++ b/src/core/NoiseFunctionSimplex.h @@ -1,13 +1,13 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" #include "FractalNoise.h" namespace paysages { namespace basics { -class BASICSSHARED_EXPORT NoiseFunctionSimplex : public FractalNoise { +class CORESHARED_EXPORT NoiseFunctionSimplex : public FractalNoise { virtual double getBase2d(double x, double y) const override; virtual double getBase3d(double x, double y, double z) const override; diff --git a/src/basics/NoiseGenerator.cpp b/src/core/NoiseGenerator.cpp similarity index 100% rename from src/basics/NoiseGenerator.cpp rename to src/core/NoiseGenerator.cpp diff --git a/src/basics/NoiseGenerator.h b/src/core/NoiseGenerator.h similarity index 97% rename from src/basics/NoiseGenerator.h rename to src/core/NoiseGenerator.h index 82f73aa..9accf08 100644 --- a/src/basics/NoiseGenerator.h +++ b/src/core/NoiseGenerator.h @@ -1,6 +1,6 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" #define MAX_LEVEL_COUNT 30 #include "NoiseState.h" @@ -8,7 +8,7 @@ namespace paysages { namespace basics { -class BASICSSHARED_EXPORT NoiseGenerator { +class CORESHARED_EXPORT NoiseGenerator { public: typedef enum { NOISE_FUNCTION_PERLIN, NOISE_FUNCTION_SIMPLEX, NOISE_FUNCTION_CUSTOM } NoiseFunctionAlgorithm; diff --git a/src/definition/NoiseNode.cpp b/src/core/NoiseNode.cpp similarity index 100% rename from src/definition/NoiseNode.cpp rename to src/core/NoiseNode.cpp diff --git a/src/definition/NoiseNode.h b/src/core/NoiseNode.h similarity index 92% rename from src/definition/NoiseNode.h rename to src/core/NoiseNode.h index 074f845..f696198 100644 --- a/src/definition/NoiseNode.h +++ b/src/core/NoiseNode.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "DefinitionNode.h" @@ -10,7 +10,7 @@ namespace definition { /** * Definition node with noise parameters. */ -class DEFINITIONSHARED_EXPORT NoiseNode : public DefinitionNode { +class CORESHARED_EXPORT NoiseNode : public DefinitionNode { public: NoiseNode(DefinitionNode *parent, const string &name = "noise"); virtual ~NoiseNode(); diff --git a/src/basics/NoiseState.cpp b/src/core/NoiseState.cpp similarity index 100% rename from src/basics/NoiseState.cpp rename to src/core/NoiseState.cpp diff --git a/src/basics/NoiseState.h b/src/core/NoiseState.h similarity index 92% rename from src/basics/NoiseState.h rename to src/core/NoiseState.h index 267d446..44acf4a 100644 --- a/src/basics/NoiseState.h +++ b/src/core/NoiseState.h @@ -1,6 +1,6 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" #include @@ -12,7 +12,7 @@ namespace basics { * * This state contains the noise offsets for noise layers. */ -class BASICSSHARED_EXPORT NoiseState { +class CORESHARED_EXPORT NoiseState { public: typedef struct { double x; diff --git a/src/render/software/OverlayRasterizer.cpp b/src/core/OverlayRasterizer.cpp similarity index 100% rename from src/render/software/OverlayRasterizer.cpp rename to src/core/OverlayRasterizer.cpp diff --git a/src/render/software/OverlayRasterizer.h b/src/core/OverlayRasterizer.h similarity index 87% rename from src/render/software/OverlayRasterizer.h rename to src/core/OverlayRasterizer.h index 4b6e1fb..21b19d1 100644 --- a/src/render/software/OverlayRasterizer.h +++ b/src/core/OverlayRasterizer.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "Rasterizer.h" @@ -12,7 +12,7 @@ namespace software { * * It's a rasterizer that puts a single quad in front of camera, in order to apply a shader on each pixel. */ -class SOFTWARESHARED_EXPORT OverlayRasterizer : public Rasterizer { +class CORESHARED_EXPORT OverlayRasterizer : public Rasterizer { public: OverlayRasterizer(SoftwareCanvasRenderer *renderer); diff --git a/src/system/PackStream.cpp b/src/core/PackStream.cpp similarity index 100% rename from src/system/PackStream.cpp rename to src/core/PackStream.cpp diff --git a/src/system/PackStream.h b/src/core/PackStream.h similarity index 95% rename from src/system/PackStream.h rename to src/core/PackStream.h index 2b1fa1d..60b781a 100644 --- a/src/system/PackStream.h +++ b/src/core/PackStream.h @@ -1,6 +1,6 @@ #pragma once -#include "system_global.h" +#include "core_global.h" #include @@ -10,7 +10,7 @@ namespace system { /** * Data (de)serialization in files or streams. */ -class SYSTEMSHARED_EXPORT PackStream { +class CORESHARED_EXPORT PackStream { public: PackStream(); /** diff --git a/src/definition/PaintedGrid.cpp b/src/core/PaintedGrid.cpp similarity index 100% rename from src/definition/PaintedGrid.cpp rename to src/core/PaintedGrid.cpp diff --git a/src/definition/PaintedGrid.h b/src/core/PaintedGrid.h similarity index 95% rename from src/definition/PaintedGrid.h rename to src/core/PaintedGrid.h index df02745..5862936 100644 --- a/src/definition/PaintedGrid.h +++ b/src/core/PaintedGrid.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "DefinitionNode.h" @@ -14,7 +14,7 @@ namespace definition { * * Grid cells are considered to be 1.0-sized. */ -class DEFINITIONSHARED_EXPORT PaintedGrid : public DefinitionNode { +class CORESHARED_EXPORT PaintedGrid : public DefinitionNode { public: PaintedGrid(DefinitionNode *parent = 0); virtual ~PaintedGrid(); diff --git a/src/definition/PaintedGridBrush.cpp b/src/core/PaintedGridBrush.cpp similarity index 100% rename from src/definition/PaintedGridBrush.cpp rename to src/core/PaintedGridBrush.cpp diff --git a/src/definition/PaintedGridBrush.h b/src/core/PaintedGridBrush.h similarity index 84% rename from src/definition/PaintedGridBrush.h rename to src/core/PaintedGridBrush.h index 3863e0d..5932614 100644 --- a/src/definition/PaintedGridBrush.h +++ b/src/core/PaintedGridBrush.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" namespace paysages { namespace definition { @@ -8,7 +8,7 @@ namespace definition { /** * Base class for brushes that can be used to paint values on a PaintedGrid. */ -class DEFINITIONSHARED_EXPORT PaintedGridBrush { +class CORESHARED_EXPORT PaintedGridBrush { public: PaintedGridBrush(double hard_radius, double smoothed_size, double total_radius); @@ -37,7 +37,7 @@ class DEFINITIONSHARED_EXPORT PaintedGridBrush { /** * Brush able to raise or lower the grid value. */ -class DEFINITIONSHARED_EXPORT PaintedGridBrushRaiseLower : public PaintedGridBrush { +class CORESHARED_EXPORT PaintedGridBrushRaiseLower : public PaintedGridBrush { public: PaintedGridBrushRaiseLower(const PaintedGridBrush &brush) : PaintedGridBrush(brush) { } @@ -48,7 +48,7 @@ class DEFINITIONSHARED_EXPORT PaintedGridBrushRaiseLower : public PaintedGridBru /** * Brush able to smooth the value in an area. */ -class DEFINITIONSHARED_EXPORT PaintedGridBrushSmooth : public PaintedGridBrush { +class CORESHARED_EXPORT PaintedGridBrushSmooth : public PaintedGridBrush { public: PaintedGridBrushSmooth(const PaintedGridBrush &brush) : PaintedGridBrush(brush) { } @@ -59,7 +59,7 @@ class DEFINITIONSHARED_EXPORT PaintedGridBrushSmooth : public PaintedGridBrush { /** * Brush able to add random fractal noise. */ -class DEFINITIONSHARED_EXPORT PaintedGridBrushAddNoise : public PaintedGridBrush { +class CORESHARED_EXPORT PaintedGridBrushAddNoise : public PaintedGridBrush { public: PaintedGridBrushAddNoise(const PaintedGridBrush &brush, NoiseGenerator *generator) : PaintedGridBrush(brush), generator(generator) { @@ -74,7 +74,7 @@ class DEFINITIONSHARED_EXPORT PaintedGridBrushAddNoise : public PaintedGridBrush /** * Brush able to reset to initial value. */ -class DEFINITIONSHARED_EXPORT PaintedGridBrushReset : public PaintedGridBrush { +class CORESHARED_EXPORT PaintedGridBrushReset : public PaintedGridBrush { public: PaintedGridBrushReset(const PaintedGridBrush &brush) : PaintedGridBrush(brush) { } @@ -85,7 +85,7 @@ class DEFINITIONSHARED_EXPORT PaintedGridBrushReset : public PaintedGridBrush { /** * Brush able to flatten to a specific value. */ -class DEFINITIONSHARED_EXPORT PaintedGridBrushFlatten : public PaintedGridBrush { +class CORESHARED_EXPORT PaintedGridBrushFlatten : public PaintedGridBrush { public: PaintedGridBrushFlatten(const PaintedGridBrush &brush, double target) : PaintedGridBrush(brush), target(target) { } diff --git a/src/definition/PaintedGridData.cpp b/src/core/PaintedGridData.cpp similarity index 100% rename from src/definition/PaintedGridData.cpp rename to src/core/PaintedGridData.cpp diff --git a/src/definition/PaintedGridData.h b/src/core/PaintedGridData.h similarity index 96% rename from src/definition/PaintedGridData.h rename to src/core/PaintedGridData.h index 4c1ae2f..c379493 100644 --- a/src/definition/PaintedGridData.h +++ b/src/core/PaintedGridData.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" namespace paysages { namespace definition { diff --git a/src/system/ParallelPool.cpp b/src/core/ParallelPool.cpp similarity index 100% rename from src/system/ParallelPool.cpp rename to src/core/ParallelPool.cpp diff --git a/src/system/ParallelPool.h b/src/core/ParallelPool.h similarity index 89% rename from src/system/ParallelPool.h rename to src/core/ParallelPool.h index dc0fac7..4eac433 100644 --- a/src/system/ParallelPool.h +++ b/src/core/ParallelPool.h @@ -1,6 +1,6 @@ #pragma once -#include "system_global.h" +#include "core_global.h" #include @@ -10,7 +10,7 @@ namespace system { /** * Pool to handle a group of threads doing the same task. */ -class SYSTEMSHARED_EXPORT ParallelPool { +class CORESHARED_EXPORT ParallelPool { public: ParallelPool(); virtual ~ParallelPool(); diff --git a/src/system/ParallelWork.cpp b/src/core/ParallelWork.cpp similarity index 100% rename from src/system/ParallelWork.cpp rename to src/core/ParallelWork.cpp diff --git a/src/system/ParallelWork.h b/src/core/ParallelWork.h similarity index 95% rename from src/system/ParallelWork.h rename to src/core/ParallelWork.h index 65e7de9..d87cf19 100644 --- a/src/system/ParallelWork.h +++ b/src/core/ParallelWork.h @@ -1,13 +1,13 @@ #pragma once -#include "system_global.h" +#include "core_global.h" #define PARALLEL_MAX_THREADS 20 namespace paysages { namespace system { -class SYSTEMSHARED_EXPORT ParallelWork { +class CORESHARED_EXPORT ParallelWork { public: typedef int (*ParallelUnitFunction)(ParallelWork *work, int unit, void *data); diff --git a/src/system/ParallelWorker.cpp b/src/core/ParallelWorker.cpp similarity index 100% rename from src/system/ParallelWorker.cpp rename to src/core/ParallelWorker.cpp diff --git a/src/system/ParallelWorker.h b/src/core/ParallelWorker.h similarity index 89% rename from src/system/ParallelWorker.h rename to src/core/ParallelWorker.h index 151d886..bc35eff 100644 --- a/src/system/ParallelWorker.h +++ b/src/core/ParallelWorker.h @@ -1,6 +1,6 @@ #pragma once -#include "system_global.h" +#include "core_global.h" namespace paysages { namespace system { @@ -8,7 +8,7 @@ namespace system { /** * Worker that can be used by the ParallelWork object to perform tasks in several threads. */ -class SYSTEMSHARED_EXPORT ParallelWorker { +class CORESHARED_EXPORT ParallelWorker { public: ParallelWorker(); virtual ~ParallelWorker(); diff --git a/src/system/PictureWriter.cpp b/src/core/PictureWriter.cpp similarity index 100% rename from src/system/PictureWriter.cpp rename to src/core/PictureWriter.cpp diff --git a/src/system/PictureWriter.h b/src/core/PictureWriter.h similarity index 85% rename from src/system/PictureWriter.h rename to src/core/PictureWriter.h index e2e98c8..ef98a3d 100644 --- a/src/system/PictureWriter.h +++ b/src/core/PictureWriter.h @@ -1,13 +1,13 @@ #pragma once -#include "system_global.h" +#include "core_global.h" #include namespace paysages { namespace system { -class SYSTEMSHARED_EXPORT PictureWriter { +class CORESHARED_EXPORT PictureWriter { public: PictureWriter(); virtual ~PictureWriter(); diff --git a/src/system/RandomGenerator.cpp b/src/core/RandomGenerator.cpp similarity index 100% rename from src/system/RandomGenerator.cpp rename to src/core/RandomGenerator.cpp diff --git a/src/system/RandomGenerator.h b/src/core/RandomGenerator.h similarity index 85% rename from src/system/RandomGenerator.h rename to src/core/RandomGenerator.h index a9d0144..d6cd4f6 100644 --- a/src/system/RandomGenerator.h +++ b/src/core/RandomGenerator.h @@ -1,11 +1,11 @@ #pragma once -#include "system_global.h" +#include "core_global.h" namespace paysages { namespace system { -class SYSTEMSHARED_EXPORT RandomGenerator { +class CORESHARED_EXPORT RandomGenerator { public: typedef unsigned long Seed; class RandomGeneratorPrivate; diff --git a/src/render/software/Rasterizer.cpp b/src/core/Rasterizer.cpp similarity index 100% rename from src/render/software/Rasterizer.cpp rename to src/core/Rasterizer.cpp diff --git a/src/render/software/Rasterizer.h b/src/core/Rasterizer.h similarity index 98% rename from src/render/software/Rasterizer.h rename to src/core/Rasterizer.h index cb66ba0..0bc101b 100644 --- a/src/render/software/Rasterizer.h +++ b/src/core/Rasterizer.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" namespace paysages { namespace software { @@ -16,7 +16,7 @@ typedef struct RenderScanlines RenderScanlines; /** * Base abstract class for scenery pieces that can be rasterized to polygons. */ -class SOFTWARESHARED_EXPORT Rasterizer { +class CORESHARED_EXPORT Rasterizer { public: Rasterizer(SoftwareRenderer *renderer, RenderProgress *progress, unsigned short client_id, const Color &color); virtual ~Rasterizer(); diff --git a/src/render/software/RayCastingManager.cpp b/src/core/RayCastingManager.cpp similarity index 100% rename from src/render/software/RayCastingManager.cpp rename to src/core/RayCastingManager.cpp diff --git a/src/render/software/RayCastingManager.h b/src/core/RayCastingManager.h similarity index 77% rename from src/render/software/RayCastingManager.h rename to src/core/RayCastingManager.h index b8f10a3..5267e97 100644 --- a/src/render/software/RayCastingManager.h +++ b/src/core/RayCastingManager.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" namespace paysages { namespace software { @@ -8,7 +8,7 @@ namespace software { typedef RayCastingResult (*FuncGeneralCastRay)(SoftwareRenderer *renderer, const Vector3 &start, const Vector3 &direction); -class SOFTWARESHARED_EXPORT RayCastingManager { +class CORESHARED_EXPORT RayCastingManager { public: RayCastingManager(); }; diff --git a/src/render/software/RayCastingResult.cpp b/src/core/RayCastingResult.cpp similarity index 100% rename from src/render/software/RayCastingResult.cpp rename to src/core/RayCastingResult.cpp diff --git a/src/render/software/RayCastingResult.h b/src/core/RayCastingResult.h similarity index 72% rename from src/render/software/RayCastingResult.h rename to src/core/RayCastingResult.h index 5c99df2..ac12436 100644 --- a/src/render/software/RayCastingResult.h +++ b/src/core/RayCastingResult.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "Color.h" #include "Vector3.h" @@ -8,7 +8,7 @@ namespace paysages { namespace software { -class SOFTWARESHARED_EXPORT RayCastingResult { +class CORESHARED_EXPORT RayCastingResult { public: RayCastingResult(); diff --git a/src/render/software/RenderConfig.cpp b/src/core/RenderConfig.cpp similarity index 100% rename from src/render/software/RenderConfig.cpp rename to src/core/RenderConfig.cpp diff --git a/src/render/software/RenderConfig.h b/src/core/RenderConfig.h similarity index 76% rename from src/render/software/RenderConfig.h rename to src/core/RenderConfig.h index dc899df..e460ead 100644 --- a/src/render/software/RenderConfig.h +++ b/src/core/RenderConfig.h @@ -1,11 +1,11 @@ #pragma once -#include "software_global.h" +#include "core_global.h" namespace paysages { namespace software { -class SOFTWARESHARED_EXPORT RenderConfig { +class CORESHARED_EXPORT RenderConfig { public: RenderConfig(int width = 0, int height = 0, int antialias = 1, int quality = 5); diff --git a/src/render/software/RenderProgress.cpp b/src/core/RenderProgress.cpp similarity index 100% rename from src/render/software/RenderProgress.cpp rename to src/core/RenderProgress.cpp diff --git a/src/render/software/RenderProgress.h b/src/core/RenderProgress.h similarity index 92% rename from src/render/software/RenderProgress.h rename to src/core/RenderProgress.h index e443e41..8eae4b9 100644 --- a/src/render/software/RenderProgress.h +++ b/src/core/RenderProgress.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include @@ -17,7 +17,7 @@ struct RenderSub { /** * Utility to keep track of render progress. */ -class SOFTWARESHARED_EXPORT RenderProgress { +class CORESHARED_EXPORT RenderProgress { public: RenderProgress(int count = 1); ~RenderProgress(); diff --git a/src/definition/Scenery.cpp b/src/core/Scenery.cpp similarity index 100% rename from src/definition/Scenery.cpp rename to src/core/Scenery.cpp diff --git a/src/definition/Scenery.h b/src/core/Scenery.h similarity index 97% rename from src/definition/Scenery.h rename to src/core/Scenery.h index 834c9ee..9050603 100644 --- a/src/definition/Scenery.h +++ b/src/core/Scenery.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "DefinitionNode.h" @@ -12,7 +12,7 @@ namespace definition { * * This class contains the whole scenery definition. */ -class DEFINITIONSHARED_EXPORT Scenery : public DefinitionNode { +class CORESHARED_EXPORT Scenery : public DefinitionNode { public: typedef enum { FILE_OPERATION_OK, diff --git a/src/system/Semaphore.cpp b/src/core/Semaphore.cpp similarity index 100% rename from src/system/Semaphore.cpp rename to src/core/Semaphore.cpp diff --git a/src/system/Semaphore.h b/src/core/Semaphore.h similarity index 91% rename from src/system/Semaphore.h rename to src/core/Semaphore.h index f1a91b4..4c00337 100644 --- a/src/system/Semaphore.h +++ b/src/core/Semaphore.h @@ -1,6 +1,6 @@ #pragma once -#include "system_global.h" +#include "core_global.h" #include diff --git a/src/render/software/SkyRasterizer.cpp b/src/core/SkyRasterizer.cpp similarity index 100% rename from src/render/software/SkyRasterizer.cpp rename to src/core/SkyRasterizer.cpp diff --git a/src/render/software/SkyRasterizer.h b/src/core/SkyRasterizer.h similarity index 85% rename from src/render/software/SkyRasterizer.h rename to src/core/SkyRasterizer.h index d18f423..e90eef4 100644 --- a/src/render/software/SkyRasterizer.h +++ b/src/core/SkyRasterizer.h @@ -1,13 +1,13 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "Rasterizer.h" namespace paysages { namespace software { -class SOFTWARESHARED_EXPORT SkyRasterizer : public Rasterizer { +class CORESHARED_EXPORT SkyRasterizer : public Rasterizer { public: SkyRasterizer(SoftwareRenderer *renderer, RenderProgress *progress, unsigned short client_id); diff --git a/src/render/software/SoftwareCanvasRenderer.cpp b/src/core/SoftwareCanvasRenderer.cpp similarity index 100% rename from src/render/software/SoftwareCanvasRenderer.cpp rename to src/core/SoftwareCanvasRenderer.cpp diff --git a/src/render/software/SoftwareCanvasRenderer.h b/src/core/SoftwareCanvasRenderer.h similarity index 96% rename from src/render/software/SoftwareCanvasRenderer.h rename to src/core/SoftwareCanvasRenderer.h index a3bdf57..2f7be9e 100644 --- a/src/render/software/SoftwareCanvasRenderer.h +++ b/src/core/SoftwareCanvasRenderer.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "SoftwareRenderer.h" @@ -18,7 +18,7 @@ namespace software { * * It tries to keep a canvas portion rasterized ahead of the post processing. */ -class SOFTWARESHARED_EXPORT SoftwareCanvasRenderer : public SoftwareRenderer { +class CORESHARED_EXPORT SoftwareCanvasRenderer : public SoftwareRenderer { public: SoftwareCanvasRenderer(Scenery *scenery); virtual ~SoftwareCanvasRenderer(); diff --git a/src/render/software/SoftwareRenderer.cpp b/src/core/SoftwareRenderer.cpp similarity index 100% rename from src/render/software/SoftwareRenderer.cpp rename to src/core/SoftwareRenderer.cpp diff --git a/src/render/software/SoftwareRenderer.h b/src/core/SoftwareRenderer.h similarity index 97% rename from src/render/software/SoftwareRenderer.h rename to src/core/SoftwareRenderer.h index 15062ec..3074055 100644 --- a/src/render/software/SoftwareRenderer.h +++ b/src/core/SoftwareRenderer.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" namespace paysages { namespace software { @@ -8,7 +8,7 @@ namespace software { /** * This class renders a defined scenery in sotware mode (using only standard CPU computations). */ -class SOFTWARESHARED_EXPORT SoftwareRenderer { +class CORESHARED_EXPORT SoftwareRenderer { public: SoftwareRenderer(Scenery *scenery); diff --git a/src/basics/SpaceGridIterator.cpp b/src/core/SpaceGridIterator.cpp similarity index 100% rename from src/basics/SpaceGridIterator.cpp rename to src/core/SpaceGridIterator.cpp diff --git a/src/basics/SpaceGridIterator.h b/src/core/SpaceGridIterator.h similarity index 85% rename from src/basics/SpaceGridIterator.h rename to src/core/SpaceGridIterator.h index 8b7fb63..0a6cafe 100644 --- a/src/basics/SpaceGridIterator.h +++ b/src/core/SpaceGridIterator.h @@ -1,6 +1,6 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" namespace paysages { namespace basics { @@ -10,7 +10,7 @@ namespace basics { * * This may be useful for ray marching algorithms for example. */ -class BASICSSHARED_EXPORT SpaceGridIterator { +class CORESHARED_EXPORT SpaceGridIterator { public: SpaceGridIterator(); diff --git a/src/basics/SpaceSegment.cpp b/src/core/SpaceSegment.cpp similarity index 100% rename from src/basics/SpaceSegment.cpp rename to src/core/SpaceSegment.cpp diff --git a/src/basics/SpaceSegment.h b/src/core/SpaceSegment.h similarity index 97% rename from src/basics/SpaceSegment.h rename to src/core/SpaceSegment.h index b9dae10..940fafb 100644 --- a/src/basics/SpaceSegment.h +++ b/src/core/SpaceSegment.h @@ -1,6 +1,6 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" #include "Vector3.h" @@ -10,7 +10,7 @@ namespace basics { /** * A delimited segment in 3D space (mainly useful for rays). */ -class BASICSSHARED_EXPORT SpaceSegment { +class CORESHARED_EXPORT SpaceSegment { public: SpaceSegment(const Vector3 &start, const Vector3 &end); SpaceSegment() : SpaceSegment(Vector3(), Vector3()) { diff --git a/src/basics/Sphere.cpp b/src/core/Sphere.cpp similarity index 100% rename from src/basics/Sphere.cpp rename to src/core/Sphere.cpp diff --git a/src/basics/Sphere.h b/src/core/Sphere.h similarity index 94% rename from src/basics/Sphere.h rename to src/core/Sphere.h index 7c49d0f..d3f8e89 100644 --- a/src/basics/Sphere.h +++ b/src/core/Sphere.h @@ -1,6 +1,6 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" #include "Vector3.h" @@ -10,7 +10,7 @@ namespace basics { /** * Geometric sphere. */ -class BASICSSHARED_EXPORT Sphere { +class CORESHARED_EXPORT Sphere { public: Sphere() = default; Sphere(const Vector3 ¢er, double radius); diff --git a/src/definition/SurfaceMaterial.cpp b/src/core/SurfaceMaterial.cpp similarity index 100% rename from src/definition/SurfaceMaterial.cpp rename to src/core/SurfaceMaterial.cpp diff --git a/src/definition/SurfaceMaterial.h b/src/core/SurfaceMaterial.h similarity index 88% rename from src/definition/SurfaceMaterial.h rename to src/core/SurfaceMaterial.h index 4873233..9b58c30 100644 --- a/src/definition/SurfaceMaterial.h +++ b/src/core/SurfaceMaterial.h @@ -1,11 +1,11 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" namespace paysages { namespace definition { -class DEFINITIONSHARED_EXPORT SurfaceMaterial { +class CORESHARED_EXPORT SurfaceMaterial { public: SurfaceMaterial(); SurfaceMaterial(const Color &color); diff --git a/src/system/System.cpp b/src/core/System.cpp similarity index 100% rename from src/system/System.cpp rename to src/core/System.cpp diff --git a/src/system/System.h b/src/core/System.h similarity index 87% rename from src/system/System.h rename to src/core/System.h index e4a84fb..31f3747 100644 --- a/src/system/System.h +++ b/src/core/System.h @@ -1,6 +1,6 @@ #pragma once -#include "system_global.h" +#include "core_global.h" namespace paysages { namespace system { @@ -8,7 +8,7 @@ namespace system { /** * Access to system info */ -class SYSTEMSHARED_EXPORT System { +class CORESHARED_EXPORT System { public: /** * Get the number of CPU cores available on current system. diff --git a/src/definition/TerrainDefinition.cpp b/src/core/TerrainDefinition.cpp similarity index 100% rename from src/definition/TerrainDefinition.cpp rename to src/core/TerrainDefinition.cpp diff --git a/src/definition/TerrainDefinition.h b/src/core/TerrainDefinition.h similarity index 92% rename from src/definition/TerrainDefinition.h rename to src/core/TerrainDefinition.h index fabd954..1bfdf63 100644 --- a/src/definition/TerrainDefinition.h +++ b/src/core/TerrainDefinition.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "DefinitionNode.h" @@ -13,7 +13,7 @@ typedef struct { double base_height; } HeightInfo; -class DEFINITIONSHARED_EXPORT TerrainDefinition : public DefinitionNode { +class CORESHARED_EXPORT TerrainDefinition : public DefinitionNode { public: TerrainDefinition(DefinitionNode *parent); virtual ~TerrainDefinition(); diff --git a/src/definition/TerrainHeightMap.cpp b/src/core/TerrainHeightMap.cpp similarity index 100% rename from src/definition/TerrainHeightMap.cpp rename to src/core/TerrainHeightMap.cpp diff --git a/src/definition/TerrainHeightMap.h b/src/core/TerrainHeightMap.h similarity index 91% rename from src/definition/TerrainHeightMap.h rename to src/core/TerrainHeightMap.h index aa76f5d..70e5826 100644 --- a/src/definition/TerrainHeightMap.h +++ b/src/core/TerrainHeightMap.h @@ -1,13 +1,13 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "PaintedGrid.h" namespace paysages { namespace definition { -class DEFINITIONSHARED_EXPORT TerrainHeightMap : public PaintedGrid { +class CORESHARED_EXPORT TerrainHeightMap : public PaintedGrid { public: TerrainHeightMap(TerrainDefinition *terrain); diff --git a/src/render/software/TerrainRasterizer.cpp b/src/core/TerrainRasterizer.cpp similarity index 100% rename from src/render/software/TerrainRasterizer.cpp rename to src/core/TerrainRasterizer.cpp diff --git a/src/render/software/TerrainRasterizer.h b/src/core/TerrainRasterizer.h similarity index 96% rename from src/render/software/TerrainRasterizer.h rename to src/core/TerrainRasterizer.h index f3fab3f..df925d8 100644 --- a/src/render/software/TerrainRasterizer.h +++ b/src/core/TerrainRasterizer.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "Rasterizer.h" #include "Vector3.h" @@ -8,7 +8,7 @@ namespace paysages { namespace software { -class SOFTWARESHARED_EXPORT TerrainRasterizer : public Rasterizer { +class CORESHARED_EXPORT TerrainRasterizer : public Rasterizer { public: typedef struct { Vector3 point_nw; diff --git a/src/render/software/TerrainRayWalker.cpp b/src/core/TerrainRayWalker.cpp similarity index 100% rename from src/render/software/TerrainRayWalker.cpp rename to src/core/TerrainRayWalker.cpp diff --git a/src/render/software/TerrainRayWalker.h b/src/core/TerrainRayWalker.h similarity index 96% rename from src/render/software/TerrainRayWalker.h rename to src/core/TerrainRayWalker.h index 608ce25..bf91a25 100644 --- a/src/render/software/TerrainRayWalker.h +++ b/src/core/TerrainRayWalker.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "Vector3.h" @@ -14,7 +14,7 @@ namespace software { * a ray and the terrain (e.g. for raytracing), or a soft intersection * (e.g. for shadows). */ -class SOFTWARESHARED_EXPORT TerrainRayWalker { +class CORESHARED_EXPORT TerrainRayWalker { public: typedef struct { Vector3 hit_location; // Location of the hit diff --git a/src/render/software/TerrainRenderer.cpp b/src/core/TerrainRenderer.cpp similarity index 100% rename from src/render/software/TerrainRenderer.cpp rename to src/core/TerrainRenderer.cpp diff --git a/src/render/software/TerrainRenderer.h b/src/core/TerrainRenderer.h similarity index 93% rename from src/render/software/TerrainRenderer.h rename to src/core/TerrainRenderer.h index fbba1c8..95fa251 100644 --- a/src/render/software/TerrainRenderer.h +++ b/src/core/TerrainRenderer.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "LightFilter.h" @@ -10,7 +10,7 @@ namespace paysages { namespace software { -class SOFTWARESHARED_EXPORT TerrainRenderer : public LightFilter { +class CORESHARED_EXPORT TerrainRenderer : public LightFilter { public: typedef struct { Vector3 location; diff --git a/src/basics/Texture2D.cpp b/src/core/Texture2D.cpp similarity index 100% rename from src/basics/Texture2D.cpp rename to src/core/Texture2D.cpp diff --git a/src/basics/Texture2D.h b/src/core/Texture2D.h similarity index 91% rename from src/basics/Texture2D.h rename to src/core/Texture2D.h index a13b4e3..4ae9f61 100644 --- a/src/basics/Texture2D.h +++ b/src/core/Texture2D.h @@ -1,13 +1,13 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" #include namespace paysages { namespace basics { -class BASICSSHARED_EXPORT Texture2D { +class CORESHARED_EXPORT Texture2D { public: Texture2D(int xsize, int ysize); ~Texture2D(); diff --git a/src/basics/Texture3D.cpp b/src/core/Texture3D.cpp similarity index 100% rename from src/basics/Texture3D.cpp rename to src/core/Texture3D.cpp diff --git a/src/basics/Texture3D.h b/src/core/Texture3D.h similarity index 92% rename from src/basics/Texture3D.h rename to src/core/Texture3D.h index f77f08f..4093459 100644 --- a/src/basics/Texture3D.h +++ b/src/core/Texture3D.h @@ -1,13 +1,13 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" #include namespace paysages { namespace basics { -class BASICSSHARED_EXPORT Texture3D { +class CORESHARED_EXPORT Texture3D { public: Texture3D(int xsize, int ysize, int zsize); ~Texture3D(); diff --git a/src/basics/Texture4D.cpp b/src/core/Texture4D.cpp similarity index 100% rename from src/basics/Texture4D.cpp rename to src/core/Texture4D.cpp diff --git a/src/basics/Texture4D.h b/src/core/Texture4D.h similarity index 92% rename from src/basics/Texture4D.h rename to src/core/Texture4D.h index f0dddf7..a726f3e 100644 --- a/src/basics/Texture4D.h +++ b/src/core/Texture4D.h @@ -1,13 +1,13 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" #include namespace paysages { namespace basics { -class BASICSSHARED_EXPORT Texture4D { +class CORESHARED_EXPORT Texture4D { public: Texture4D(int xsize, int ysize, int zsize, int wsize); ~Texture4D(); diff --git a/src/definition/TextureLayerDefinition.cpp b/src/core/TextureLayerDefinition.cpp similarity index 100% rename from src/definition/TextureLayerDefinition.cpp rename to src/core/TextureLayerDefinition.cpp diff --git a/src/definition/TextureLayerDefinition.h b/src/core/TextureLayerDefinition.h similarity index 93% rename from src/definition/TextureLayerDefinition.h rename to src/core/TextureLayerDefinition.h index b694b75..262f184 100644 --- a/src/definition/TextureLayerDefinition.h +++ b/src/core/TextureLayerDefinition.h @@ -1,13 +1,13 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "DefinitionNode.h" namespace paysages { namespace definition { -class DEFINITIONSHARED_EXPORT TextureLayerDefinition : public DefinitionNode { +class CORESHARED_EXPORT TextureLayerDefinition : public DefinitionNode { public: typedef enum { TEXTURES_MERGE_FADE, TEXTURES_MERGE_DISSOLVE, TEXTURES_MERGE_DISPLACEMENT_VALUE } TextureMergeMode; typedef enum { diff --git a/src/definition/TexturesDefinition.cpp b/src/core/TexturesDefinition.cpp similarity index 100% rename from src/definition/TexturesDefinition.cpp rename to src/core/TexturesDefinition.cpp diff --git a/src/definition/TexturesDefinition.h b/src/core/TexturesDefinition.h similarity index 84% rename from src/definition/TexturesDefinition.h rename to src/core/TexturesDefinition.h index 45ed224..4e5c5ab 100644 --- a/src/definition/TexturesDefinition.h +++ b/src/core/TexturesDefinition.h @@ -1,13 +1,13 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "Layers.h" namespace paysages { namespace definition { -class DEFINITIONSHARED_EXPORT TexturesDefinition : public Layers { +class CORESHARED_EXPORT TexturesDefinition : public Layers { public: TexturesDefinition(DefinitionNode *parent); diff --git a/src/render/software/TexturesRenderer.cpp b/src/core/TexturesRenderer.cpp similarity index 100% rename from src/render/software/TexturesRenderer.cpp rename to src/core/TexturesRenderer.cpp diff --git a/src/render/software/TexturesRenderer.h b/src/core/TexturesRenderer.h similarity index 96% rename from src/render/software/TexturesRenderer.h rename to src/core/TexturesRenderer.h index 953ccb5..3a869e6 100644 --- a/src/render/software/TexturesRenderer.h +++ b/src/core/TexturesRenderer.h @@ -1,13 +1,13 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include namespace paysages { namespace software { -class SOFTWARESHARED_EXPORT TexturesRenderer { +class CORESHARED_EXPORT TexturesRenderer { public: TexturesRenderer(); virtual ~TexturesRenderer(); diff --git a/src/system/Thread.cpp b/src/core/Thread.cpp similarity index 100% rename from src/system/Thread.cpp rename to src/core/Thread.cpp diff --git a/src/system/Thread.h b/src/core/Thread.h similarity index 93% rename from src/system/Thread.h rename to src/core/Thread.h index b832c3c..3181519 100644 --- a/src/system/Thread.h +++ b/src/core/Thread.h @@ -1,6 +1,6 @@ #pragma once -#include "system_global.h" +#include "core_global.h" #include namespace paysages { @@ -11,7 +11,7 @@ typedef void *(*ThreadFunction)(void *data); /** * System thread */ -class SYSTEMSHARED_EXPORT Thread : private QThread { +class CORESHARED_EXPORT Thread : private QThread { public: /** * Create a new thread. diff --git a/src/definition/TimeManager.cpp b/src/core/TimeManager.cpp similarity index 100% rename from src/definition/TimeManager.cpp rename to src/core/TimeManager.cpp diff --git a/src/definition/TimeManager.h b/src/core/TimeManager.h similarity index 87% rename from src/definition/TimeManager.h rename to src/core/TimeManager.h index cb14f3b..c455694 100644 --- a/src/definition/TimeManager.h +++ b/src/core/TimeManager.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" namespace paysages { namespace definition { @@ -8,7 +8,7 @@ namespace definition { /** * Time manager, handling the inexorable passing of time. */ -class DEFINITIONSHARED_EXPORT TimeManager { +class CORESHARED_EXPORT TimeManager { public: TimeManager(); diff --git a/src/system/Timing.cpp b/src/core/Timing.cpp similarity index 100% rename from src/system/Timing.cpp rename to src/core/Timing.cpp diff --git a/src/system/Timing.h b/src/core/Timing.h similarity index 76% rename from src/system/Timing.h rename to src/core/Timing.h index 9fb67f2..e98198e 100644 --- a/src/system/Timing.h +++ b/src/core/Timing.h @@ -1,6 +1,6 @@ #pragma once -#include "system_global.h" +#include "core_global.h" namespace paysages { namespace system { @@ -8,7 +8,7 @@ namespace system { /** * Timing tools. */ -class SYSTEMSHARED_EXPORT Timing { +class CORESHARED_EXPORT Timing { public: /** * Get a timestamp in milliseconds. diff --git a/src/basics/Vector3.cpp b/src/core/Vector3.cpp similarity index 100% rename from src/basics/Vector3.cpp rename to src/core/Vector3.cpp diff --git a/src/basics/Vector3.h b/src/core/Vector3.h similarity index 84% rename from src/basics/Vector3.h rename to src/core/Vector3.h index 4571292..a1e7670 100644 --- a/src/basics/Vector3.h +++ b/src/core/Vector3.h @@ -1,6 +1,6 @@ #pragma once -#include "basics_global.h" +#include "core_global.h" namespace paysages { namespace basics { @@ -38,7 +38,7 @@ typedef struct { double phi; } VectorSpherical; -class BASICSSHARED_EXPORT Vector3 { +class CORESHARED_EXPORT Vector3 { public: Vector3() = default; Vector3(double x, double y, double z); @@ -96,12 +96,12 @@ class BASICSSHARED_EXPORT Vector3 { double z; }; -BASICSSHARED_EXPORT extern const Vector3 VECTOR_ZERO; -BASICSSHARED_EXPORT extern const Vector3 VECTOR_DOWN; -BASICSSHARED_EXPORT extern const Vector3 VECTOR_UP; -BASICSSHARED_EXPORT extern const Vector3 VECTOR_NORTH; -BASICSSHARED_EXPORT extern const Vector3 VECTOR_SOUTH; -BASICSSHARED_EXPORT extern const Vector3 VECTOR_EAST; -BASICSSHARED_EXPORT extern const Vector3 VECTOR_WEST; +CORESHARED_EXPORT extern const Vector3 VECTOR_ZERO; +CORESHARED_EXPORT extern const Vector3 VECTOR_DOWN; +CORESHARED_EXPORT extern const Vector3 VECTOR_UP; +CORESHARED_EXPORT extern const Vector3 VECTOR_NORTH; +CORESHARED_EXPORT extern const Vector3 VECTOR_SOUTH; +CORESHARED_EXPORT extern const Vector3 VECTOR_EAST; +CORESHARED_EXPORT extern const Vector3 VECTOR_WEST; } } diff --git a/src/definition/VegetationDefinition.cpp b/src/core/VegetationDefinition.cpp similarity index 100% rename from src/definition/VegetationDefinition.cpp rename to src/core/VegetationDefinition.cpp diff --git a/src/definition/VegetationDefinition.h b/src/core/VegetationDefinition.h similarity index 87% rename from src/definition/VegetationDefinition.h rename to src/core/VegetationDefinition.h index 800422b..4203341 100644 --- a/src/definition/VegetationDefinition.h +++ b/src/core/VegetationDefinition.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "Layers.h" @@ -10,7 +10,7 @@ namespace definition { /** * Definition of all vegetation layers in the scenery. */ -class DEFINITIONSHARED_EXPORT VegetationDefinition : public Layers { +class CORESHARED_EXPORT VegetationDefinition : public Layers { public: VegetationDefinition(DefinitionNode *parent); diff --git a/src/definition/VegetationInstance.cpp b/src/core/VegetationInstance.cpp similarity index 100% rename from src/definition/VegetationInstance.cpp rename to src/core/VegetationInstance.cpp diff --git a/src/definition/VegetationInstance.h b/src/core/VegetationInstance.h similarity index 91% rename from src/definition/VegetationInstance.h rename to src/core/VegetationInstance.h index ab69bf4..1d50814 100644 --- a/src/definition/VegetationInstance.h +++ b/src/core/VegetationInstance.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "Vector3.h" @@ -12,7 +12,7 @@ namespace definition { * * This is used as potential hit on vegetation lookup. */ -class DEFINITIONSHARED_EXPORT VegetationInstance { +class CORESHARED_EXPORT VegetationInstance { public: VegetationInstance(const VegetationModelDefinition &model, const Vector3 &base, double size = 1.0, double angle = 0.0); diff --git a/src/definition/VegetationLayerDefinition.cpp b/src/core/VegetationLayerDefinition.cpp similarity index 100% rename from src/definition/VegetationLayerDefinition.cpp rename to src/core/VegetationLayerDefinition.cpp diff --git a/src/definition/VegetationLayerDefinition.h b/src/core/VegetationLayerDefinition.h similarity index 88% rename from src/definition/VegetationLayerDefinition.h rename to src/core/VegetationLayerDefinition.h index cc1aba5..afbdc4a 100644 --- a/src/definition/VegetationLayerDefinition.h +++ b/src/core/VegetationLayerDefinition.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "DefinitionNode.h" @@ -10,7 +10,7 @@ namespace definition { /** * Definition of one vegetation layer. */ -class DEFINITIONSHARED_EXPORT VegetationLayerDefinition : public DefinitionNode { +class CORESHARED_EXPORT VegetationLayerDefinition : public DefinitionNode { public: VegetationLayerDefinition(DefinitionNode *parent, const string &name); diff --git a/src/definition/VegetationModelDefinition.cpp b/src/core/VegetationModelDefinition.cpp similarity index 100% rename from src/definition/VegetationModelDefinition.cpp rename to src/core/VegetationModelDefinition.cpp diff --git a/src/definition/VegetationModelDefinition.h b/src/core/VegetationModelDefinition.h similarity index 92% rename from src/definition/VegetationModelDefinition.h rename to src/core/VegetationModelDefinition.h index 2b2004f..83666ae 100644 --- a/src/definition/VegetationModelDefinition.h +++ b/src/core/VegetationModelDefinition.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "CappedCylinder.h" #include "DefinitionNode.h" @@ -14,7 +14,7 @@ namespace definition { /** * Model of vegetation. */ -class DEFINITIONSHARED_EXPORT VegetationModelDefinition : public DefinitionNode { +class CORESHARED_EXPORT VegetationModelDefinition : public DefinitionNode { public: VegetationModelDefinition(DefinitionNode *parent); virtual ~VegetationModelDefinition(); diff --git a/src/render/software/VegetationModelRenderer.cpp b/src/core/VegetationModelRenderer.cpp similarity index 100% rename from src/render/software/VegetationModelRenderer.cpp rename to src/core/VegetationModelRenderer.cpp diff --git a/src/render/software/VegetationModelRenderer.h b/src/core/VegetationModelRenderer.h similarity index 90% rename from src/render/software/VegetationModelRenderer.h rename to src/core/VegetationModelRenderer.h index 91da23f..6842e3e 100644 --- a/src/render/software/VegetationModelRenderer.h +++ b/src/core/VegetationModelRenderer.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "LightFilter.h" @@ -10,7 +10,7 @@ namespace software { /** * Renderer of a single instance of vegetation model (e.g a single tree). */ -class SOFTWARESHARED_EXPORT VegetationModelRenderer : public LightFilter { +class CORESHARED_EXPORT VegetationModelRenderer : public LightFilter { public: VegetationModelRenderer(SoftwareRenderer *parent, const VegetationModelDefinition *model); virtual ~VegetationModelRenderer(); diff --git a/src/definition/VegetationPresenceDefinition.cpp b/src/core/VegetationPresenceDefinition.cpp similarity index 100% rename from src/definition/VegetationPresenceDefinition.cpp rename to src/core/VegetationPresenceDefinition.cpp diff --git a/src/definition/VegetationPresenceDefinition.h b/src/core/VegetationPresenceDefinition.h similarity index 89% rename from src/definition/VegetationPresenceDefinition.h rename to src/core/VegetationPresenceDefinition.h index c79fc40..c3d4e70 100644 --- a/src/definition/VegetationPresenceDefinition.h +++ b/src/core/VegetationPresenceDefinition.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "DefinitionNode.h" @@ -10,7 +10,7 @@ namespace definition { /** * Definition of the presence of vegetation at locations. */ -class DEFINITIONSHARED_EXPORT VegetationPresenceDefinition : public DefinitionNode { +class CORESHARED_EXPORT VegetationPresenceDefinition : public DefinitionNode { public: VegetationPresenceDefinition(VegetationLayerDefinition *parent); diff --git a/src/render/software/VegetationRasterizer.cpp b/src/core/VegetationRasterizer.cpp similarity index 100% rename from src/render/software/VegetationRasterizer.cpp rename to src/core/VegetationRasterizer.cpp diff --git a/src/render/software/VegetationRasterizer.h b/src/core/VegetationRasterizer.h similarity index 83% rename from src/render/software/VegetationRasterizer.h rename to src/core/VegetationRasterizer.h index f0fde77..c289b2b 100644 --- a/src/render/software/VegetationRasterizer.h +++ b/src/core/VegetationRasterizer.h @@ -1,13 +1,13 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "TerrainRasterizer.h" namespace paysages { namespace software { -class SOFTWARESHARED_EXPORT VegetationRasterizer : public TerrainRasterizer { +class CORESHARED_EXPORT VegetationRasterizer : public TerrainRasterizer { public: VegetationRasterizer(SoftwareRenderer *renderer, RenderProgress *progress, unsigned short client_id); diff --git a/src/render/software/VegetationRenderer.cpp b/src/core/VegetationRenderer.cpp similarity index 100% rename from src/render/software/VegetationRenderer.cpp rename to src/core/VegetationRenderer.cpp diff --git a/src/render/software/VegetationRenderer.h b/src/core/VegetationRenderer.h similarity index 93% rename from src/render/software/VegetationRenderer.h rename to src/core/VegetationRenderer.h index 18e71bb..1d928d5 100644 --- a/src/render/software/VegetationRenderer.h +++ b/src/core/VegetationRenderer.h @@ -1,13 +1,13 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "LightFilter.h" namespace paysages { namespace software { -class SOFTWARESHARED_EXPORT VegetationRenderer : public LightFilter { +class CORESHARED_EXPORT VegetationRenderer : public LightFilter { public: VegetationRenderer(SoftwareRenderer *parent); virtual ~VegetationRenderer(); diff --git a/src/render/software/VegetationResult.cpp b/src/core/VegetationResult.cpp similarity index 100% rename from src/render/software/VegetationResult.cpp rename to src/core/VegetationResult.cpp diff --git a/src/render/software/VegetationResult.h b/src/core/VegetationResult.h similarity index 90% rename from src/render/software/VegetationResult.h rename to src/core/VegetationResult.h index 256acb2..b5a523a 100644 --- a/src/render/software/VegetationResult.h +++ b/src/core/VegetationResult.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "SurfaceMaterial.h" #include "Vector3.h" @@ -11,7 +11,7 @@ namespace software { /** * Result of a vegetation lookup. */ -class SOFTWARESHARED_EXPORT VegetationResult { +class CORESHARED_EXPORT VegetationResult { public: VegetationResult(bool hit = false); VegetationResult(const Vector3 &location, const Vector3 &normal, const SurfaceMaterial &material); diff --git a/src/definition/WaterDefinition.cpp b/src/core/WaterDefinition.cpp similarity index 100% rename from src/definition/WaterDefinition.cpp rename to src/core/WaterDefinition.cpp diff --git a/src/definition/WaterDefinition.h b/src/core/WaterDefinition.h similarity index 93% rename from src/definition/WaterDefinition.h rename to src/core/WaterDefinition.h index 51781b6..21e5f12 100644 --- a/src/definition/WaterDefinition.h +++ b/src/core/WaterDefinition.h @@ -1,6 +1,6 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "DefinitionNode.h" #include "DefinitionWatcher.h" @@ -8,7 +8,7 @@ namespace paysages { namespace definition { -class DEFINITIONSHARED_EXPORT WaterDefinition : public DefinitionNode { +class CORESHARED_EXPORT WaterDefinition : public DefinitionNode { public: WaterDefinition(DefinitionNode *parent); virtual ~WaterDefinition(); diff --git a/src/render/software/WaterRasterizer.cpp b/src/core/WaterRasterizer.cpp similarity index 100% rename from src/render/software/WaterRasterizer.cpp rename to src/core/WaterRasterizer.cpp diff --git a/src/render/software/WaterRasterizer.h b/src/core/WaterRasterizer.h similarity index 96% rename from src/render/software/WaterRasterizer.h rename to src/core/WaterRasterizer.h index 55c17d5..2a90dc0 100644 --- a/src/render/software/WaterRasterizer.h +++ b/src/core/WaterRasterizer.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "Rasterizer.h" diff --git a/src/render/software/WaterRenderer.cpp b/src/core/WaterRenderer.cpp similarity index 100% rename from src/render/software/WaterRenderer.cpp rename to src/core/WaterRenderer.cpp diff --git a/src/render/software/WaterRenderer.h b/src/core/WaterRenderer.h similarity index 89% rename from src/render/software/WaterRenderer.h rename to src/core/WaterRenderer.h index 4a261ab..b5f49df 100644 --- a/src/render/software/WaterRenderer.h +++ b/src/core/WaterRenderer.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #include "LightFilter.h" @@ -11,7 +11,7 @@ namespace paysages { namespace software { -class SOFTWARESHARED_EXPORT WaterRenderer : public LightFilter { +class CORESHARED_EXPORT WaterRenderer : public LightFilter { public: typedef struct { Vector3 location; diff --git a/src/definition/Zone.cpp b/src/core/Zone.cpp similarity index 100% rename from src/definition/Zone.cpp rename to src/core/Zone.cpp diff --git a/src/definition/Zone.h b/src/core/Zone.h similarity index 92% rename from src/definition/Zone.h rename to src/core/Zone.h index 8cd5137..9d84273 100644 --- a/src/definition/Zone.h +++ b/src/core/Zone.h @@ -1,13 +1,13 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "DefinitionNode.h" namespace paysages { namespace definition { -class DEFINITIONSHARED_EXPORT Zone : public DefinitionNode { +class CORESHARED_EXPORT Zone : public DefinitionNode { public: Zone(DefinitionNode *parent = 0); virtual ~Zone(); diff --git a/src/system/system.pro b/src/core/core.pro similarity index 73% rename from src/system/system.pro rename to src/core/core.pro index b71c581..4fec09b 100644 --- a/src/system/system.pro +++ b/src/core/core.pro @@ -1,15 +1,13 @@ #------------------------------------------------- # -# Project created by QtCreator 2013-10-20T11:38:08 +# Project created by QtCreator 2013-11-09T15:13:23 # #------------------------------------------------- -#QT -= gui - +TARGET = paysages_core TEMPLATE = lib -TARGET = paysages_system -DEFINES += SYSTEM_LIBRARY +DEFINES += CORE_LIBRARY include(../common.pri) diff --git a/src/core/core_global.h b/src/core/core_global.h new file mode 100644 index 0000000..e1a15c7 --- /dev/null +++ b/src/core/core_global.h @@ -0,0 +1,175 @@ +#pragma once + +#if defined(__MINGW32__) || defined(_WIN32) +#define DECL_EXPORT __declspec(dllexport) +#define DECL_IMPORT __declspec(dllimport) +#define PLATFORM_WIN 1 +#else +#define DECL_EXPORT __attribute__((visibility("default"))) +#define DECL_IMPORT __attribute__((visibility("default"))) +#define PLATFORM_UNIX 1 +#endif + +#if defined(CORE_LIBRARY) +#define CORESHARED_EXPORT DECL_EXPORT +#else +#define CORESHARED_EXPORT DECL_IMPORT +#endif + +namespace paysages { +namespace basics { +class Vector3; +class Matrix4; +class BoundingBox; +class SpaceGridIterator; +class SpaceSegment; +class Color; +class NoiseGenerator; +class NoiseState; +class FractalNoise; +class NoiseFunctionSimplex; +class Curve; +class ColorProfile; +class Texture2D; +class Texture3D; +class Texture4D; +class CappedCylinder; +class InfiniteRay; +class Sphere; +class InfinitePlane; +} +namespace definition { +class DefinitionNode; +class DefinitionDiff; +class FloatNode; +class FloatDiff; +class IntNode; +class IntDiff; +class NoiseNode; +class ColorNode; +class ColorDiff; +class DiffManager; +class DefinitionWatcher; +class Scenery; +class CameraDefinition; +class SurfaceMaterial; +class MaterialNode; +class Zone; +class WaterDefinition; +class Layers; +class LayersDiff; +class CloudsDefinition; +class CloudLayerDefinition; +class AtmosphereDefinition; +class CelestialBodyDefinition; +class GodRaysDefinition; +class TexturesDefinition; +class TextureLayerDefinition; +class TerrainDefinition; +class TerrainHeightMap; +class VegetationDefinition; +class VegetationLayerDefinition; +class VegetationModelDefinition; +class VegetationPresenceDefinition; +class VegetationInstance; +class PaintedGrid; +class PaintedGridData; +class PaintedGridBrush; +class PaintedGridBrushRaiseLower; +class PaintedGridBrushSmooth; +class PaintedGridBrushAddNoise; +class PaintedGridBrushReset; +class PaintedGridBrushFlatten; +class TimeManager; +} +namespace software { +class SoftwareRenderer; +class SoftwareCanvasRenderer; +class RenderConfig; +class RenderProgress; + +class FluidMediumManager; +class FluidMediumInterface; +class FluidMediumCollector; + +class BaseAtmosphereRenderer; +class SoftwareBrunetonAtmosphereRenderer; +class AtmosphereResult; +class AtmosphereModelBruneton; + +class CloudsRenderer; +class BaseCloudLayerRenderer; +class BaseCloudsModel; + +class TerrainRenderer; +class TexturesRenderer; +class WaterRenderer; + +class Rasterizer; +class OverlayRasterizer; +class SkyRasterizer; +class TerrainRasterizer; +class VegetationRasterizer; + +class LightingManager; +class LightStatus; +class LightFilter; +class LightComponent; +class LightSource; + +class RayCastingManager; +class RayCastingResult; + +class NightSky; +class MoonRenderer; + +class TerrainRayWalker; + +class GodRaysSampler; +class GodRaysResult; +class VegetationResult; +class VegetationRenderer; +class VegetationModelRenderer; + +class Canvas; +class CanvasPortion; +class CanvasPixel; +class CanvasFragment; +class CanvasLiveClient; +class CanvasPreview; +class CanvasPixelShader; +class CanvasPictureWriter; +} +namespace system { +class Logs; +class PackStream; +class ParallelWork; +class ParallelPool; +class ParallelWorker; +class Thread; +class Mutex; +class Semaphore; +class PictureWriter; +class Timing; +class RandomGenerator; + +extern CORESHARED_EXPORT RandomGenerator &RandomGeneratorDefault; +} +} +using namespace paysages::basics; +using namespace paysages::definition; +using namespace paysages::software; +using namespace paysages::system; + +namespace std{ +} +using namespace std; + +// Some useful casts +#define to_double(_x_) (static_cast(_x_)) +#define to_float(_x_) (static_cast(_x_)) +#define trunc_to_int(_x_) (static_cast(_x_)) +#define round_to_int(_x_) (static_cast(round(_x_))) +#define floor_to_int(_x_) (static_cast(floor(_x_))) +#define ceil_to_int(_x_) (static_cast(ceil(_x_))) +#define to_size(_x_) (static_cast(_x_)) diff --git a/src/definition/definition.pro b/src/definition/definition.pro deleted file mode 100644 index a973136..0000000 --- a/src/definition/definition.pro +++ /dev/null @@ -1,38 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2013-10-29T14:38:43 -# -#------------------------------------------------- - -QT -= gui - -TARGET = paysages_definition -TEMPLATE = lib - -DEFINES += DEFINITION_LIBRARY - -include(../common.pri) - -SOURCES += $$files(*.cpp) -HEADERS += $$files(*.h) - -unix:!symbian { - maemo5 { - target.path = /opt/usr/lib - } else { - target.path = /usr/lib - } - INSTALLS += target -} - -win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../system/release/ -lpaysages_system -else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../system/debug/ -lpaysages_system -else:unix: LIBS += -L$$OUT_PWD/../system/ -lpaysages_system -INCLUDEPATH += $$PWD/../system -DEPENDPATH += $$PWD/../system - -win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../basics/release/ -lpaysages_basics -else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../basics/debug/ -lpaysages_basics -else:unix: LIBS += -L$$OUT_PWD/../basics/ -lpaysages_basics -INCLUDEPATH += $$PWD/../basics -DEPENDPATH += $$PWD/../basics diff --git a/src/definition/definition_global.h b/src/definition/definition_global.h deleted file mode 100644 index 8f8deb8..0000000 --- a/src/definition/definition_global.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once - -#include "basics_global.h" - -#if defined(DEFINITION_LIBRARY) -#define DEFINITIONSHARED_EXPORT DECL_EXPORT -#else -#define DEFINITIONSHARED_EXPORT DECL_IMPORT -#endif - -namespace paysages { -namespace definition { -class DefinitionNode; -class DefinitionDiff; -class FloatNode; -class FloatDiff; -class IntNode; -class IntDiff; -class NoiseNode; -class ColorNode; -class ColorDiff; -class DiffManager; -class DefinitionWatcher; -class Scenery; -class CameraDefinition; -class SurfaceMaterial; -class MaterialNode; -class Zone; -class WaterDefinition; -class Layers; -class LayersDiff; -class CloudsDefinition; -class CloudLayerDefinition; -class AtmosphereDefinition; -class CelestialBodyDefinition; -class GodRaysDefinition; -class TexturesDefinition; -class TextureLayerDefinition; -class TerrainDefinition; -class TerrainHeightMap; -class VegetationDefinition; -class VegetationLayerDefinition; -class VegetationModelDefinition; -class VegetationPresenceDefinition; -class VegetationInstance; -class PaintedGrid; -class PaintedGridData; -class PaintedGridBrush; -class PaintedGridBrushRaiseLower; -class PaintedGridBrushSmooth; -class PaintedGridBrushAddNoise; -class PaintedGridBrushReset; -class PaintedGridBrushFlatten; -class TimeManager; -} -} -using namespace paysages::definition; diff --git a/src/interface/commandline/commandline.pro b/src/interface/commandline/commandline.pro index 3b8b1f9..ab84cb5 100644 --- a/src/interface/commandline/commandline.pro +++ b/src/interface/commandline/commandline.pro @@ -9,29 +9,11 @@ include(../../common.pri) SOURCES += $$files(*.cpp) #HEADERS += $$files(*.h) -win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../system/release/ -lpaysages_system -else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../system/debug/ -lpaysages_system -else:unix: LIBS += -L$$OUT_PWD/../../system/ -lpaysages_system -INCLUDEPATH += $$PWD/../../system -DEPENDPATH += $$PWD/../../system - -win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../basics/release/ -lpaysages_basics -else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../basics/debug/ -lpaysages_basics -else:unix: LIBS += -L$$OUT_PWD/../../basics/ -lpaysages_basics -INCLUDEPATH += $$PWD/../../basics -DEPENDPATH += $$PWD/../../basics - -win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../definition/release/ -lpaysages_definition -else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../definition/debug/ -lpaysages_definition -else:unix: LIBS += -L$$OUT_PWD/../../definition/ -lpaysages_definition -INCLUDEPATH += $$PWD/../../definition -DEPENDPATH += $$PWD/../../definition - -win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../render/software/release/ -lpaysages_render_software -else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../render/software/debug/ -lpaysages_render_software -else:unix: LIBS += -L$$OUT_PWD/../../render/software/ -lpaysages_render_software -INCLUDEPATH += $$PWD/../../render/software -DEPENDPATH += $$PWD/../../render/software +win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../core/release/ -lpaysages_core +else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../core/debug/ -lpaysages_core +else:unix: LIBS += -L$$OUT_PWD/../../core/ -lpaysages_core +INCLUDEPATH += $$PWD/../../core +DEPENDPATH += $$PWD/../../core win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../render/opengl/release/ -lpaysages_render_opengl else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../render/opengl/debug/ -lpaysages_render_opengl diff --git a/src/interface/commandline/tests.cpp b/src/interface/commandline/tests.cpp index fe17f26..2948f5a 100644 --- a/src/interface/commandline/tests.cpp +++ b/src/interface/commandline/tests.cpp @@ -36,7 +36,7 @@ #include "VegetationRenderer.h" #include "WaterDefinition.h" #include "Zone.h" -#include "clouds/BaseCloudsModel.h" +#include "BaseCloudsModel.h" #include #include diff --git a/src/interface/modeler/modeler.pro b/src/interface/modeler/modeler.pro index 79fcdf2..b2cf4df 100644 --- a/src/interface/modeler/modeler.pro +++ b/src/interface/modeler/modeler.pro @@ -15,29 +15,11 @@ TARGET = paysages-modeler # Default rules for deployment. include(deployment.pri) -win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../system/release/ -lpaysages_system -else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../system/debug/ -lpaysages_system -else:unix: LIBS += -L$$OUT_PWD/../../system/ -lpaysages_system -INCLUDEPATH += $$PWD/../../system -DEPENDPATH += $$PWD/../../system - -win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../basics/release/ -lpaysages_basics -else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../basics/debug/ -lpaysages_basics -else:unix: LIBS += -L$$OUT_PWD/../../basics/ -lpaysages_basics -INCLUDEPATH += $$PWD/../../basics -DEPENDPATH += $$PWD/../../basics - -win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../definition/release/ -lpaysages_definition -else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../definition/debug/ -lpaysages_definition -else:unix: LIBS += -L$$OUT_PWD/../../definition/ -lpaysages_definition -INCLUDEPATH += $$PWD/../../definition -DEPENDPATH += $$PWD/../../definition - -win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../render/software/release/ -lpaysages_render_software -else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../render/software/debug/ -lpaysages_render_software -else:unix: LIBS += -L$$OUT_PWD/../../render/software/ -lpaysages_render_software -INCLUDEPATH += $$PWD/../../render/software -DEPENDPATH += $$PWD/../../render/software +win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../core/release/ -lpaysages_core +else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../core/debug/ -lpaysages_core +else:unix: LIBS += -L$$OUT_PWD/../../core/ -lpaysages_core +INCLUDEPATH += $$PWD/../../core +DEPENDPATH += $$PWD/../../core win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../render/opengl/release/ -lpaysages_render_opengl else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../render/opengl/debug/ -lpaysages_render_opengl diff --git a/src/interface/modeler/modeler_global.h b/src/interface/modeler/modeler_global.h index 28c0017..35f1fb8 100644 --- a/src/interface/modeler/modeler_global.h +++ b/src/interface/modeler/modeler_global.h @@ -1,8 +1,8 @@ #pragma once -#include "definition_global.h" +#include "core_global.h" #include "opengl_global.h" -#include "software_global.h" +#include "core_global.h" namespace paysages { namespace modeler { diff --git a/src/paysages.pro b/src/paysages.pro index 312b2ab..d2a54c6 100644 --- a/src/paysages.pro +++ b/src/paysages.pro @@ -2,10 +2,7 @@ TEMPLATE = subdirs CONFIG += ordered SUBDIRS = \ - system \ - basics \ - definition \ - render/software \ + core \ render/opengl \ interface/commandline \ interface/modeler diff --git a/src/render/opengl/opengl.pro b/src/render/opengl/opengl.pro index 26740cf..1aa508c 100644 --- a/src/render/opengl/opengl.pro +++ b/src/render/opengl/opengl.pro @@ -25,29 +25,11 @@ unix:!symbian { INSTALLS += target } -win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../system/release/ -lpaysages_system -else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../system/debug/ -lpaysages_system -else:unix: LIBS += -L$$OUT_PWD/../../system/ -lpaysages_system -INCLUDEPATH += $$PWD/../../system -DEPENDPATH += $$PWD/../../system - -win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../basics/release/ -lpaysages_basics -else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../basics/debug/ -lpaysages_basics -else:unix: LIBS += -L$$OUT_PWD/../../basics/ -lpaysages_basics -INCLUDEPATH += $$PWD/../../basics -DEPENDPATH += $$PWD/../../basics - -win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../definition/release/ -lpaysages_definition -else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../definition/debug/ -lpaysages_definition -else:unix: LIBS += -L$$OUT_PWD/../../definition/ -lpaysages_definition -INCLUDEPATH += $$PWD/../../definition -DEPENDPATH += $$PWD/../../definition - -win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../software/release/ -lpaysages_render_software -else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../software/debug/ -lpaysages_render_software -else:unix: LIBS += -L$$OUT_PWD/../software/ -lpaysages_render_software -INCLUDEPATH += $$PWD/../software -DEPENDPATH += $$PWD/../software +win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../core/release/ -lpaysages_core +else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../core/debug/ -lpaysages_core +else:unix: LIBS += -L$$OUT_PWD/../../core/ -lpaysages_core +INCLUDEPATH += $$PWD/../../core +DEPENDPATH += $$PWD/../../core RESOURCES += \ shaders/resources.qrc diff --git a/src/render/opengl/opengl_global.h b/src/render/opengl/opengl_global.h index 12886d9..53dd5a0 100644 --- a/src/render/opengl/opengl_global.h +++ b/src/render/opengl/opengl_global.h @@ -1,6 +1,6 @@ #pragma once -#include "software_global.h" +#include "core_global.h" #if defined(OPENGL_LIBRARY) #define OPENGLSHARED_EXPORT DECL_EXPORT diff --git a/src/render/software/software.pro b/src/render/software/software.pro deleted file mode 100644 index dff5077..0000000 --- a/src/render/software/software.pro +++ /dev/null @@ -1,47 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2013-11-09T15:13:23 -# -#------------------------------------------------- - -QT -= gui - -TARGET = paysages_render_software -TEMPLATE = lib - -DEFINES += SOFTWARE_LIBRARY - -include(../../common.pri) - -SOURCES += $$files(*.cpp) -HEADERS += $$files(*.h) - -SOURCES += $$files(clouds/*.cpp) -HEADERS += $$files(clouds/*.h) - -unix:!symbian { - maemo5 { - target.path = /opt/usr/lib - } else { - target.path = /usr/lib - } - INSTALLS += target -} - -win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../system/release/ -lpaysages_system -else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../system/debug/ -lpaysages_system -else:unix: LIBS += -L$$OUT_PWD/../../system/ -lpaysages_system -INCLUDEPATH += $$PWD/../../system -DEPENDPATH += $$PWD/../../system - -win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../basics/release/ -lpaysages_basics -else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../basics/debug/ -lpaysages_basics -else:unix: LIBS += -L$$OUT_PWD/../../basics/ -lpaysages_basics -INCLUDEPATH += $$PWD/../../basics -DEPENDPATH += $$PWD/../../basics - -win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../definition/release/ -lpaysages_definition -else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../definition/debug/ -lpaysages_definition -else:unix: LIBS += -L$$OUT_PWD/../../definition/ -lpaysages_definition -INCLUDEPATH += $$PWD/../../definition -DEPENDPATH += $$PWD/../../definition diff --git a/src/render/software/software_global.h b/src/render/software/software_global.h deleted file mode 100644 index fee1f8a..0000000 --- a/src/render/software/software_global.h +++ /dev/null @@ -1,72 +0,0 @@ -#pragma once - -#include "definition_global.h" - -#if defined(SOFTWARE_LIBRARY) -#define SOFTWARESHARED_EXPORT DECL_EXPORT -#else -#define SOFTWARESHARED_EXPORT DECL_IMPORT -#endif - -namespace paysages { -namespace software { -class SoftwareRenderer; -class SoftwareCanvasRenderer; -class RenderConfig; -class RenderProgress; - -class FluidMediumManager; -class FluidMediumInterface; -class FluidMediumCollector; - -class BaseAtmosphereRenderer; -class SoftwareBrunetonAtmosphereRenderer; -class AtmosphereResult; -class AtmosphereModelBruneton; - -class CloudsRenderer; -class BaseCloudLayerRenderer; -class BaseCloudsModel; - -class TerrainRenderer; -class TexturesRenderer; -class WaterRenderer; - -class Rasterizer; -class OverlayRasterizer; -class SkyRasterizer; -class TerrainRasterizer; -class VegetationRasterizer; - -class LightingManager; -class LightStatus; -class LightFilter; -class LightComponent; -class LightSource; - -class RayCastingManager; -class RayCastingResult; - -class NightSky; -class MoonRenderer; - -class TerrainRayWalker; - -class GodRaysSampler; -class GodRaysResult; -class VegetationResult; -class VegetationRenderer; -class VegetationModelRenderer; - -class Canvas; -class CanvasPortion; -class CanvasPixel; -class CanvasFragment; -class CanvasLiveClient; -class CanvasPreview; -class CanvasPixelShader; -class CanvasPictureWriter; -} -} - -using namespace paysages::software; diff --git a/src/system/system_global.h b/src/system/system_global.h deleted file mode 100644 index 926adaa..0000000 --- a/src/system/system_global.h +++ /dev/null @@ -1,47 +0,0 @@ -#pragma once - -#if defined(__MINGW32__) || defined(_WIN32) -#define DECL_EXPORT __declspec(dllexport) -#define DECL_IMPORT __declspec(dllimport) -#define PLATFORM_WIN 1 -#else -#define DECL_EXPORT __attribute__((visibility("default"))) -#define DECL_IMPORT __attribute__((visibility("default"))) -#define PLATFORM_UNIX 1 -#endif - -#if defined(SYSTEM_LIBRARY) -#define SYSTEMSHARED_EXPORT DECL_EXPORT -#else -#define SYSTEMSHARED_EXPORT DECL_IMPORT -#endif - -namespace paysages { -namespace system { -class Logs; -class PackStream; -class ParallelWork; -class ParallelPool; -class ParallelWorker; -class Thread; -class Mutex; -class Semaphore; -class PictureWriter; -class Timing; -class RandomGenerator; - -extern SYSTEMSHARED_EXPORT RandomGenerator &RandomGeneratorDefault; -} -} -using namespace paysages::system; - -using namespace std; - -// Some useful casts -#define to_double(_x_) (static_cast(_x_)) -#define to_float(_x_) (static_cast(_x_)) -#define trunc_to_int(_x_) (static_cast(_x_)) -#define round_to_int(_x_) (static_cast(round(_x_))) -#define floor_to_int(_x_) (static_cast(floor(_x_))) -#define ceil_to_int(_x_) (static_cast(ceil(_x_))) -#define to_size(_x_) (static_cast(_x_)) diff --git a/src/tests/GodRaysSampler_Test.cpp b/src/tests/GodRaysSampler_Test.cpp index 8630531..0a1f6c1 100644 --- a/src/tests/GodRaysSampler_Test.cpp +++ b/src/tests/GodRaysSampler_Test.cpp @@ -48,14 +48,14 @@ TEST(GodRaysSampler, setQuality) { EXPECT_DOUBLE_EQ(5.0, sampler.getWalkStep()); sampler.setQuality(0.5); - EXPECT_DOUBLE_EQ(1.0, sampler.getSamplingStep()); + EXPECT_DOUBLE_EQ(1.4285714285714286, sampler.getSamplingStep()); EXPECT_DOUBLE_EQ(100.0, sampler.getMaxLength()); - EXPECT_DOUBLE_EQ(0.12195121951, sampler.getWalkStep()); + EXPECT_DOUBLE_EQ(0.19230769230769232, sampler.getWalkStep()); sampler.setQuality(1.0); - EXPECT_DOUBLE_EQ(0.55555555555, sampler.getSamplingStep()); + EXPECT_DOUBLE_EQ(0.8333333333333333, sampler.getSamplingStep()); EXPECT_DOUBLE_EQ(100.0, sampler.getMaxLength()); - EXPECT_DOUBLE_EQ(0.06172839506, sampler.getWalkStep()); + EXPECT_DOUBLE_EQ(0.09803921568627450, sampler.getWalkStep()); } class GodRayLightSource : public LightSource { diff --git a/src/tests/tests.pro b/src/tests/tests.pro index 6a0b9f5..10ce5a8 100644 --- a/src/tests/tests.pro +++ b/src/tests/tests.pro @@ -15,29 +15,11 @@ else:unix: LIBS += -L$$OUT_PWD/googletest/ -lgoogletest INCLUDEPATH += $$PWD/googletest/sources/include DEPENDPATH += $$PWD/googletest/sources/include -win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../system/release/ -lpaysages_system -else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../system/debug/ -lpaysages_system -else:unix: LIBS += -L$$OUT_PWD/../system/ -lpaysages_system -INCLUDEPATH += $$PWD/../system -DEPENDPATH += $$PWD/../system - -win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../basics/release/ -lpaysages_basics -else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../basics/debug/ -lpaysages_basics -else:unix: LIBS += -L$$OUT_PWD/../basics/ -lpaysages_basics -INCLUDEPATH += $$PWD/../basics -DEPENDPATH += $$PWD/../basics - -win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../definition/release/ -lpaysages_definition -else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../definition/debug/ -lpaysages_definition -else:unix: LIBS += -L$$OUT_PWD/../definition/ -lpaysages_definition -INCLUDEPATH += $$PWD/../definition -DEPENDPATH += $$PWD/../definition - -win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../render/software/release/ -lpaysages_render_software -else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../render/software/debug/ -lpaysages_render_software -else:unix: LIBS += -L$$OUT_PWD/../render/software/ -lpaysages_render_software -INCLUDEPATH += $$PWD/../render/software -DEPENDPATH += $$PWD/../render/software +win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../core/release/ -lpaysages_core +else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../core/debug/ -lpaysages_core +else:unix: LIBS += -L$$OUT_PWD/../core/ -lpaysages_core +INCLUDEPATH += $$PWD/../core +DEPENDPATH += $$PWD/../core win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../render/opengl/release/ -lpaysages_render_opengl else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../render/opengl/debug/ -lpaysages_render_opengl