Code format

This commit is contained in:
Michaël Lemaire 2016-07-23 22:58:32 +02:00
parent 91b32f29ce
commit 10bbf8078b
162 changed files with 562 additions and 560 deletions

View file

@ -1,7 +1,7 @@
#include "CappedCylinder.h"
#include "Vector3.h"
#include "PackStream.h"
#include "Vector3.h"
CappedCylinder::CappedCylinder(const Vector3 &base, const Vector3 &direction, double radius, double length)
: InfiniteCylinder(InfiniteRay(base, direction), radius), length(length),

View file

@ -1,8 +1,8 @@
#include "Color.h"
#include <cmath>
#include <cassert>
#include "PackStream.h"
#include <cassert>
#include <cmath>
const Color paysages::basics::COLOR_TRANSPARENT = {0.0, 0.0, 0.0, 0.0};
const Color paysages::basics::COLOR_BLACK = {0.0, 0.0, 0.0, 1.0};

View file

@ -1,7 +1,7 @@
#include "Curve.h"
#include <cstring>
#include "PackStream.h"
#include <cstring>
const int MAX_NB_POINTS = 30;

View file

@ -1,11 +1,11 @@
#include "FractalNoise.h"
#include "PackStream.h"
#include "RandomGenerator.h"
#include "Vector3.h"
#include <cassert>
#include <cmath>
#include <sstream>
#include "PackStream.h"
#include "Vector3.h"
#include "RandomGenerator.h"
FractalNoise::FractalNoise() {
scaling = 1.0;

View file

@ -2,8 +2,8 @@
#include "basics_global.h"
#include <string>
#include "NoiseState.h"
#include <string>
namespace paysages {
namespace basics {

View file

@ -1,8 +1,8 @@
#include "Geometry.h"
#include <cmath>
#include "Maths.h"
#include "Vector3.h"
#include <cmath>
double Geometry::get2DAngle(double x, double y) {
double nx, ny, d, ret;

View file

@ -1,7 +1,7 @@
#include "InfiniteCylinder.h"
#include <cmath>
#include "PackStream.h"
#include <cmath>
#define EPS 1E-8

View file

@ -1,8 +1,8 @@
#include "InfinitePlane.h"
#include <cmath>
#include "PackStream.h"
#include "InfiniteRay.h"
#include "PackStream.h"
#include <cmath>
InfinitePlane::InfinitePlane() {
}

View file

@ -1,7 +1,7 @@
#include "Maths.h"
#include <cmath>
#include <algorithm>
#include <cmath>
double Maths::modInRange(double value, double min, double max) {
double size = max - min;

View file

@ -1,8 +1,8 @@
#include "Matrix4.h"
#include <cmath>
#include "PackStream.h"
#include "Vector3.h"
#include <cmath>
Matrix4::Matrix4(bool identity) {
b = c = d = e = g = h = 0.0;

View file

@ -6,8 +6,8 @@
* Based on Ken Perlin implementation.
*/
#include <cstdlib>
#include <cmath>
#include <cstdlib>
NoiseFunctionPerlin::NoiseFunctionPerlin() {
}

View file

@ -6,13 +6,13 @@
* Based on Stefan Gustavson implementation.
*/
#include <cstdlib>
#include <cmath>
#include <cstring>
#include "Texture2D.h"
#include "Color.h"
#include "Geometry.h"
#include "Texture2D.h"
#include "Vector3.h"
#include <cmath>
#include <cstdlib>
#include <cstring>
typedef struct {
double x;

View file

@ -2,9 +2,9 @@
#include "NoiseFunctionPerlin.h"
#include "NoiseFunctionSimplex.h"
#include "NoiseState.h"
#include "PackStream.h"
#include "RandomGenerator.h"
#include "NoiseState.h"
#include <cmath>
#include <cstdlib>
#include <cstring>

View file

@ -1,9 +1,9 @@
#include "SpaceSegment.h"
#include <cmath>
#include <climits>
#include <algorithm>
#include "SpaceGridIterator.h"
#include <algorithm>
#include <climits>
#include <cmath>
using namespace std;
SpaceSegment::SpaceSegment(const Vector3 &start, const Vector3 &end) : start(start), end(end) {

View file

@ -1,8 +1,8 @@
#include "Sphere.h"
#include <cmath>
#include "PackStream.h"
#include "InfiniteRay.h"
#include "PackStream.h"
#include <cmath>
Sphere::Sphere(const Vector3 &center, double radius) : center(center), radius(radius) {
radius2 = radius * radius;

View file

@ -1,10 +1,10 @@
#include "Texture2D.h"
#include <cassert>
#include <cmath>
#include "Color.h"
#include "PackStream.h"
#include "PictureWriter.h"
#include <cassert>
#include <cmath>
Texture2D::Texture2D(int xsize, int ysize) {
assert(xsize > 0 && ysize > 0);

View file

@ -1,10 +1,10 @@
#include "Texture3D.h"
#include <cassert>
#include <cmath>
#include "Color.h"
#include "PackStream.h"
#include "PictureWriter.h"
#include <cassert>
#include <cmath>
Texture3D::Texture3D(int xsize, int ysize, int zsize) {
assert(xsize > 0 && ysize > 0 && zsize > 0);

View file

@ -1,10 +1,10 @@
#include "Texture4D.h"
#include <cassert>
#include <cmath>
#include "Color.h"
#include "PackStream.h"
#include "PictureWriter.h"
#include <cassert>
#include <cmath>
Texture4D::Texture4D(int xsize, int ysize, int zsize, int wsize) {
assert(xsize > 0 && ysize > 0 && zsize > 0 && wsize > 0);

View file

@ -1,9 +1,9 @@
#include "Vector3.h"
#include <cmath>
#include "Maths.h"
#include "PackStream.h"
#include "RandomGenerator.h"
#include <cmath>
const Vector3 paysages::basics::VECTOR_ZERO(0.0, 0.0, 0.0);
const Vector3 paysages::basics::VECTOR_DOWN(0.0, -1.0, 0.0);

View file

@ -1,14 +1,14 @@
#include "AtmosphereDefinition.h"
#include <cmath>
#include "CelestialBodyDefinition.h"
#include "FloatNode.h"
#include "GodRaysDefinition.h"
#include "Maths.h"
#include "Scenery.h"
#include "NoiseNode.h"
#include "PackStream.h"
#include "RandomGenerator.h"
#include "FloatNode.h"
#include "NoiseNode.h"
#include "GodRaysDefinition.h"
#include "CelestialBodyDefinition.h"
#include "Scenery.h"
#include <cmath>
AtmosphereDefinition::AtmosphereDefinition(DefinitionNode *parent)
: DefinitionNode(parent, "atmosphere", "atmosphere") {

View file

@ -4,8 +4,8 @@
#include "DefinitionNode.h"
#include "Vector3.h"
#include "Color.h"
#include "Vector3.h"
namespace paysages {
namespace definition {

View file

@ -1,10 +1,10 @@
#include "CameraDefinition.h"
#include <cmath>
#include "Scenery.h"
#include "BoundingBox.h"
#include "Maths.h"
#include "PackStream.h"
#include "BoundingBox.h"
#include "Scenery.h"
#include <cmath>
CameraDefinition::CameraDefinition(DefinitionNode *parent) : DefinitionNode(parent, "camera", "camera") {
location.x = 0.0;

View file

@ -4,8 +4,8 @@
#include "DefinitionNode.h"
#include "Vector3.h"
#include "Matrix4.h"
#include "Vector3.h"
namespace paysages {
namespace definition {

View file

@ -1,10 +1,10 @@
#include "CelestialBodyDefinition.h"
#include <cmath>
#include "Vector3.h"
#include "FloatNode.h"
#include "Scenery.h"
#include "NoiseNode.h"
#include "Scenery.h"
#include "Vector3.h"
#include <cmath>
CelestialBodyDefinition::CelestialBodyDefinition(DefinitionNode *parent, const string &name)
: DefinitionNode(parent, name) {

View file

@ -1,10 +1,10 @@
#include "CloudLayerDefinition.h"
#include "Curve.h"
#include "NoiseGenerator.h"
#include "SurfaceMaterial.h"
#include "PackStream.h"
#include "FloatNode.h"
#include "NoiseGenerator.h"
#include "PackStream.h"
#include "SurfaceMaterial.h"
CloudLayerDefinition::CloudLayerDefinition(DefinitionNode *parent, const string &name)
: DefinitionNode(parent, name, "cloudlayer") {

View file

@ -2,8 +2,8 @@
#include "definition_global.h"
#include "DefinitionDiff.h"
#include "Color.h"
#include "DefinitionDiff.h"
namespace paysages {
namespace definition {

View file

@ -1,9 +1,9 @@
#include "ColorNode.h"
#include <cassert>
#include <sstream>
#include "ColorDiff.h"
#include "Logs.h"
#include <cassert>
#include <sstream>
// TODO Could be made into a template

View file

@ -2,8 +2,8 @@
#include "definition_global.h"
#include "DefinitionNode.h"
#include "Color.h"
#include "DefinitionNode.h"
namespace paysages {
namespace definition {

View file

@ -1,13 +1,13 @@
#include "DefinitionNode.h"
#include "DefinitionDiff.h"
#include "DefinitionWatcher.h"
#include "DiffManager.h"
#include "Logs.h"
#include "PackStream.h"
#include "DefinitionWatcher.h"
#include "DefinitionDiff.h"
#include "DiffManager.h"
#include <cassert>
#include <algorithm>
#include <cassert>
// Diff for abstract nodes
class DefinitionNodeDiff : public DefinitionDiff {
@ -263,14 +263,13 @@ void DefinitionNode::addDiff(const DefinitionDiff *diff) {
}
}
void DefinitionNode::setRoot(DefinitionNode *root)
{
void DefinitionNode::setRoot(DefinitionNode *root) {
this->root = root;
if (diffs) {
delete diffs;
diffs = NULL;
}
for (auto &child: children) {
for (auto &child : children) {
child->setRoot(root);
}
}

View file

@ -1,9 +1,9 @@
#include "DefinitionWatcher.h"
#include "IntDiff.h"
#include "FloatDiff.h"
#include "DefinitionNode.h"
#include "DiffManager.h"
#include "FloatDiff.h"
#include "IntDiff.h"
#include "Logs.h"
DefinitionWatcher::DefinitionWatcher(const string &name) : name(name) {

View file

@ -2,8 +2,8 @@
#include "definition_global.h"
#include <string>
#include <set>
#include <string>
namespace paysages {
namespace definition {

View file

@ -1,13 +1,13 @@
#include "DiffManager.h"
#include <algorithm>
#include <map>
#include <vector>
#include <mutex>
#include "DefinitionNode.h"
#include "DefinitionDiff.h"
#include "DefinitionNode.h"
#include "DefinitionWatcher.h"
#include "Logs.h"
#include <algorithm>
#include <map>
#include <mutex>
#include <vector>
class DiffManager::pimpl {
public:

View file

@ -1,10 +1,10 @@
#include "FloatNode.h"
#include "PackStream.h"
#include "FloatDiff.h"
#include "Logs.h"
#include <sstream>
#include "PackStream.h"
#include <cassert>
#include <sstream>
FloatNode::FloatNode(DefinitionNode *parent, const string &name, double value)
: DefinitionNode(parent, name, "float"), value(value) {

View file

@ -1,10 +1,10 @@
#include "IntNode.h"
#include "PackStream.h"
#include "IntDiff.h"
#include "Logs.h"
#include <sstream>
#include "PackStream.h"
#include <cassert>
#include <sstream>
IntNode::IntNode(DefinitionNode *parent, const string &name, int value)
: DefinitionNode(parent, name, "int"), value(value) {

View file

@ -1,8 +1,8 @@
#include "Layers.h"
#include "PackStream.h"
#include "Logs.h"
#include "LayersDiff.h"
#include "Logs.h"
#include "PackStream.h"
Layers::Layers(DefinitionNode *parent, const string &name, LayerConstructor layer_constructor)
: DefinitionNode(parent, name, "layers" + name), layer_constructor(layer_constructor) {

View file

@ -1,8 +1,8 @@
#include "LayersDiff.h"
#include "PackStream.h"
#include "Layers.h"
#include "Logs.h"
#include "PackStream.h"
LayersDiff::LayersDiff(const Layers *layers, LayersDiffOp op, int layer1)
: DefinitionDiff(layers), op(op), layer1(layer1), saved(NULL) {

View file

@ -2,9 +2,9 @@
#include "ColorNode.h"
#include "FloatNode.h"
#include "FractalNoise.h"
#include "NoiseNode.h"
#include "SurfaceMaterial.h"
#include "FractalNoise.h"
MaterialNode::MaterialNode(DefinitionNode *parent, const string &name) : DefinitionNode(parent, name, "material") {
material = make_unique<SurfaceMaterial>();

View file

@ -17,7 +17,8 @@ class DEFINITIONSHARED_EXPORT MaterialNode : public DefinitionNode {
const SurfaceMaterial &getSurfaceMaterial() const;
void setSurfaceMaterial(const SurfaceMaterial &material);
void setSurfaceMaterial(const Color &color, double reflection, double shininess, double hardness=0.5, double ambient=0.5);
void setSurfaceMaterial(const Color &color, double reflection, double shininess, double hardness = 0.5,
double ambient = 0.5);
bool hasBump() const;
const FractalNoise *getBumpGenerator() const;

View file

@ -1,7 +1,7 @@
#include "NoiseNode.h"
#include "NoiseFunctionSimplex.h"
#include "Logs.h"
#include "NoiseFunctionSimplex.h"
NoiseNode::NoiseNode(DefinitionNode *parent, const string &name) : DefinitionNode(parent, name) {
noise = new NoiseFunctionSimplex();

View file

@ -1,11 +1,11 @@
#include "PaintedGrid.h"
#include "Interpolation.h"
#include "Memory.h"
#include "PaintedGridBrush.h"
#include "PaintedGridData.h"
#include <cassert>
#include <cmath>
#include "Memory.h"
#include "Interpolation.h"
#include "PaintedGridData.h"
#include "PaintedGridBrush.h"
PaintedGrid::PaintedGrid(DefinitionNode *parent) : DefinitionNode(parent, "grid", "grid") {
merged_data = new PaintedGridData;

View file

@ -1,8 +1,8 @@
#include "PaintedGridBrush.h"
#include <cmath>
#include "NoiseGenerator.h"
#include "PaintedGrid.h"
#include <cmath>
PaintedGridBrush::PaintedGridBrush(double hard_radius, double smoothed_size, double total_radius)
: hard_radius(hard_radius), smoothed_size(smoothed_size), total_radius(total_radius) {

View file

@ -1,7 +1,7 @@
#include "PaintedGridData.h"
#include <cstring>
#include "PackStream.h"
#include <cstring>
PaintedGridData::PaintedGridData() {
rows_count = 0;

View file

@ -2,19 +2,19 @@
#include <map>
#include "PackStream.h"
#include "AtmosphereDefinition.h"
#include "CameraDefinition.h"
#include "CloudsDefinition.h"
#include "DiffManager.h"
#include "FloatNode.h"
#include "IntNode.h"
#include "Logs.h"
#include "PackStream.h"
#include "RandomGenerator.h"
#include "TerrainDefinition.h"
#include "TexturesDefinition.h"
#include "VegetationDefinition.h"
#include "WaterDefinition.h"
#include "DiffManager.h"
#include "Logs.h"
#include "RandomGenerator.h"
#include "IntNode.h"
#include "FloatNode.h"
static const double APP_HEADER = 19866544632.125;
static const int DATA_VERSION = 1;

View file

@ -1,7 +1,7 @@
#include "SurfaceMaterial.h"
#include "PackStream.h"
#include "Color.h"
#include "PackStream.h"
static SurfaceMaterial DEFAULT;

View file

@ -1,12 +1,12 @@
#include "TerrainDefinition.h"
#include <cmath>
#include "TerrainHeightMap.h"
#include "NoiseGenerator.h"
#include "PackStream.h"
#include "FloatNode.h"
#include "NoiseNode.h"
#include "FractalNoise.h"
#include "NoiseGenerator.h"
#include "NoiseNode.h"
#include "PackStream.h"
#include "TerrainHeightMap.h"
#include <cmath>
TerrainDefinition::TerrainDefinition(DefinitionNode *parent) : DefinitionNode(parent, "terrain", "terrain") {
shadow_smoothing = 0.0;

View file

@ -1,7 +1,7 @@
#include "TerrainHeightMap.h"
#include "TerrainDefinition.h"
#include "PaintedGridBrush.h"
#include "TerrainDefinition.h"
TerrainHeightMap::TerrainHeightMap(TerrainDefinition *terrain) : PaintedGrid(terrain), terrain(terrain) {
}

View file

@ -1,15 +1,15 @@
#include "TextureLayerDefinition.h"
#include <cmath>
#include <algorithm>
#include "Zone.h"
#include "SurfaceMaterial.h"
#include "PackStream.h"
#include "Scenery.h"
#include "TerrainDefinition.h"
#include "Color.h"
#include "FractalNoise.h"
#include "NoiseNode.h"
#include "PackStream.h"
#include "Scenery.h"
#include "SurfaceMaterial.h"
#include "TerrainDefinition.h"
#include "Zone.h"
#include <algorithm>
#include <cmath>
TextureLayerDefinition::TextureLayerDefinition(DefinitionNode *parent, const string &name)
: DefinitionNode(parent, name, "texturelayer") {

View file

@ -1,10 +1,10 @@
#include "TimeManager.h"
#include "Scenery.h"
#include "AtmosphereDefinition.h"
#include "FloatNode.h"
#include "CloudsDefinition.h"
#include "CloudLayerDefinition.h"
#include "CloudsDefinition.h"
#include "FloatNode.h"
#include "Scenery.h"
#include "WaterDefinition.h"
TimeManager::TimeManager() {

View file

@ -1,12 +1,12 @@
#include "VegetationModelDefinition.h"
#include "Maths.h"
#include "VegetationDefinition.h"
#include "RandomGenerator.h"
#include "Matrix4.h"
#include "SurfaceMaterial.h"
#include "Color.h"
#include "Maths.h"
#include "Matrix4.h"
#include "PackStream.h"
#include "RandomGenerator.h"
#include "SurfaceMaterial.h"
#include "VegetationDefinition.h"
VegetationModelDefinition::VegetationModelDefinition(DefinitionNode *parent) : DefinitionNode(parent, "model") {
solid_material = new SurfaceMaterial(Color(0.2, 0.15, 0.15));

View file

@ -2,11 +2,11 @@
#include "definition_global.h"
#include <vector>
#include "DefinitionNode.h"
#include "Sphere.h"
#include "CappedCylinder.h"
#include "DefinitionNode.h"
#include "Disk.h"
#include "Sphere.h"
#include <vector>
namespace paysages {
namespace definition {

View file

@ -1,14 +1,14 @@
#include "VegetationPresenceDefinition.h"
#include <cmath>
#include "FloatNode.h"
#include "FractalNoise.h"
#include "NoiseNode.h"
#include "Scenery.h"
#include "TerrainDefinition.h"
#include "VegetationInstance.h"
#include "VegetationLayerDefinition.h"
#include "VegetationModelDefinition.h"
#include "VegetationInstance.h"
#include "FloatNode.h"
#include "NoiseNode.h"
#include "FractalNoise.h"
#include <cmath>
VegetationPresenceDefinition::VegetationPresenceDefinition(VegetationLayerDefinition *parent)
: DefinitionNode(parent, "presence") {

View file

@ -1,11 +1,11 @@
#include "WaterDefinition.h"
#include "PackStream.h"
#include "NoiseState.h"
#include "SurfaceMaterial.h"
#include "IntNode.h"
#include "FloatNode.h"
#include "ColorNode.h"
#include "FloatNode.h"
#include "IntNode.h"
#include "NoiseState.h"
#include "PackStream.h"
#include "SurfaceMaterial.h"
WaterDefinition::WaterDefinition(DefinitionNode *parent) : DefinitionNode(parent, "water", "water") {
model = new IntNode(this, "model", -1);

View file

@ -32,21 +32,21 @@
* Author: Eric Bruneton
*/
#include <vector>
#include <string>
#include <iostream>
#include <fstream>
#include <cmath>
#include <cstring>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include <GL/glew.h>
#include <GL/glut.h>
#include "tiffio.h"
#include "vec3.h"
#include "mat4.h"
#include "Main.h"
#include "mat4.h"
#include "vec3.h"
using namespace std;
@ -679,11 +679,11 @@ void idleFunc() {
glutPostRedisplay();
}
#include "Texture2D.h"
#include "Texture4D.h"
#include "Color.h"
#include "Logs.h"
#include "PackStream.h"
#include "Texture2D.h"
#include "Texture4D.h"
void dumpTextures() {
PackStream stream;
int x, y, z, w;

View file

@ -1,10 +1,10 @@
#include "SoftwareCanvasRenderer.h"
#include "RenderConfig.h"
#include "Scenery.h"
#include "AtmosphereDefinition.h"
#include "CameraDefinition.h"
#include "TimeManager.h"
#include "Logs.h"
#include "RenderConfig.h"
#include "Scenery.h"
#include "SoftwareCanvasRenderer.h"
#include "TimeManager.h"
#include <cstring>

View file

@ -1,5 +1,5 @@
#include "Thread.h"
#include "SoftwareCanvasRenderer.h"
#include "Thread.h"
class RenderThread : public Thread {
public:

View file

@ -1,46 +1,46 @@
#include "SoftwareCanvasRenderer.h"
#include "TerrainRenderer.h"
#include "Scenery.h"
#include "Maths.h"
#include "CameraDefinition.h"
#include "TerrainDefinition.h"
#include "AtmosphereDefinition.h"
#include "AtmosphereRenderer.h"
#include "AtmosphereResult.h"
#include "TexturesDefinition.h"
#include "GodRaysDefinition.h"
#include "TextureLayerDefinition.h"
#include "WaterDefinition.h"
#include "SurfaceMaterial.h"
#include "FloatNode.h"
#include "SkyRasterizer.h"
#include "CloudsDefinition.h"
#include "LightComponent.h"
#include "LightingManager.h"
#include "LightFilter.h"
#include "GodRaysSampler.h"
#include "Rasterizer.h"
#include "SpaceSegment.h"
#include "OverlayRasterizer.h"
#include "VegetationModelDefinition.h"
#include "VegetationInstance.h"
#include "VegetationRenderer.h"
#include "CloudsRenderer.h"
#include "CloudLayerDefinition.h"
#include "clouds/BaseCloudsModel.h"
#include "CameraDefinition.h"
#include "CelestialBodyDefinition.h"
#include "RayCastingResult.h"
#include "OpenGLVegetationImpostor.h"
#include "Texture2D.h"
#include "NoiseNode.h"
#include "CloudLayerDefinition.h"
#include "CloudsDefinition.h"
#include "CloudsRenderer.h"
#include "FloatNode.h"
#include "FractalNoise.h"
#include "RandomGenerator.h"
#include "GodRaysDefinition.h"
#include "GodRaysSampler.h"
#include "LightComponent.h"
#include "LightFilter.h"
#include "LightingManager.h"
#include "Maths.h"
#include "NoiseFunctionSimplex.h"
#include "NoiseNode.h"
#include "OpenGLVegetationImpostor.h"
#include "OverlayRasterizer.h"
#include "RandomGenerator.h"
#include "Rasterizer.h"
#include "RayCastingResult.h"
#include "Scenery.h"
#include "SkyRasterizer.h"
#include "SoftwareCanvasRenderer.h"
#include "SpaceSegment.h"
#include "SurfaceMaterial.h"
#include "TerrainDefinition.h"
#include "TerrainRenderer.h"
#include "Texture2D.h"
#include "TextureLayerDefinition.h"
#include "TexturesDefinition.h"
#include "VegetationInstance.h"
#include "VegetationModelDefinition.h"
#include "VegetationRenderer.h"
#include "WaterDefinition.h"
#include "Zone.h"
#include "clouds/BaseCloudsModel.h"
#include <cmath>
#include <sstream>
#include <iostream>
#include <sstream>
void startRender(SoftwareCanvasRenderer *renderer, const char *outputpath);
@ -566,7 +566,9 @@ static void testCanvasAliasing() {
virtual Color processPixel(int x, int y, double relx, double rely) const override {
double d = sqrt(relx * relx + rely * rely);
double s = relx * 0.5 + rely;
return (x == y or x / 2 == y or y / 2 == x or (d > 0.8 and d < 0.9) or fabs(s) < 0.1) ? COLOR_BLACK : COLOR_WHITE.scaled(5.0);
return (x == y or x / 2 == y or y / 2 == x or (d > 0.8 and d < 0.9) or fabs(s) < 0.1)
? COLOR_BLACK
: COLOR_WHITE.scaled(5.0);
}
};

View file

@ -1,10 +1,10 @@
#include "AtmosphereModeler.h"
#include "MainModelerWindow.h"
#include "Scenery.h"
#include "AtmosphereDefinition.h"
#include "DefinitionNode.h"
#include "MainModelerWindow.h"
#include "ModelerCameras.h"
#include "Scenery.h"
AtmosphereModeler::AtmosphereModeler(MainModelerWindow *ui) : BaseModelerTool(ui) {
addFloatBinding("atmosphere_humidity", "value", "/atmosphere/humidity");

View file

@ -1,12 +1,12 @@
#include "BaseModelerTool.h"
#include "MainModelerWindow.h"
#include "Scenery.h"
#include "IntNode.h"
#include "IntPropertyBind.h"
#include "FloatNode.h"
#include "FloatPropertyBind.h"
#include "IntNode.h"
#include "IntPropertyBind.h"
#include "Logs.h"
#include "MainModelerWindow.h"
#include "Scenery.h"
class BaseModelerTool::pimpl {
public:

View file

@ -1,8 +1,8 @@
#include "FloatPropertyBind.h"
#include "MainModelerWindow.h"
#include "FloatNode.h"
#include "Logs.h"
#include "MainModelerWindow.h"
#include <cmath>

View file

@ -2,8 +2,8 @@
#include "modeler_global.h"
#include <QObject>
#include "DefinitionWatcher.h"
#include <QObject>
namespace paysages {
namespace modeler {

View file

@ -1,8 +1,8 @@
#include "IntPropertyBind.h"
#include "MainModelerWindow.h"
#include "IntNode.h"
#include "Logs.h"
#include "MainModelerWindow.h"
IntPropertyBind::IntPropertyBind(MainModelerWindow *window, const string &object_name, const string &property_name,
IntNode *node)

View file

@ -2,8 +2,8 @@
#include "modeler_global.h"
#include <QObject>
#include "DefinitionWatcher.h"
#include <QObject>
namespace paysages {
namespace modeler {

View file

@ -1,18 +1,18 @@
#include "MainModelerWindow.h"
#include "Logs.h"
#include "OpenGLView.h"
#include "Scenery.h"
#include "OpenGLRenderer.h"
#include "AtmosphereModeler.h"
#include "WaterModeler.h"
#include "Logs.h"
#include "ModelerCameras.h"
#include "OpenGLRenderer.h"
#include "OpenGLView.h"
#include "RenderConfig.h"
#include "RenderPreviewProvider.h"
#include "RenderProcess.h"
#include "RenderConfig.h"
#include "Scenery.h"
#include "WaterModeler.h"
#include <QQmlEngine>
#include <QGuiApplication>
#include <QQmlEngine>
MainModelerWindow::MainModelerWindow() {
QSurfaceFormat new_format = format();

View file

@ -1,12 +1,12 @@
#include "ModelerCameras.h"
#include "AtmosphereDefinition.h"
#include "AtmosphereRenderer.h"
#include "CameraDefinition.h"
#include "FloatNode.h"
#include "MainModelerWindow.h"
#include "OpenGLRenderer.h"
#include "Scenery.h"
#include "CameraDefinition.h"
#include "AtmosphereDefinition.h"
#include "FloatNode.h"
#include "AtmosphereRenderer.h"
#include "Timing.h"
ModelerCameras::ModelerCameras(MainModelerWindow *parent)

View file

@ -2,8 +2,8 @@
#include "modeler_global.h"
#include <QObject>
#include "DefinitionWatcher.h"
#include <QObject>
namespace paysages {
namespace modeler {

View file

@ -1,10 +1,10 @@
#include "OpenGLView.h"
#include <QQuickWindow>
#include <QHoverEvent>
#include "MainModelerWindow.h"
#include "OpenGLRenderer.h"
#include "ModelerCameras.h"
#include "OpenGLRenderer.h"
#include <QHoverEvent>
#include <QQuickWindow>
OpenGLView::OpenGLView(QQuickItem *parent) : QQuickItem(parent) {
initialized = false;

View file

@ -2,8 +2,8 @@
#include "modeler_global.h"
#include <QQuickImageProvider>
#include "CanvasLiveClient.h"
#include <QQuickImageProvider>
namespace paysages {
namespace modeler {

View file

@ -1,17 +1,17 @@
#include "RenderProcess.h"
#include <QSize>
#include <QTime>
#include <QQuickItem>
#include "MainModelerWindow.h"
#include "SoftwareCanvasRenderer.h"
#include "RenderPreviewProvider.h"
#include "RenderConfig.h"
#include "RenderProgress.h"
#include "Thread.h"
#include "Canvas.h"
#include "CanvasPreview.h"
#include "MainModelerWindow.h"
#include "OpenGLRenderer.h"
#include "RenderConfig.h"
#include "RenderPreviewProvider.h"
#include "RenderProgress.h"
#include "SoftwareCanvasRenderer.h"
#include "Thread.h"
#include <QQuickItem>
#include <QSize>
#include <QTime>
class RenderThread : public Thread {
public:

View file

@ -1,13 +1,13 @@
#include "WaterModeler.h"
#include "FloatPropertyBind.h"
#include "IntPropertyBind.h"
#include "MainModelerWindow.h"
#include "OpenGLRenderer.h"
#include "OpenGLWater.h"
#include "Scenery.h"
#include "TerrainDefinition.h"
#include "WaterDefinition.h"
#include "FloatPropertyBind.h"
#include "IntPropertyBind.h"
#include "OpenGLRenderer.h"
#include "OpenGLWater.h"
WaterModeler::WaterModeler(MainModelerWindow *ui) : BaseModelerTool(ui) {
QObject *toggle_water = ui->findQmlObject("camera_toggle_water");

View file

@ -1,8 +1,8 @@
#pragma once
#include "definition_global.h"
#include "software_global.h"
#include "opengl_global.h"
#include "software_global.h"
namespace paysages {
namespace modeler {

View file

@ -1,23 +1,23 @@
#include "OpenGLRenderer.h"
#include <QMatrix4x4>
#include "Maths.h"
#include "OpenGLFunctions.h"
#include "CameraDefinition.h"
#include "CloudsRenderer.h"
#include "Color.h"
#include "GodRaysSampler.h"
#include "LightingManager.h"
#include "Logs.h"
#include "Maths.h"
#include "NoiseFunctionSimplex.h"
#include "OpenGLFunctions.h"
#include "OpenGLSharedState.h"
#include "OpenGLSkybox.h"
#include "OpenGLWater.h"
#include "OpenGLTerrain.h"
#include "OpenGLVegetation.h"
#include "CloudsRenderer.h"
#include "VegetationRenderer.h"
#include "Color.h"
#include "OpenGLWater.h"
#include "Scenery.h"
#include "LightingManager.h"
#include "GodRaysSampler.h"
#include "Logs.h"
#include "Vector3.h"
#include "NoiseFunctionSimplex.h"
#include "VegetationRenderer.h"
#include <QMatrix4x4>
OpenGLRenderer::OpenGLRenderer(Scenery *scenery) : SoftwareRenderer(scenery) {
ready = false;

View file

@ -1,7 +1,7 @@
#include "OpenGLShaderProgram.h"
#include <QOpenGLShaderProgram>
#include <QDir>
#include "Color.h"
#include "Logs.h"
#include "OpenGLFunctions.h"
#include "OpenGLRenderer.h"
#include "OpenGLSharedState.h"
@ -9,8 +9,8 @@
#include "Texture2D.h"
#include "Texture3D.h"
#include "Texture4D.h"
#include "Color.h"
#include "Logs.h"
#include <QDir>
#include <QOpenGLShaderProgram>
OpenGLShaderProgram::OpenGLShaderProgram(const string &name, OpenGLRenderer *renderer)
: renderer(renderer), name(name) {

View file

@ -2,8 +2,8 @@
#include "opengl_global.h"
#include <map>
#include "OpenGLVariable.h"
#include <map>
namespace paysages {
namespace opengl {

View file

@ -1,17 +1,17 @@
#include "OpenGLSkybox.h"
#include <cmath>
#include "AtmosphereDefinition.h"
#include "AtmosphereModelBruneton.h"
#include "AtmosphereRenderer.h"
#include "CelestialBodyDefinition.h"
#include "FloatNode.h"
#include "Logs.h"
#include "OpenGLRenderer.h"
#include "OpenGLShaderProgram.h"
#include "OpenGLSharedState.h"
#include "OpenGLVertexArray.h"
#include "CelestialBodyDefinition.h"
#include "Scenery.h"
#include "AtmosphereDefinition.h"
#include "AtmosphereRenderer.h"
#include "AtmosphereModelBruneton.h"
#include "FloatNode.h"
#include "Logs.h"
#include <cmath>
static const string path_humidity = "/atmosphere/humidity";
static const string path_sun_phi = "/atmosphere/sun/phi";

View file

@ -1,15 +1,15 @@
#include "OpenGLTerrain.h"
#include <algorithm>
#include <vector>
#include "Mutex.h"
#include "OpenGLFunctions.h"
#include "OpenGLRenderer.h"
#include "OpenGLShaderProgram.h"
#include "ParallelPool.h"
#include "Thread.h"
#include "Mutex.h"
#include "OpenGLTerrainChunk.h"
#include "ParallelPool.h"
#include "Scenery.h"
#include "Thread.h"
#include <algorithm>
#include <vector>
class ChunkMaintenanceThreads : public ParallelPool {
public:

View file

@ -1,20 +1,20 @@
#include "OpenGLTerrainChunk.h"
#include <cmath>
#include <cassert>
#include <QImage>
#include "OpenGLShaderProgram.h"
#include "OpenGLVertexArray.h"
#include "OpenGLSharedState.h"
#include "ColorProfile.h"
#include "CameraDefinition.h"
#include "ColorProfile.h"
#include "Logs.h"
#include "Mutex.h"
#include "OpenGLRenderer.h"
#include "TerrainRenderer.h"
#include "OpenGLShaderProgram.h"
#include "OpenGLSharedState.h"
#include "OpenGLVertexArray.h"
#include "Scenery.h"
#include "TerrainDefinition.h"
#include "TerrainRenderer.h"
#include "Texture2D.h"
#include "Mutex.h"
#include "Logs.h"
#include <QImage>
#include <cassert>
#include <cmath>
OpenGLTerrainChunk::OpenGLTerrainChunk(OpenGLRenderer *renderer, double x, double z, double size, int nbchunks)
: _renderer(renderer) {

View file

@ -1,19 +1,19 @@
#include "OpenGLVariable.h"
#include <cassert>
#include <QOpenGLShaderProgram>
#include <QImage>
#include "Color.h"
#include "FractalNoise.h"
#include "Logs.h"
#include "Matrix4.h"
#include "OpenGLFunctions.h"
#include "OpenGLRenderer.h"
#include "OpenGLShaderProgram.h"
#include "Vector3.h"
#include "Matrix4.h"
#include "Color.h"
#include "Texture2D.h"
#include "Texture3D.h"
#include "Texture4D.h"
#include "FractalNoise.h"
#include "Vector3.h"
#include <QImage>
#include <QOpenGLShaderProgram>
#include <cassert>
typedef enum {
TYPE_NONE,

View file

@ -1,11 +1,11 @@
#include "OpenGLVegetation.h"
#include "Mutex.h"
#include "OpenGLRenderer.h"
#include "OpenGLShaderProgram.h"
#include "OpenGLVegetationLayer.h"
#include "Thread.h"
#include "Mutex.h"
#include "Scenery.h"
#include "Thread.h"
#include "VegetationDefinition.h"
#include "VegetationLayerDefinition.h"

View file

@ -1,23 +1,23 @@
#include "OpenGLVegetationImpostor.h"
#include <cassert>
#include "AtmosphereDefinition.h"
#include "CameraDefinition.h"
#include "GodRaysSampler.h"
#include "LightingManager.h"
#include "Maths.h"
#include "Matrix4.h"
#include "OpenGLShaderProgram.h"
#include "OpenGLSharedState.h"
#include "OpenGLVertexArray.h"
#include "OpenGLVegetationInstance.h"
#include "Texture2D.h"
#include "SoftwareRenderer.h"
#include "Scenery.h"
#include "AtmosphereDefinition.h"
#include "GodRaysSampler.h"
#include "VegetationRenderer.h"
#include "VegetationInstance.h"
#include "OpenGLVertexArray.h"
#include "RayCastingResult.h"
#include "Scenery.h"
#include "SoftwareRenderer.h"
#include "SpaceSegment.h"
#include "Matrix4.h"
#include "LightingManager.h"
#include "CameraDefinition.h"
#include "Texture2D.h"
#include "VegetationInstance.h"
#include "VegetationRenderer.h"
#include <cassert>
// Get the rotation matrix for an impostor grid index
static inline Matrix4 matrixForIndex(int index) {

View file

@ -1,15 +1,15 @@
#include "OpenGLVegetationLayer.h"
#include <algorithm>
#include "Vector3.h"
#include "CameraDefinition.h"
#include "Mutex.h"
#include "OpenGLFunctions.h"
#include "OpenGLVegetation.h"
#include "OpenGLVegetationInstance.h"
#include "OpenGLVegetationImpostor.h"
#include "OpenGLVegetationInstance.h"
#include "Vector3.h"
#include "VegetationLayerDefinition.h"
#include "VegetationPresenceDefinition.h"
#include <algorithm>
OpenGLVegetationLayer::OpenGLVegetationLayer(OpenGLVegetation *parent, VegetationLayerDefinition *definition,
bool own_instances)

View file

@ -1,7 +1,7 @@
#include "OpenGLVertexArray.h"
#include "OpenGLFunctions.h"
#include "Logs.h"
#include "OpenGLFunctions.h"
#include "Vector3.h"
OpenGLVertexArray::OpenGLVertexArray(bool has_uv, bool strip) : has_uv(has_uv) {

View file

@ -1,17 +1,17 @@
#include "OpenGLWater.h"
#include "FloatDiff.h"
#include "FloatNode.h"
#include "IntNode.h"
#include "Logs.h"
#include "OpenGLRenderer.h"
#include "OpenGLShaderProgram.h"
#include "OpenGLSharedState.h"
#include "OpenGLVertexArray.h"
#include "WaterRenderer.h"
#include "Scenery.h"
#include "WaterDefinition.h"
#include "SurfaceMaterial.h"
#include "FloatNode.h"
#include "FloatDiff.h"
#include "IntNode.h"
#include "Logs.h"
#include "WaterDefinition.h"
#include "WaterRenderer.h"
static const string path_height = "/terrain/water_height";
static const string path_reflection = "/water/reflection";

View file

@ -5,27 +5,27 @@
* http://evasion.inrialpes.fr/~Eric.Bruneton/
*/
#include "AtmosphereDefinition.h"
#include "AtmosphereRenderer.h"
#include "AtmosphereResult.h"
#include "CacheFile.h"
#include "CelestialBodyDefinition.h"
#include "FloatNode.h"
#include "LightComponent.h"
#include "LightStatus.h"
#include "Maths.h"
#include "PackStream.h"
#include "ParallelWork.h"
#include "Scenery.h"
#include "SoftwareRenderer.h"
#include "System.h"
#include "Texture2D.h"
#include "Texture4D.h"
#include "WaterRenderer.h"
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include "Maths.h"
#include "System.h"
#include "ParallelWork.h"
#include "PackStream.h"
#include "Scenery.h"
#include "AtmosphereDefinition.h"
#include "AtmosphereRenderer.h"
#include "AtmosphereResult.h"
#include "SoftwareRenderer.h"
#include "WaterRenderer.h"
#include "CelestialBodyDefinition.h"
#include "LightComponent.h"
#include "LightStatus.h"
#include "Texture2D.h"
#include "Texture4D.h"
#include "CacheFile.h"
#include "FloatNode.h"
#define WORKAROUND_OFFSET 0.1

View file

@ -1,18 +1,18 @@
#include "AtmosphereRenderer.h"
#include <cmath>
#include "SoftwareRenderer.h"
#include "AtmosphereDefinition.h"
#include "AtmosphereModelBruneton.h"
#include "AtmosphereResult.h"
#include "CelestialBodyDefinition.h"
#include "FloatNode.h"
#include "GodRaysSampler.h"
#include "LightComponent.h"
#include "LightStatus.h"
#include "Scenery.h"
#include "NightSky.h"
#include "MoonRenderer.h"
#include "CelestialBodyDefinition.h"
#include "FloatNode.h"
#include "NightSky.h"
#include "Scenery.h"
#include "SoftwareRenderer.h"
#include <cmath>
static inline double _getDayFactor(double daytime) {
daytime = 1.0 - fabs(0.5 - daytime) / 0.5;

View file

@ -1,7 +1,7 @@
#include "BaseCloudLayerRenderer.h"
#include "clouds/BaseCloudsModel.h"
#include "Vector3.h"
#include "clouds/BaseCloudsModel.h"
BaseCloudLayerRenderer::BaseCloudLayerRenderer(SoftwareRenderer *parent) : parent(parent) {
setQuality(0.5);

View file

@ -2,9 +2,9 @@
#include <cassert>
#include "CanvasPictureWriter.h"
#include "CanvasPortion.h"
#include "CanvasPreview.h"
#include "CanvasPictureWriter.h"
#define CUTTER_SIZE 800

View file

@ -1,12 +1,12 @@
#include "CanvasPixelShader.h"
#include "Color.h"
#include "SoftwareCanvasRenderer.h"
#include "CanvasPortion.h"
#include "CanvasPixel.h"
#include "CanvasFragment.h"
#include "CanvasPixel.h"
#include "CanvasPortion.h"
#include "Color.h"
#include "Rasterizer.h"
#include "RenderProgress.h"
#include "SoftwareCanvasRenderer.h"
CanvasPixelShader::CanvasPixelShader(const SoftwareCanvasRenderer &renderer, CanvasPortion *portion,
RenderProgress *progress, int chunk_size, int sub_chunk_size, int chunks_x,

View file

@ -6,8 +6,8 @@
#include "CanvasPixel.h"
#include "CanvasPreview.h"
#include "PackStream.h"
#include "FileSystem.h"
#include "PackStream.h"
#include "System.h"
#define CHECK_COORDINATES() \

View file

@ -1,9 +1,9 @@
#include "CanvasPreview.h"
#include "Color.h"
#include "CanvasLiveClient.h"
#include "Mutex.h"
#include "Color.h"
#include "ColorProfile.h"
#include "Mutex.h"
#include <cassert>

View file

@ -1,20 +1,20 @@
#include "CloudBasicLayerRenderer.h"
#include <cassert>
#include <cmath>
#include <algorithm>
#include "CloudLayerDefinition.h"
#include "SoftwareRenderer.h"
#include "NoiseGenerator.h"
#include "Curve.h"
#include "AtmosphereRenderer.h"
#include "AtmosphereResult.h"
#include "CloudLayerDefinition.h"
#include "Curve.h"
#include "FloatNode.h"
#include "LightComponent.h"
#include "clouds/BaseCloudsModel.h"
#include "SurfaceMaterial.h"
#include "Logs.h"
#include "Maths.h"
#include "FloatNode.h"
#include "NoiseGenerator.h"
#include "SoftwareRenderer.h"
#include "SurfaceMaterial.h"
#include "clouds/BaseCloudsModel.h"
#include <algorithm>
#include <cassert>
#include <cmath>
struct CloudSegment {
Vector3 start;

View file

@ -1,13 +1,13 @@
#include "CloudsRenderer.h"
#include "SoftwareRenderer.h"
#include "Scenery.h"
#include "CloudsDefinition.h"
#include "CloudLayerDefinition.h"
#include "BaseCloudLayerRenderer.h"
#include "CloudBasicLayerRenderer.h"
#include "CameraDefinition.h"
#include "CloudBasicLayerRenderer.h"
#include "CloudLayerDefinition.h"
#include "CloudsDefinition.h"
#include "Logs.h"
#include "Scenery.h"
#include "SoftwareRenderer.h"
#include "clouds/BaseCloudsModel.h"
#include "clouds/CloudModelAltoCumulus.h"

View file

@ -1,8 +1,8 @@
#include "FluidMediumManager.h"
#include "SoftwareRenderer.h"
#include "FluidMediumInterface.h"
#include "Color.h"
#include "FluidMediumInterface.h"
#include "SoftwareRenderer.h"
FluidMediumManager::FluidMediumManager(SoftwareRenderer *renderer) : renderer(renderer) {
}

View file

@ -1,20 +1,20 @@
#include "GodRaysSampler.h"
#include <cmath>
#include <algorithm>
#include "GodRaysDefinition.h"
#include "AtmosphereDefinition.h"
#include "SoftwareRenderer.h"
#include "Vector3.h"
#include "SpaceSegment.h"
#include "GodRaysResult.h"
#include "LightingManager.h"
#include "FloatNode.h"
#include "LightStatus.h"
#include "Scenery.h"
#include "TerrainDefinition.h"
#include "CloudsRenderer.h"
#include "FloatNode.h"
#include "GodRaysDefinition.h"
#include "GodRaysResult.h"
#include "Interpolation.h"
#include "LightStatus.h"
#include "LightingManager.h"
#include "Scenery.h"
#include "SoftwareRenderer.h"
#include "SpaceSegment.h"
#include "TerrainDefinition.h"
#include "Vector3.h"
#include <algorithm>
#include <cmath>
GodRaysSampler::GodRaysSampler() {
enabled = true;

View file

@ -1,8 +1,8 @@
#include "LightStatus.h"
#include "LightingManager.h"
#include "LightComponent.h"
#include "Color.h"
#include "LightComponent.h"
#include "LightingManager.h"
#include "SurfaceMaterial.h"
LightStatus::LightStatus(LightingManager *manager, const Vector3 &location, const Vector3 &eye, bool filtered) {

View file

@ -1,14 +1,14 @@
#include "LightingManager.h"
#include <cmath>
#include <algorithm>
#include "LightFilter.h"
#include "LightComponent.h"
#include "LightStatus.h"
#include "LightSource.h"
#include "Color.h"
#include "SurfaceMaterial.h"
#include "LightComponent.h"
#include "LightFilter.h"
#include "LightSource.h"
#include "LightStatus.h"
#include "Logs.h"
#include "SurfaceMaterial.h"
#include <algorithm>
#include <cmath>
LightingManager::LightingManager() {
specularity = true;

View file

@ -1,14 +1,14 @@
#include "MoonRenderer.h"
#include <cmath>
#include "CelestialBodyDefinition.h"
#include "Color.h"
#include "LightingManager.h"
#include "Geometry.h"
#include "SurfaceMaterial.h"
#include "FloatNode.h"
#include "FractalNoise.h"
#include "Geometry.h"
#include "LightingManager.h"
#include "NoiseNode.h"
#include "SurfaceMaterial.h"
#include <cmath>
class MoonRenderer::pimpl {
public:

View file

@ -1,18 +1,18 @@
#include "NightSky.h"
#include <algorithm>
#include "Color.h"
#include "Vector3.h"
#include "Geometry.h"
#include "SoftwareRenderer.h"
#include "Scenery.h"
#include "AtmosphereDefinition.h"
#include "AtmosphereRenderer.h"
#include "SurfaceMaterial.h"
#include "CelestialBodyDefinition.h"
#include "Color.h"
#include "FloatNode.h"
#include "Geometry.h"
#include "LightComponent.h"
#include "LightStatus.h"
#include "CelestialBodyDefinition.h"
#include "FloatNode.h"
#include "Scenery.h"
#include "SoftwareRenderer.h"
#include "SurfaceMaterial.h"
#include "Vector3.h"
#include <algorithm>
NightSky::NightSky(SoftwareRenderer *renderer) : renderer(renderer) {
}

View file

@ -1,10 +1,10 @@
#include "OverlayRasterizer.h"
#include <cmath>
#include "Color.h"
#include "SoftwareCanvasRenderer.h"
#include "CameraDefinition.h"
#include "CanvasFragment.h"
#include "Color.h"
#include "SoftwareCanvasRenderer.h"
#include <cmath>
OverlayRasterizer::OverlayRasterizer(SoftwareCanvasRenderer *renderer)
: Rasterizer(renderer, renderer->getProgressHelper(), 0, COLOR_WHITE) {

View file

@ -1,12 +1,12 @@
#include "Rasterizer.h"
#include <cmath>
#include "SoftwareRenderer.h"
#include "CameraDefinition.h"
#include "CanvasPortion.h"
#include "CanvasFragment.h"
#include "Vector3.h"
#include "CanvasPortion.h"
#include "RenderProgress.h"
#include "SoftwareRenderer.h"
#include "Vector3.h"
#include <cmath>
struct paysages::software::ScanPoint {
int x;

View file

@ -1,8 +1,8 @@
#include "RenderProgress.h"
#include "Logs.h"
#include "Mutex.h"
#include "Timing.h"
#include "Logs.h"
RenderProgress::RenderProgress(int count) {
lock = new Mutex();

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