2013-11-16 18:12:42 +00:00
|
|
|
#ifndef TEXTURELAYERDEFINITION_H
|
|
|
|
#define TEXTURELAYERDEFINITION_H
|
|
|
|
|
|
|
|
#include "definition_global.h"
|
|
|
|
|
2015-08-12 20:21:10 +00:00
|
|
|
#include "DefinitionNode.h"
|
2013-11-16 18:12:42 +00:00
|
|
|
|
|
|
|
namespace paysages {
|
|
|
|
namespace definition {
|
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
class DEFINITIONSHARED_EXPORT TextureLayerDefinition : public DefinitionNode {
|
|
|
|
public:
|
|
|
|
typedef enum { TEXTURES_MERGE_FADE, TEXTURES_MERGE_DISSOLVE, TEXTURES_MERGE_DISPLACEMENT_VALUE } TextureMergeMode;
|
|
|
|
typedef enum {
|
2013-11-16 18:12:42 +00:00
|
|
|
TEXTURES_LAYER_PRESET_MUD,
|
|
|
|
TEXTURES_LAYER_PRESET_ROCK,
|
|
|
|
TEXTURES_LAYER_PRESET_GRASS,
|
|
|
|
TEXTURES_LAYER_PRESET_SAND,
|
|
|
|
TEXTURES_LAYER_PRESET_SNOW
|
|
|
|
} TextureLayerPreset;
|
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
public:
|
2015-12-10 23:36:50 +00:00
|
|
|
TextureLayerDefinition(DefinitionNode *parent, const string &name);
|
2013-11-16 18:12:42 +00:00
|
|
|
virtual ~TextureLayerDefinition();
|
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
virtual void save(PackStream *stream) const override;
|
|
|
|
virtual void load(PackStream *stream) override;
|
2013-11-16 18:12:42 +00:00
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
virtual void copy(DefinitionNode *destination) const override;
|
2013-11-16 18:12:42 +00:00
|
|
|
virtual void validate() override;
|
|
|
|
|
2015-12-10 18:40:39 +00:00
|
|
|
void applyPreset(TextureLayerPreset preset, RandomGenerator &random = RandomGeneratorDefault);
|
2013-11-16 18:12:42 +00:00
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
public:
|
|
|
|
Zone *terrain_zone;
|
2013-11-16 18:12:42 +00:00
|
|
|
double displacement_scaling;
|
|
|
|
double displacement_height;
|
|
|
|
double displacement_offset;
|
|
|
|
/*double detail_scaling;
|
|
|
|
double detail_height;*/
|
2015-11-09 21:30:46 +00:00
|
|
|
SurfaceMaterial *material;
|
2013-11-16 18:12:42 +00:00
|
|
|
/*double cancel_displacement_factor;
|
|
|
|
TexturesMergeMode merge_mode;*/
|
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
NoiseGenerator *_displacement_noise;
|
|
|
|
NoiseGenerator *_detail_noise;
|
2013-11-16 18:12:42 +00:00
|
|
|
/*Curve* _local_slope_condition;*/
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // TEXTURELAYERDEFINITION_H
|