diff options
Diffstat (limited to 'modules/opensimplex/noise_texture.h')
-rw-r--r-- | modules/opensimplex/noise_texture.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/modules/opensimplex/noise_texture.h b/modules/opensimplex/noise_texture.h index 108e471fc1..5e4a02fcee 100644 --- a/modules/opensimplex/noise_texture.h +++ b/modules/opensimplex/noise_texture.h @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */ +/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -31,7 +31,7 @@ #ifndef NOISE_TEXTURE_H #define NOISE_TEXTURE_H -#include "simplex_noise.h" +#include "open_simplex_noise.h" #include "core/image.h" #include "core/reference.h" @@ -40,7 +40,7 @@ #include "editor/property_editor.h" class NoiseTexture : public Texture { - GDCLASS(NoiseTexture, Texture) + GDCLASS(NoiseTexture, Texture); private: Ref<Image> data; @@ -54,10 +54,11 @@ private: RID texture; uint32_t flags; - Ref<SimplexNoise> noise; + Ref<OpenSimplexNoise> noise; Vector2i size; bool seamless; bool as_normalmap; + float bump_strength; void _thread_done(const Ref<Image> &p_image); static void _thread_function(void *p_ud); @@ -69,22 +70,23 @@ private: protected: static void _bind_methods(); + virtual void _validate_property(PropertyInfo &property) const; public: - void set_noise(Ref<SimplexNoise> p_noise); - Ref<SimplexNoise> get_noise(); + void set_noise(Ref<OpenSimplexNoise> p_noise); + Ref<OpenSimplexNoise> get_noise(); void set_width(int p_width); - void set_height(int p_hieght); + void set_height(int p_height); void set_seamless(bool p_seamless); bool get_seamless(); - void set_as_normalmap(bool p_seamless); + void set_as_normalmap(bool p_as_normalmap); bool is_normalmap(); - void set_size(Vector2 p_size); - Vector2 get_size(); + void set_bump_strength(float p_bump_strength); + float get_bump_strength(); int get_width() const; int get_height() const; |