paysages3d/src/definition/WaterDefinition.h

62 lines
1.3 KiB
C
Raw Normal View History

2013-11-13 19:07:35 +00:00
#ifndef WATERDEFINITION_H
#define WATERDEFINITION_H
#include "definition_global.h"
#include "DefinitionNode.h"
#include "DefinitionWatcher.h"
2013-11-13 19:07:35 +00:00
namespace paysages {
namespace definition {
class DEFINITIONSHARED_EXPORT WaterDefinition: public DefinitionNode, public DefinitionWatcher
2013-11-13 19:07:35 +00:00
{
public:
WaterDefinition(DefinitionNode* parent);
2013-11-13 19:07:35 +00:00
virtual ~WaterDefinition();
virtual void save(PackStream* stream) const override;
virtual void load(PackStream* stream) override;
virtual void copy(DefinitionNode* destination) const override;
2013-11-13 19:07:35 +00:00
virtual void validate() override;
inline IntNode *propModel() const {return model;}
2015-09-07 23:00:34 +00:00
inline FloatNode *propReflection() const {return reflection;}
virtual void nodeChanged(const DefinitionNode *node, const DefinitionDiff *diff);
typedef enum
{
WATER_PRESET_LAKE,
WATER_PRESET_SEA
} WaterPreset;
void applyPreset(WaterPreset preset);
2013-11-13 19:07:35 +00:00
public:
double transparency;
SurfaceMaterial* material;
Color* depth_color;
double transparency_depth;
double lighting_depth;
double scaling;
double turbulence;
double waves_height;
double detail_height;
double foam_coverage;
SurfaceMaterial* foam_material;
NoiseState* noise_state;
2015-09-07 23:00:34 +00:00
private:
IntNode *model;
2015-09-07 23:00:34 +00:00
FloatNode *reflection;
2013-11-13 19:07:35 +00:00
};
}
}
#endif // WATERDEFINITION_H