Coding style
This commit is contained in:
parent
7ded0a6b6f
commit
e869f5b9ca
12 changed files with 25 additions and 15 deletions
|
@ -36,7 +36,8 @@ class DEFINITIONSHARED_EXPORT WaterDefinition : public DefinitionNode, public De
|
|||
return depth_color;
|
||||
}
|
||||
|
||||
virtual void nodeChanged(const DefinitionNode *node, const DefinitionDiff *diff, const DefinitionNode *parent) override;
|
||||
virtual void nodeChanged(const DefinitionNode *node, const DefinitionDiff *diff,
|
||||
const DefinitionNode *parent) override;
|
||||
|
||||
typedef enum { WATER_PRESET_LAKE, WATER_PRESET_SEA } WaterPreset;
|
||||
void applyPreset(WaterPreset preset, RandomGenerator &random = RandomGeneratorDefault);
|
||||
|
|
|
@ -12,7 +12,8 @@ class AtmosphereModeler : protected BaseModelerTool {
|
|||
public:
|
||||
AtmosphereModeler(MainModelerWindow *ui);
|
||||
|
||||
virtual void nodeChanged(const DefinitionNode *node, const DefinitionDiff *diff, const DefinitionNode *parent) override;
|
||||
virtual void nodeChanged(const DefinitionNode *node, const DefinitionDiff *diff,
|
||||
const DefinitionNode *parent) override;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,7 +20,8 @@ class FloatPropertyBind : public QObject, public DefinitionWatcher {
|
|||
FloatPropertyBind(MainModelerWindow *window, const string &object_name, const string &property_name,
|
||||
FloatNode *node);
|
||||
|
||||
virtual void nodeChanged(const DefinitionNode *node, const DefinitionDiff *diff, const DefinitionNode *parent) override;
|
||||
virtual void nodeChanged(const DefinitionNode *node, const DefinitionDiff *diff,
|
||||
const DefinitionNode *parent) override;
|
||||
|
||||
private slots:
|
||||
void propertyChanged();
|
||||
|
|
|
@ -19,7 +19,8 @@ class IntPropertyBind : public QObject, public DefinitionWatcher {
|
|||
public:
|
||||
IntPropertyBind(MainModelerWindow *window, const string &object_name, const string &property_name, IntNode *node);
|
||||
|
||||
virtual void nodeChanged(const DefinitionNode *node, const DefinitionDiff *diff, const DefinitionNode *parent) override;
|
||||
virtual void nodeChanged(const DefinitionNode *node, const DefinitionDiff *diff,
|
||||
const DefinitionNode *parent) override;
|
||||
|
||||
private slots:
|
||||
void propertyChanged();
|
||||
|
|
|
@ -50,7 +50,8 @@ class ModelerCameras : public QObject, public DefinitionWatcher {
|
|||
protected:
|
||||
virtual void timerEvent(QTimerEvent *event) override;
|
||||
|
||||
virtual void nodeChanged(const DefinitionNode *node, const DefinitionDiff *diff, const DefinitionNode *parent) override;
|
||||
virtual void nodeChanged(const DefinitionNode *node, const DefinitionDiff *diff,
|
||||
const DefinitionNode *parent) override;
|
||||
|
||||
/**
|
||||
* Validate current camera, pushing it to rendered scenery if needed.
|
||||
|
|
|
@ -18,7 +18,8 @@ class OPENGLSHARED_EXPORT OpenGLSkybox : public OpenGLPart, public DefinitionWat
|
|||
virtual void update() override;
|
||||
virtual void render() override;
|
||||
|
||||
virtual void nodeChanged(const DefinitionNode *node, const DefinitionDiff *diff, const DefinitionNode *parent) override;
|
||||
virtual void nodeChanged(const DefinitionNode *node, const DefinitionDiff *diff,
|
||||
const DefinitionNode *parent) override;
|
||||
virtual void floatNodeChanged(const string &path, double new_value, double old_value) override;
|
||||
|
||||
private:
|
||||
|
|
|
@ -32,7 +32,8 @@ class OPENGLSHARED_EXPORT OpenGLVegetation : public OpenGLPart, public Definitio
|
|||
virtual void update() override;
|
||||
virtual void render() override;
|
||||
|
||||
virtual void nodeChanged(const DefinitionNode *node, const DefinitionDiff *diff, const DefinitionNode *parent) override;
|
||||
virtual void nodeChanged(const DefinitionNode *node, const DefinitionDiff *diff,
|
||||
const DefinitionNode *parent) override;
|
||||
|
||||
/**
|
||||
* Get the currently rendered scenery.
|
||||
|
|
|
@ -18,7 +18,8 @@ class OPENGLSHARED_EXPORT OpenGLWater : public OpenGLPart, public DefinitionWatc
|
|||
virtual void update() override;
|
||||
virtual void render() override;
|
||||
|
||||
virtual void nodeChanged(const DefinitionNode *node, const DefinitionDiff *diff, const DefinitionNode *parent) override;
|
||||
virtual void nodeChanged(const DefinitionNode *node, const DefinitionDiff *diff,
|
||||
const DefinitionNode *parent) override;
|
||||
|
||||
/**
|
||||
* Enable or disable the water surface rendering.
|
||||
|
|
|
@ -1157,7 +1157,8 @@ bool AtmosphereModelBruneton::getLightsAt(vector<LightComponent> &result, const
|
|||
|
||||
result.push_back(sun);
|
||||
|
||||
irradiance.color = _irradiance(_irradianceTexture, r0, muS).scaled(1.0 - min(location.y / Scenery::ATMOSPHERE_WIDTH_SCALED, 1.0));
|
||||
irradiance.color =
|
||||
_irradiance(_irradianceTexture, r0, muS).scaled(1.0 - min(location.y / Scenery::ATMOSPHERE_WIDTH_SCALED, 1.0));
|
||||
irradiance.direction = VECTOR_DOWN;
|
||||
irradiance.reflection = 0.0;
|
||||
irradiance.altered = 0;
|
||||
|
|
|
@ -75,7 +75,8 @@ Color MoonRenderer::getColor(const Vector3 &eye, const Vector3 &direction, Light
|
|||
|
||||
auto normal = p1.getNormal3(p2, p3);
|
||||
|
||||
double gradient = 2.3 + 8.0 * impl->noise.get3d(0.01, 0.3 * p1.x + 12.0, 0.3 * p1.y - 4.8, -0.3 * p1.z + 7.4);
|
||||
double gradient =
|
||||
2.3 + 8.0 * impl->noise.get3d(0.01, 0.3 * p1.x + 12.0, 0.3 * p1.y - 4.8, -0.3 * p1.z + 7.4);
|
||||
SurfaceMaterial material(Color(gradient, gradient, gradient));
|
||||
|
||||
auto moon_color = lighting->apply(eye, nearest, normal, material);
|
||||
|
|
|
@ -14,7 +14,8 @@ class RecordingDefinitionWatcher : public DefinitionWatcher {
|
|||
RecordingDefinitionWatcher() {
|
||||
}
|
||||
|
||||
virtual void nodeChanged(const DefinitionNode *node, const DefinitionDiff *diff, const DefinitionNode *parent) override {
|
||||
virtual void nodeChanged(const DefinitionNode *node, const DefinitionDiff *diff,
|
||||
const DefinitionNode *parent) override {
|
||||
RecordedChange change;
|
||||
change.node = node;
|
||||
change.diff = diff; // FIXME Referenced diff may get deleted by the diff manager
|
||||
|
@ -31,5 +32,4 @@ class RecordingDefinitionWatcher : public DefinitionWatcher {
|
|||
};
|
||||
}
|
||||
|
||||
|
||||
#endif // TESTTOOLDEFINITION_H
|
||||
|
|
Loading…
Reference in a new issue