diff options
Diffstat (limited to 'modules/opensimplex/open_simplex_noise.cpp')
-rw-r--r-- | modules/opensimplex/open_simplex_noise.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/modules/opensimplex/open_simplex_noise.cpp b/modules/opensimplex/open_simplex_noise.cpp index 205c033614..97b66f2c07 100644 --- a/modules/opensimplex/open_simplex_noise.cpp +++ b/modules/opensimplex/open_simplex_noise.cpp @@ -33,7 +33,6 @@ #include "core/core_string_names.h" OpenSimplexNoise::OpenSimplexNoise() { - seed = 0; persistence = 0.5; octaves = 3; @@ -53,7 +52,6 @@ void OpenSimplexNoise::_init_seeds() { } void OpenSimplexNoise::set_seed(int p_seed) { - if (seed == p_seed) return; @@ -65,7 +63,6 @@ void OpenSimplexNoise::set_seed(int p_seed) { } int OpenSimplexNoise::get_seed() { - return seed; } @@ -101,7 +98,6 @@ void OpenSimplexNoise::set_lacunarity(float p_lacunarity) { } Ref<Image> OpenSimplexNoise::get_image(int p_width, int p_height) { - Vector<uint8_t> data; data.resize(p_width * p_height * 4); @@ -124,7 +120,6 @@ Ref<Image> OpenSimplexNoise::get_image(int p_width, int p_height) { } Ref<Image> OpenSimplexNoise::get_seamless_image(int p_size) { - Vector<uint8_t> data; data.resize(p_size * p_size * 4); @@ -132,7 +127,6 @@ Ref<Image> OpenSimplexNoise::get_seamless_image(int p_size) { for (int i = 0; i < p_size; i++) { for (int j = 0; j < p_size; j++) { - float ii = (float)i / (float)p_size; float jj = (float)j / (float)p_size; @@ -161,7 +155,6 @@ Ref<Image> OpenSimplexNoise::get_seamless_image(int p_size) { } void OpenSimplexNoise::_bind_methods() { - ClassDB::bind_method(D_METHOD("get_seed"), &OpenSimplexNoise::get_seed); ClassDB::bind_method(D_METHOD("set_seed", "seed"), &OpenSimplexNoise::set_seed); @@ -196,12 +189,10 @@ void OpenSimplexNoise::_bind_methods() { } float OpenSimplexNoise::get_noise_1d(float x) { - return get_noise_2d(x, 1.0); } float OpenSimplexNoise::get_noise_2d(float x, float y) { - x /= period; y /= period; @@ -222,7 +213,6 @@ float OpenSimplexNoise::get_noise_2d(float x, float y) { } float OpenSimplexNoise::get_noise_3d(float x, float y, float z) { - x /= period; y /= period; z /= period; @@ -245,7 +235,6 @@ float OpenSimplexNoise::get_noise_3d(float x, float y, float z) { } float OpenSimplexNoise::get_noise_4d(float x, float y, float z, float w) { - x /= period; y /= period; z /= period; |