Regrouped basics/system/definition/software into core
This commit is contained in:
parent
655e0d784a
commit
be8a5f9764
277 changed files with 494 additions and 723 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -8,7 +8,7 @@
|
||||||
/output/
|
/output/
|
||||||
/perf.*
|
/perf.*
|
||||||
/pic*.png
|
/pic*.png
|
||||||
core
|
/core
|
||||||
*.pro.user
|
*.pro.user
|
||||||
*.pro.user.*
|
*.pro.user.*
|
||||||
qrc_*.cpp
|
qrc_*.cpp
|
||||||
|
|
|
@ -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);
|
|
|
@ -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
|
|
|
@ -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;
|
|
|
@ -1,3 +1,3 @@
|
||||||
CONFIG(release, debug|release): DEFINES += NDEBUG QT_NO_DEBUG_OUTPUT
|
CONFIG(release, debug|release): DEFINES += NDEBUG QT_NO_DEBUG_OUTPUT
|
||||||
|
|
||||||
CONFIG += c++14
|
CONFIG += c++17
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "definition_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "DefinitionNode.h"
|
#include "DefinitionNode.h"
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
namespace paysages {
|
namespace paysages {
|
||||||
namespace definition {
|
namespace definition {
|
||||||
|
|
||||||
class DEFINITIONSHARED_EXPORT AtmosphereDefinition : public DefinitionNode {
|
class CORESHARED_EXPORT AtmosphereDefinition : public DefinitionNode {
|
||||||
public:
|
public:
|
||||||
typedef struct {
|
typedef struct {
|
||||||
Vector3 location;
|
Vector3 location;
|
|
@ -1,13 +1,13 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "software_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "LightSource.h"
|
#include "LightSource.h"
|
||||||
|
|
||||||
namespace paysages {
|
namespace paysages {
|
||||||
namespace software {
|
namespace software {
|
||||||
|
|
||||||
class SOFTWARESHARED_EXPORT AtmosphereModelBruneton : public LightSource {
|
class CORESHARED_EXPORT AtmosphereModelBruneton : public LightSource {
|
||||||
public:
|
public:
|
||||||
AtmosphereModelBruneton(SoftwareRenderer *parent);
|
AtmosphereModelBruneton(SoftwareRenderer *parent);
|
||||||
virtual ~AtmosphereModelBruneton();
|
virtual ~AtmosphereModelBruneton();
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "software_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "LightSource.h"
|
#include "LightSource.h"
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "software_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "Color.h"
|
#include "Color.h"
|
||||||
|
|
||||||
namespace paysages {
|
namespace paysages {
|
||||||
namespace software {
|
namespace software {
|
||||||
|
|
||||||
class SOFTWARESHARED_EXPORT AtmosphereResult {
|
class CORESHARED_EXPORT AtmosphereResult {
|
||||||
public:
|
public:
|
||||||
AtmosphereResult();
|
AtmosphereResult();
|
||||||
void updateFinal();
|
void updateFinal();
|
|
@ -1,7 +1,7 @@
|
||||||
#include "BaseCloudLayerRenderer.h"
|
#include "BaseCloudLayerRenderer.h"
|
||||||
|
|
||||||
#include "Vector3.h"
|
#include "Vector3.h"
|
||||||
#include "clouds/BaseCloudsModel.h"
|
#include "BaseCloudsModel.h"
|
||||||
|
|
||||||
BaseCloudLayerRenderer::BaseCloudLayerRenderer(SoftwareRenderer *parent) : parent(parent) {
|
BaseCloudLayerRenderer::BaseCloudLayerRenderer(SoftwareRenderer *parent) : parent(parent) {
|
||||||
setQuality(0.5);
|
setQuality(0.5);
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "software_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
namespace paysages {
|
namespace paysages {
|
||||||
namespace software {
|
namespace software {
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../software_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "Color.h"
|
#include "Color.h"
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ namespace software {
|
||||||
/**
|
/**
|
||||||
* Abstract class for all cloud models (cirrus, cumulus...).
|
* Abstract class for all cloud models (cirrus, cumulus...).
|
||||||
*/
|
*/
|
||||||
class SOFTWARESHARED_EXPORT BaseCloudsModel {
|
class CORESHARED_EXPORT BaseCloudsModel {
|
||||||
public:
|
public:
|
||||||
BaseCloudsModel(CloudLayerDefinition *layer);
|
BaseCloudsModel(CloudLayerDefinition *layer);
|
||||||
virtual ~BaseCloudsModel();
|
virtual ~BaseCloudsModel();
|
|
@ -1,11 +1,11 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "basics_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
namespace paysages {
|
namespace paysages {
|
||||||
namespace basics {
|
namespace basics {
|
||||||
|
|
||||||
class BASICSSHARED_EXPORT BoundingBox {
|
class CORESHARED_EXPORT BoundingBox {
|
||||||
public:
|
public:
|
||||||
BoundingBox();
|
BoundingBox();
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "system_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace paysages {
|
namespace paysages {
|
||||||
namespace system {
|
namespace system {
|
||||||
|
|
||||||
class SYSTEMSHARED_EXPORT CacheFile {
|
class CORESHARED_EXPORT CacheFile {
|
||||||
public:
|
public:
|
||||||
CacheFile(const string &module, const string &ext, const string &tag1, int tag2, int tag3, int tag4, int tag5,
|
CacheFile(const string &module, const string &ext, const string &tag1, int tag2, int tag3, int tag4, int tag5,
|
||||||
int tag6);
|
int tag6);
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "definition_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "DefinitionNode.h"
|
#include "DefinitionNode.h"
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ typedef struct {
|
||||||
double zfar;
|
double zfar;
|
||||||
} CameraPerspective;
|
} CameraPerspective;
|
||||||
|
|
||||||
class DEFINITIONSHARED_EXPORT CameraDefinition : public DefinitionNode {
|
class CORESHARED_EXPORT CameraDefinition : public DefinitionNode {
|
||||||
public:
|
public:
|
||||||
CameraDefinition(DefinitionNode *parent = NULL);
|
CameraDefinition(DefinitionNode *parent = NULL);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "software_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -14,7 +14,7 @@ namespace software {
|
||||||
* Software rendering is done in portions of Canvas (in CanvasPortion class).
|
* Software rendering is done in portions of Canvas (in CanvasPortion class).
|
||||||
* This splitting in portions allows to keep memory consumption low.
|
* This splitting in portions allows to keep memory consumption low.
|
||||||
*/
|
*/
|
||||||
class SOFTWARESHARED_EXPORT Canvas {
|
class CORESHARED_EXPORT Canvas {
|
||||||
public:
|
public:
|
||||||
Canvas();
|
Canvas();
|
||||||
~Canvas();
|
~Canvas();
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "software_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "Color.h"
|
#include "Color.h"
|
||||||
#include "Vector3.h"
|
#include "Vector3.h"
|
||||||
|
@ -11,7 +11,7 @@ namespace software {
|
||||||
/**
|
/**
|
||||||
* Representation of world coordinates projected in a canvas pixel.
|
* Representation of world coordinates projected in a canvas pixel.
|
||||||
*/
|
*/
|
||||||
class SOFTWARESHARED_EXPORT CanvasFragment {
|
class CORESHARED_EXPORT CanvasFragment {
|
||||||
public:
|
public:
|
||||||
CanvasFragment() = default;
|
CanvasFragment() = default;
|
||||||
CanvasFragment(bool front_facing, const Vector3 &pixel, const Vector3 &location, int client = 0,
|
CanvasFragment(bool front_facing, const Vector3 &pixel, const Vector3 &location, int client = 0,
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "software_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
namespace paysages {
|
namespace paysages {
|
||||||
namespace software {
|
namespace software {
|
||||||
|
@ -8,7 +8,7 @@ namespace software {
|
||||||
/**
|
/**
|
||||||
* Abstract class to receive live modifications from canvas preview.
|
* Abstract class to receive live modifications from canvas preview.
|
||||||
*/
|
*/
|
||||||
class SOFTWARESHARED_EXPORT CanvasLiveClient {
|
class CORESHARED_EXPORT CanvasLiveClient {
|
||||||
public:
|
public:
|
||||||
CanvasLiveClient();
|
CanvasLiveClient();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "software_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "PictureWriter.h"
|
#include "PictureWriter.h"
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ namespace software {
|
||||||
/**
|
/**
|
||||||
* Picture writer to create the final image from canvas portions.
|
* Picture writer to create the final image from canvas portions.
|
||||||
*/
|
*/
|
||||||
class SOFTWARESHARED_EXPORT CanvasPictureWriter : public PictureWriter {
|
class CORESHARED_EXPORT CanvasPictureWriter : public PictureWriter {
|
||||||
public:
|
public:
|
||||||
CanvasPictureWriter(const Canvas *canvas);
|
CanvasPictureWriter(const Canvas *canvas);
|
||||||
virtual ~CanvasPictureWriter();
|
virtual ~CanvasPictureWriter();
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "software_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "CanvasFragment.h"
|
#include "CanvasFragment.h"
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ namespace software {
|
||||||
*
|
*
|
||||||
* A pixel stores superimposed fragments (CanvasFragment), sorted by their distance to camera.
|
* A pixel stores superimposed fragments (CanvasFragment), sorted by their distance to camera.
|
||||||
*/
|
*/
|
||||||
class SOFTWARESHARED_EXPORT CanvasPixel {
|
class CORESHARED_EXPORT CanvasPixel {
|
||||||
public:
|
public:
|
||||||
CanvasPixel();
|
CanvasPixel();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "software_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "ParallelWorker.h"
|
#include "ParallelWorker.h"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "software_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ namespace software {
|
||||||
*
|
*
|
||||||
* Pixels are not allocated until preparePixels is called.
|
* Pixels are not allocated until preparePixels is called.
|
||||||
*/
|
*/
|
||||||
class SOFTWARESHARED_EXPORT CanvasPortion {
|
class CORESHARED_EXPORT CanvasPortion {
|
||||||
public:
|
public:
|
||||||
CanvasPortion(int index = 0, CanvasPreview *preview = NULL);
|
CanvasPortion(int index = 0, CanvasPreview *preview = NULL);
|
||||||
virtual ~CanvasPortion();
|
virtual ~CanvasPortion();
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "software_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
namespace paysages {
|
namespace paysages {
|
||||||
namespace software {
|
namespace software {
|
||||||
|
@ -8,7 +8,7 @@ namespace software {
|
||||||
/**
|
/**
|
||||||
* Smaller preview of a Canvas rendering, that can be watched live.
|
* Smaller preview of a Canvas rendering, that can be watched live.
|
||||||
*/
|
*/
|
||||||
class SOFTWARESHARED_EXPORT CanvasPreview {
|
class CORESHARED_EXPORT CanvasPreview {
|
||||||
public:
|
public:
|
||||||
CanvasPreview();
|
CanvasPreview();
|
||||||
~CanvasPreview();
|
~CanvasPreview();
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "basics_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "InfiniteCylinder.h"
|
#include "InfiniteCylinder.h"
|
||||||
#include "Sphere.h"
|
#include "Sphere.h"
|
||||||
|
@ -11,7 +11,7 @@ namespace basics {
|
||||||
/**
|
/**
|
||||||
* Geometric cylinder, with capped ends (not infinite).
|
* Geometric cylinder, with capped ends (not infinite).
|
||||||
*/
|
*/
|
||||||
class BASICSSHARED_EXPORT CappedCylinder : public InfiniteCylinder {
|
class CORESHARED_EXPORT CappedCylinder : public InfiniteCylinder {
|
||||||
public:
|
public:
|
||||||
CappedCylinder() = default;
|
CappedCylinder() = default;
|
||||||
CappedCylinder(const Vector3 &base, const Vector3 &direction, double radius, double length);
|
CappedCylinder(const Vector3 &base, const Vector3 &direction, double radius, double length);
|
|
@ -1,13 +1,13 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "definition_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "DefinitionNode.h"
|
#include "DefinitionNode.h"
|
||||||
|
|
||||||
namespace paysages {
|
namespace paysages {
|
||||||
namespace definition {
|
namespace definition {
|
||||||
|
|
||||||
class DEFINITIONSHARED_EXPORT CelestialBodyDefinition : public DefinitionNode {
|
class CORESHARED_EXPORT CelestialBodyDefinition : public DefinitionNode {
|
||||||
public:
|
public:
|
||||||
CelestialBodyDefinition(DefinitionNode *parent, const string &name);
|
CelestialBodyDefinition(DefinitionNode *parent, const string &name);
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include "NoiseGenerator.h"
|
#include "NoiseGenerator.h"
|
||||||
#include "SoftwareRenderer.h"
|
#include "SoftwareRenderer.h"
|
||||||
#include "SurfaceMaterial.h"
|
#include "SurfaceMaterial.h"
|
||||||
#include "clouds/BaseCloudsModel.h"
|
#include "BaseCloudsModel.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cmath>
|
#include <cmath>
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "software_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "BaseCloudLayerRenderer.h"
|
#include "BaseCloudLayerRenderer.h"
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ namespace software {
|
||||||
* This renderer simply iters through the cloud layer, collecting cloud segments.
|
* This renderer simply iters through the cloud layer, collecting cloud segments.
|
||||||
* It does not account for local density variations.
|
* It does not account for local density variations.
|
||||||
*/
|
*/
|
||||||
class SOFTWARESHARED_EXPORT CloudBasicLayerRenderer : public BaseCloudLayerRenderer {
|
class CORESHARED_EXPORT CloudBasicLayerRenderer : public BaseCloudLayerRenderer {
|
||||||
public:
|
public:
|
||||||
CloudBasicLayerRenderer(SoftwareRenderer *parent);
|
CloudBasicLayerRenderer(SoftwareRenderer *parent);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "definition_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "DefinitionNode.h"
|
#include "DefinitionNode.h"
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
namespace paysages {
|
namespace paysages {
|
||||||
namespace definition {
|
namespace definition {
|
||||||
|
|
||||||
class DEFINITIONSHARED_EXPORT CloudLayerDefinition : public DefinitionNode {
|
class CORESHARED_EXPORT CloudLayerDefinition : public DefinitionNode {
|
||||||
public:
|
public:
|
||||||
CloudLayerDefinition(DefinitionNode *parent, const string &name);
|
CloudLayerDefinition(DefinitionNode *parent, const string &name);
|
||||||
virtual ~CloudLayerDefinition();
|
virtual ~CloudLayerDefinition();
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../software_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "BaseCloudsModel.h"
|
#include "BaseCloudsModel.h"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../software_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "BaseCloudsModel.h"
|
#include "BaseCloudsModel.h"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../software_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "BaseCloudsModel.h"
|
#include "BaseCloudsModel.h"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../software_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "BaseCloudsModel.h"
|
#include "BaseCloudsModel.h"
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "definition_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "Layers.h"
|
#include "Layers.h"
|
||||||
|
|
||||||
namespace paysages {
|
namespace paysages {
|
||||||
namespace definition {
|
namespace definition {
|
||||||
|
|
||||||
class DEFINITIONSHARED_EXPORT CloudsDefinition : public Layers {
|
class CORESHARED_EXPORT CloudsDefinition : public Layers {
|
||||||
public:
|
public:
|
||||||
CloudsDefinition(DefinitionNode *parent);
|
CloudsDefinition(DefinitionNode *parent);
|
||||||
|
|
|
@ -9,11 +9,11 @@
|
||||||
#include "Scenery.h"
|
#include "Scenery.h"
|
||||||
#include "SoftwareRenderer.h"
|
#include "SoftwareRenderer.h"
|
||||||
|
|
||||||
#include "clouds/BaseCloudsModel.h"
|
#include "BaseCloudsModel.h"
|
||||||
#include "clouds/CloudModelAltoCumulus.h"
|
#include "CloudModelAltoCumulus.h"
|
||||||
#include "clouds/CloudModelCirrus.h"
|
#include "CloudModelCirrus.h"
|
||||||
#include "clouds/CloudModelCumuloNimbus.h"
|
#include "CloudModelCumuloNimbus.h"
|
||||||
#include "clouds/CloudModelStratoCumulus.h"
|
#include "CloudModelStratoCumulus.h"
|
||||||
|
|
||||||
CloudsRenderer::CloudsRenderer(SoftwareRenderer *parent) : parent(parent) {
|
CloudsRenderer::CloudsRenderer(SoftwareRenderer *parent) : parent(parent) {
|
||||||
quality = 0.5;
|
quality = 0.5;
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "software_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "LightFilter.h"
|
#include "LightFilter.h"
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ namespace software {
|
||||||
/**
|
/**
|
||||||
* Software renderer of a group of cloud layers.
|
* Software renderer of a group of cloud layers.
|
||||||
*/
|
*/
|
||||||
class SOFTWARESHARED_EXPORT CloudsRenderer : public LightFilter {
|
class CORESHARED_EXPORT CloudsRenderer : public LightFilter {
|
||||||
public:
|
public:
|
||||||
CloudsRenderer(SoftwareRenderer *parent);
|
CloudsRenderer(SoftwareRenderer *parent);
|
||||||
virtual ~CloudsRenderer();
|
virtual ~CloudsRenderer();
|
|
@ -1,11 +1,11 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "basics_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
namespace paysages {
|
namespace paysages {
|
||||||
namespace basics {
|
namespace basics {
|
||||||
|
|
||||||
class BASICSSHARED_EXPORT Color {
|
class CORESHARED_EXPORT Color {
|
||||||
public:
|
public:
|
||||||
Color() = default;
|
Color() = default;
|
||||||
Color(const Color &col);
|
Color(const Color &col);
|
||||||
|
@ -55,12 +55,12 @@ class BASICSSHARED_EXPORT Color {
|
||||||
double a;
|
double a;
|
||||||
};
|
};
|
||||||
|
|
||||||
BASICSSHARED_EXPORT extern const Color COLOR_TRANSPARENT;
|
CORESHARED_EXPORT extern const Color COLOR_TRANSPARENT;
|
||||||
BASICSSHARED_EXPORT extern const Color COLOR_BLACK;
|
CORESHARED_EXPORT extern const Color COLOR_BLACK;
|
||||||
BASICSSHARED_EXPORT extern const Color COLOR_RED;
|
CORESHARED_EXPORT extern const Color COLOR_RED;
|
||||||
BASICSSHARED_EXPORT extern const Color COLOR_GREEN;
|
CORESHARED_EXPORT extern const Color COLOR_GREEN;
|
||||||
BASICSSHARED_EXPORT extern const Color COLOR_BLUE;
|
CORESHARED_EXPORT extern const Color COLOR_BLUE;
|
||||||
BASICSSHARED_EXPORT extern const Color COLOR_WHITE;
|
CORESHARED_EXPORT extern const Color COLOR_WHITE;
|
||||||
BASICSSHARED_EXPORT extern const Color COLOR_GREY;
|
CORESHARED_EXPORT extern const Color COLOR_GREY;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "definition_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "Color.h"
|
#include "Color.h"
|
||||||
#include "DefinitionDiff.h"
|
#include "DefinitionDiff.h"
|
||||||
|
@ -11,7 +11,7 @@ namespace definition {
|
||||||
/**
|
/**
|
||||||
* Diff for a ColorNode.
|
* Diff for a ColorNode.
|
||||||
*/
|
*/
|
||||||
class DEFINITIONSHARED_EXPORT ColorDiff : public DefinitionDiff {
|
class CORESHARED_EXPORT ColorDiff : public DefinitionDiff {
|
||||||
public:
|
public:
|
||||||
ColorDiff(const DefinitionNode *node, const Color &oldvalue, const Color &newvalue);
|
ColorDiff(const DefinitionNode *node, const Color &oldvalue, const Color &newvalue);
|
||||||
ColorDiff(const ColorDiff *other, const Color &oldvalue, const Color &newvalue);
|
ColorDiff(const ColorDiff *other, const Color &oldvalue, const Color &newvalue);
|
15
src/core/ColorHSL.h
Normal file
15
src/core/ColorHSL.h
Normal file
|
@ -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);
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "definition_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "Color.h"
|
#include "Color.h"
|
||||||
#include "DefinitionNode.h"
|
#include "DefinitionNode.h"
|
||||||
|
@ -11,7 +11,7 @@ namespace definition {
|
||||||
/**
|
/**
|
||||||
* Node with a single color value, for the definition tree.
|
* Node with a single color value, for the definition tree.
|
||||||
*/
|
*/
|
||||||
class DEFINITIONSHARED_EXPORT ColorNode : public DefinitionNode {
|
class CORESHARED_EXPORT ColorNode : public DefinitionNode {
|
||||||
public:
|
public:
|
||||||
ColorNode(DefinitionNode *parent, const string &name, const Color &value = COLOR_TRANSPARENT);
|
ColorNode(DefinitionNode *parent, const string &name, const Color &value = COLOR_TRANSPARENT);
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
#ifndef COLORPROFILE_H
|
#ifndef COLORPROFILE_H
|
||||||
#define COLORPROFILE_H
|
#define COLORPROFILE_H
|
||||||
|
|
||||||
#include "basics_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "Color.h"
|
#include "Color.h"
|
||||||
|
|
||||||
namespace paysages {
|
namespace paysages {
|
||||||
namespace basics {
|
namespace basics {
|
||||||
|
|
||||||
class BASICSSHARED_EXPORT ColorProfile {
|
class CORESHARED_EXPORT ColorProfile {
|
||||||
public:
|
public:
|
||||||
typedef enum { TONE_MAPPING_UNCHARTED, TONE_MAPPING_REIHNARD, TONE_MAPPING_CLAMP } ToneMappingOperator;
|
typedef enum { TONE_MAPPING_UNCHARTED, TONE_MAPPING_REIHNARD, TONE_MAPPING_CLAMP } ToneMappingOperator;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "basics_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
namespace paysages {
|
namespace paysages {
|
||||||
namespace basics {
|
namespace basics {
|
||||||
|
@ -10,7 +10,7 @@ typedef struct {
|
||||||
double value;
|
double value;
|
||||||
} CurvePoint;
|
} CurvePoint;
|
||||||
|
|
||||||
class BASICSSHARED_EXPORT Curve {
|
class CORESHARED_EXPORT Curve {
|
||||||
public:
|
public:
|
||||||
Curve();
|
Curve();
|
||||||
~Curve();
|
~Curve();
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "system_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ namespace system {
|
||||||
/**
|
/**
|
||||||
* Locator of data files.
|
* Locator of data files.
|
||||||
*/
|
*/
|
||||||
class SYSTEMSHARED_EXPORT DataFile {
|
class CORESHARED_EXPORT DataFile {
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Find a data file.
|
* Find a data file.
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "definition_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ namespace definition {
|
||||||
*
|
*
|
||||||
* Diffs are used to undo/redo changes.
|
* Diffs are used to undo/redo changes.
|
||||||
*/
|
*/
|
||||||
class DEFINITIONSHARED_EXPORT DefinitionDiff {
|
class CORESHARED_EXPORT DefinitionDiff {
|
||||||
public:
|
public:
|
||||||
DefinitionDiff(const DefinitionNode *node);
|
DefinitionDiff(const DefinitionNode *node);
|
||||||
DefinitionDiff(const DefinitionDiff *other);
|
DefinitionDiff(const DefinitionDiff *other);
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "definition_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -11,7 +11,7 @@ namespace definition {
|
||||||
/**
|
/**
|
||||||
* Base class for all nodes of the definition tree.
|
* Base class for all nodes of the definition tree.
|
||||||
*/
|
*/
|
||||||
class DEFINITIONSHARED_EXPORT DefinitionNode {
|
class CORESHARED_EXPORT DefinitionNode {
|
||||||
public:
|
public:
|
||||||
DefinitionNode(DefinitionNode *parent, const string &name, const string &type_name = "");
|
DefinitionNode(DefinitionNode *parent, const string &name, const string &type_name = "");
|
||||||
virtual ~DefinitionNode();
|
virtual ~DefinitionNode();
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "definition_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -13,7 +13,7 @@ namespace definition {
|
||||||
*
|
*
|
||||||
* Watchers will be registered in DiffManager to receive DefinitionDiff objects.
|
* Watchers will be registered in DiffManager to receive DefinitionDiff objects.
|
||||||
*/
|
*/
|
||||||
class DEFINITIONSHARED_EXPORT DefinitionWatcher {
|
class CORESHARED_EXPORT DefinitionWatcher {
|
||||||
public:
|
public:
|
||||||
DefinitionWatcher(const string &name);
|
DefinitionWatcher(const string &name);
|
||||||
virtual ~DefinitionWatcher();
|
virtual ~DefinitionWatcher();
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "definition_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ namespace definition {
|
||||||
*
|
*
|
||||||
* Watchers can register themselves to received these diffs.
|
* Watchers can register themselves to received these diffs.
|
||||||
*/
|
*/
|
||||||
class DEFINITIONSHARED_EXPORT DiffManager {
|
class CORESHARED_EXPORT DiffManager {
|
||||||
public:
|
public:
|
||||||
DiffManager(DefinitionNode *tree);
|
DiffManager(DefinitionNode *tree);
|
||||||
~DiffManager();
|
~DiffManager();
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "basics_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "InfinitePlane.h"
|
#include "InfinitePlane.h"
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ namespace basics {
|
||||||
/**
|
/**
|
||||||
* Geometric plane disk.
|
* Geometric plane disk.
|
||||||
*/
|
*/
|
||||||
class BASICSSHARED_EXPORT Disk : public InfinitePlane {
|
class CORESHARED_EXPORT Disk : public InfinitePlane {
|
||||||
public:
|
public:
|
||||||
Disk() = default;
|
Disk() = default;
|
||||||
Disk(const Vector3 &point, const Vector3 &normal, double radius);
|
Disk(const Vector3 &point, const Vector3 &normal, double radius);
|
|
@ -1,13 +1,13 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "system_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace paysages {
|
namespace paysages {
|
||||||
namespace system {
|
namespace system {
|
||||||
|
|
||||||
class SYSTEMSHARED_EXPORT FileSystem {
|
class CORESHARED_EXPORT FileSystem {
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Get an absolute path to a temporary file.
|
* Get an absolute path to a temporary file.
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "definition_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "DefinitionDiff.h"
|
#include "DefinitionDiff.h"
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ namespace definition {
|
||||||
/**
|
/**
|
||||||
* Diff for a FloatNode.
|
* Diff for a FloatNode.
|
||||||
*/
|
*/
|
||||||
class DEFINITIONSHARED_EXPORT FloatDiff : public DefinitionDiff {
|
class CORESHARED_EXPORT FloatDiff : public DefinitionDiff {
|
||||||
public:
|
public:
|
||||||
FloatDiff(const DefinitionNode *node, double oldvalue, double newvalue);
|
FloatDiff(const DefinitionNode *node, double oldvalue, double newvalue);
|
||||||
FloatDiff(const FloatDiff *other, double oldvalue, double newvalue);
|
FloatDiff(const FloatDiff *other, double oldvalue, double newvalue);
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "definition_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "DefinitionNode.h"
|
#include "DefinitionNode.h"
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ namespace definition {
|
||||||
/**
|
/**
|
||||||
* Node with a single floating point numeric value, for the definition tree.
|
* 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:
|
public:
|
||||||
FloatNode(DefinitionNode *parent, const string &name, double value = 0.0);
|
FloatNode(DefinitionNode *parent, const string &name, double value = 0.0);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "software_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
namespace paysages {
|
namespace paysages {
|
||||||
namespace software {
|
namespace software {
|
||||||
|
@ -8,7 +8,7 @@ namespace software {
|
||||||
/**
|
/**
|
||||||
* Interface to a fluid medium compatible class.
|
* Interface to a fluid medium compatible class.
|
||||||
*/
|
*/
|
||||||
class SOFTWARESHARED_EXPORT FluidMediumInterface {
|
class CORESHARED_EXPORT FluidMediumInterface {
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Return true if the object may change the fluid medium on the given segment.
|
* Return true if the object may change the fluid medium on the given segment.
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "software_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "SpaceSegment.h"
|
#include "SpaceSegment.h"
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ typedef struct {
|
||||||
* medium density and properties.
|
* medium density and properties.
|
||||||
* It is mainly used to compute the alteration made by such media on light.
|
* It is mainly used to compute the alteration made by such media on light.
|
||||||
*/
|
*/
|
||||||
class SOFTWARESHARED_EXPORT FluidMediumManager {
|
class CORESHARED_EXPORT FluidMediumManager {
|
||||||
public:
|
public:
|
||||||
FluidMediumManager(SoftwareRenderer *renderer);
|
FluidMediumManager(SoftwareRenderer *renderer);
|
||||||
virtual ~FluidMediumManager();
|
virtual ~FluidMediumManager();
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "basics_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "NoiseState.h"
|
#include "NoiseState.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -11,7 +11,7 @@ namespace basics {
|
||||||
/**
|
/**
|
||||||
* Fractal noise generator, based on a sum of simple noise functions.
|
* Fractal noise generator, based on a sum of simple noise functions.
|
||||||
*/
|
*/
|
||||||
class BASICSSHARED_EXPORT FractalNoise {
|
class CORESHARED_EXPORT FractalNoise {
|
||||||
public:
|
public:
|
||||||
FractalNoise();
|
FractalNoise();
|
||||||
virtual ~FractalNoise();
|
virtual ~FractalNoise();
|
|
@ -1,11 +1,11 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "basics_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
namespace paysages {
|
namespace paysages {
|
||||||
namespace basics {
|
namespace basics {
|
||||||
|
|
||||||
class BASICSSHARED_EXPORT Geometry {
|
class CORESHARED_EXPORT Geometry {
|
||||||
public:
|
public:
|
||||||
static double get2DAngle(double x, double y);
|
static double get2DAngle(double x, double y);
|
||||||
static Vector3 getNormalFromTriangle(const Vector3 ¢er, const Vector3 &bottom, const Vector3 &right);
|
static Vector3 getNormalFromTriangle(const Vector3 ¢er, const Vector3 &bottom, const Vector3 &right);
|
|
@ -1,13 +1,13 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "definition_global.h"
|
#include "core_global.h"
|
||||||
|
|
||||||
#include "DefinitionNode.h"
|
#include "DefinitionNode.h"
|
||||||
|
|
||||||
namespace paysages {
|
namespace paysages {
|
||||||
namespace definition {
|
namespace definition {
|
||||||
|
|
||||||
class DEFINITIONSHARED_EXPORT GodRaysDefinition : public DefinitionNode {
|
class CORESHARED_EXPORT GodRaysDefinition : public DefinitionNode {
|
||||||
public:
|
public:
|
||||||
GodRaysDefinition(DefinitionNode *parent);
|
GodRaysDefinition(DefinitionNode *parent);
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue