paysages3d/src/definition/TextureLayerDefinition.h

53 lines
1.5 KiB
C
Raw Normal View History

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