summaryrefslogtreecommitdiff
path: root/modules/opensimplex
diff options
context:
space:
mode:
Diffstat (limited to 'modules/opensimplex')
-rw-r--r--modules/opensimplex/SCsub20
-rw-r--r--modules/opensimplex/doc_classes/NoiseTexture.xml8
-rw-r--r--modules/opensimplex/doc_classes/OpenSimplexNoise.xml (renamed from modules/opensimplex/doc_classes/SimplexNoise.xml)43
-rw-r--r--modules/opensimplex/noise_texture.cpp8
-rw-r--r--modules/opensimplex/noise_texture.h8
-rw-r--r--modules/opensimplex/open_simplex_noise.cpp (renamed from modules/opensimplex/simplex_noise.cpp)88
-rw-r--r--modules/opensimplex/open_simplex_noise.h (renamed from modules/opensimplex/simplex_noise.h)24
-rw-r--r--modules/opensimplex/register_types.cpp4
8 files changed, 108 insertions, 95 deletions
diff --git a/modules/opensimplex/SCsub b/modules/opensimplex/SCsub
index be9c8b091f..4235f6a0b9 100644
--- a/modules/opensimplex/SCsub
+++ b/modules/opensimplex/SCsub
@@ -1,4 +1,22 @@
#!/usr/bin/env python
Import('env')
-env.add_source_files(env.modules_sources, ["register_types.cpp", "simplex_noise.cpp", "noise_texture.cpp", "#thirdparty/misc/open-simplex-noise.c"])
+Import('env_modules')
+
+env_opensimplex = env_modules.Clone()
+
+# Thirdparty source files
+thirdparty_dir = "#thirdparty/misc/"
+thirdparty_sources = [
+ "open-simplex-noise.c",
+]
+thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
+
+env_opensimplex.Append(CPPPATH=[thirdparty_dir])
+
+env_thirdparty = env_opensimplex.Clone()
+env_thirdparty.disable_warnings()
+env_thirdparty.add_source_files(env.modules_sources, thirdparty_sources)
+
+# Godot's own source files
+env_opensimplex.add_source_files(env.modules_sources, "*.cpp")
diff --git a/modules/opensimplex/doc_classes/NoiseTexture.xml b/modules/opensimplex/doc_classes/NoiseTexture.xml
index c7dc373f59..6af58e7a6b 100644
--- a/modules/opensimplex/doc_classes/NoiseTexture.xml
+++ b/modules/opensimplex/doc_classes/NoiseTexture.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="NoiseTexture" inherits="Texture" category="Core" version="3.1">
<brief_description>
- [SimplexNoise] filled texture.
+ [OpenSimplexNoise] filled texture.
</brief_description>
<description>
- Uses a [SimplexNoise] to fill the texture data. You can specify the texture size but keep in mind that larger textures will take longer to generate and seamless noise only works with square sized textures.
+ Uses an [OpenSimplexNoise] to fill the texture data. You can specify the texture size but keep in mind that larger textures will take longer to generate and seamless noise only works with square sized textures.
NoiseTexture can also generate normalmap textures.
</description>
<tutorials>
@@ -35,8 +35,8 @@
<member name="as_normalmap" type="bool" setter="set_as_normalmap" getter="is_normalmap">
If true, the resulting texture contains a normal map created from the original noise interpreted as a bump map.
</member>
- <member name="noise" type="SimplexNoise" setter="set_noise" getter="get_noise">
- The [SimplexNoise] instance used to generate the noise.
+ <member name="noise" type="OpenSimplexNoise" setter="set_noise" getter="get_noise">
+ The [OpenSimplexNoise] instance used to generate the noise.
</member>
<member name="seamless" type="bool" setter="set_seamless" getter="get_seamless">
Whether the texture can be tiled without visible seams or not. Seamless textures take longer to generate.
diff --git a/modules/opensimplex/doc_classes/SimplexNoise.xml b/modules/opensimplex/doc_classes/OpenSimplexNoise.xml
index a5a01d88a7..31f13f341c 100644
--- a/modules/opensimplex/doc_classes/SimplexNoise.xml
+++ b/modules/opensimplex/doc_classes/OpenSimplexNoise.xml
@@ -1,26 +1,24 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="SimplexNoise" inherits="Resource" category="Core" version="3.1">
+<class name="OpenSimplexNoise" inherits="Resource" category="Core" version="3.1">
<brief_description>
Noise generator based on Open Simplex.
</brief_description>
<description>
- This resource allows you to configure and sample a fractal noise space.
-
- Here is a brief usage example that configures a SimplexNoise and gets samples at various positions and dimensions:
+ This resource allows you to configure and sample a fractal noise space. Here is a brief usage example that configures an OpenSimplexNoise and gets samples at various positions and dimensions:
[codeblock]
- var noise = SimplexNoise.new()
+ var noise = OpenSimplexNoise.new()
# Configure
noise.seed = randi()
noise.octaves = 4
noise.period = 20.0
- noise.persistance = 0.8
-
- #Sample
+ noise.persistence = 0.8
+
+ # Sample
print("Values:")
- print(noise.get_noise_2d(1.0,1.0))
- print(noise.get_noise_3d(0.5,3.0,15.0))
- print(noise.get_noise_3d(0.5,1.9,4.7,0.0))
+ print(noise.get_noise_2d(1.0, 1.0))
+ print(noise.get_noise_3d(0.5, 3.0, 15.0))
+ print(noise.get_noise_4d(0.5, 1.9, 4.7, 0.0))
[/codeblock]
</description>
<tutorials>
@@ -47,7 +45,7 @@
<argument index="1" name="y" type="float">
</argument>
<description>
- 2D noise value [-1,1] at position [code]x[/code],[code]y[/code].
+ Returns the 2D noise value [code][-1,1][/code] at the given position.
</description>
</method>
<method name="get_noise_2dv">
@@ -56,7 +54,7 @@
<argument index="0" name="pos" type="Vector2">
</argument>
<description>
- 2D noise value [-1,1] at position [code]pos.x[/code],[code]pos.y[/code].
+ Returns the 2D noise value [code][-1,1][/code] at the given position.
</description>
</method>
<method name="get_noise_3d">
@@ -69,7 +67,7 @@
<argument index="2" name="z" type="float">
</argument>
<description>
- 3D noise value [-1,1] at position [code]x[/code],[code]y[/code],[code]z[/code].
+ Returns the 3D noise value [code][-1,1][/code] at the given position.
</description>
</method>
<method name="get_noise_3dv">
@@ -78,7 +76,7 @@
<argument index="0" name="pos" type="Vector3">
</argument>
<description>
- 3D noise value [-1,1] at position [code]pos.x[/code],[code]pos.y[/code],[code]pos.z[/code].
+ Returns the 3D noise value [code][-1,1][/code] at the given position.
</description>
</method>
<method name="get_noise_4d">
@@ -93,7 +91,7 @@
<argument index="3" name="w" type="float">
</argument>
<description>
- 4D noise value [-1,1] at position [code]x[/code],[code]y[/code],[code]z[/code],[code]w[/code].
+ Returns the 4D noise value [code][-1,1][/code] at the given position.
</description>
</method>
<method name="get_seamless_image">
@@ -102,8 +100,7 @@
<argument index="0" name="size" type="int">
</argument>
<description>
- Generate a tileable noise image, based on the current noise parameters.
- Generated seamless images are always square ([code]size[/code]x[code]size[/code]).
+ Generate a tileable noise image, based on the current noise parameters. Generated seamless images are always square ([code]size[/code] x [code]size[/code]).
</description>
</method>
</methods>
@@ -112,15 +109,13 @@
Difference in period between [member octaves].
</member>
<member name="octaves" type="int" setter="set_octaves" getter="get_octaves">
- Number of Simplex Noise layers that are sampled to get the fractal noise.
+ Number of OpenSimplex noise layers that are sampled to get the fractal noise.
</member>
<member name="period" type="float" setter="set_period" getter="get_period">
- Period of the base octave.
- A lower period results in a higher frequancy noise (more value changes across the same distance).
+ Period of the base octave. A lower period results in a higher-frequency noise (more value changes across the same distance).
</member>
- <member name="persistance" type="float" setter="set_persistance" getter="get_persistance">
- Contribuiton factor of the different octaves.
- A [code]persistance[/code] value of 1 means all the octaves have the same contribution, a value of 0.5 means each octave contributes half as much as the previous one.
+ <member name="persistence" type="float" setter="set_persistence" getter="get_persistence">
+ Contribution factor of the different octaves. A [code]persistence[/code] value of 1 means all the octaves have the same contribution, a value of 0.5 means each octave contributes half as much as the previous one.
</member>
<member name="seed" type="int" setter="set_seed" getter="get_seed">
Seed used to generate random values, different seeds will generate different noise maps.
diff --git a/modules/opensimplex/noise_texture.cpp b/modules/opensimplex/noise_texture.cpp
index b82b0b453f..6f2723e43b 100644
--- a/modules/opensimplex/noise_texture.cpp
+++ b/modules/opensimplex/noise_texture.cpp
@@ -43,7 +43,7 @@ NoiseTexture::NoiseTexture() {
as_normalmap = false;
flags = FLAGS_DEFAULT;
- noise = Ref<SimplexNoise>();
+ noise = Ref<OpenSimplexNoise>();
texture = VS::get_singleton()->texture_create();
@@ -76,7 +76,7 @@ void NoiseTexture::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "size"), "set_size", "get_size");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "seamless"), "set_seamless", "get_seamless");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "as_normalmap"), "set_as_normalmap", "is_normalmap");
- ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "noise", PROPERTY_HINT_RESOURCE_TYPE, "SimplexNoise"), "set_noise", "get_noise");
+ ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "noise", PROPERTY_HINT_RESOURCE_TYPE, "OpenSimplexNoise"), "set_noise", "get_noise");
}
void NoiseTexture::_set_texture_data(const Ref<Image> &p_image) {
@@ -159,7 +159,7 @@ void NoiseTexture::_update_texture() {
}
}
-void NoiseTexture::set_noise(Ref<SimplexNoise> p_noise) {
+void NoiseTexture::set_noise(Ref<OpenSimplexNoise> p_noise) {
if (p_noise == noise)
return;
if (noise.is_valid()) {
@@ -172,7 +172,7 @@ void NoiseTexture::set_noise(Ref<SimplexNoise> p_noise) {
_queue_update();
}
-Ref<SimplexNoise> NoiseTexture::get_noise() {
+Ref<OpenSimplexNoise> NoiseTexture::get_noise() {
return noise;
}
diff --git a/modules/opensimplex/noise_texture.h b/modules/opensimplex/noise_texture.h
index 108e471fc1..78a02cda9f 100644
--- a/modules/opensimplex/noise_texture.h
+++ b/modules/opensimplex/noise_texture.h
@@ -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"
@@ -54,7 +54,7 @@ private:
RID texture;
uint32_t flags;
- Ref<SimplexNoise> noise;
+ Ref<OpenSimplexNoise> noise;
Vector2i size;
bool seamless;
bool as_normalmap;
@@ -71,8 +71,8 @@ protected:
static void _bind_methods();
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);
diff --git a/modules/opensimplex/simplex_noise.cpp b/modules/opensimplex/open_simplex_noise.cpp
index 6d66c7110e..bfc2732ff4 100644
--- a/modules/opensimplex/simplex_noise.cpp
+++ b/modules/opensimplex/open_simplex_noise.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* simplex_noise.cpp */
+/* open_simplex_noise.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,14 +28,14 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "simplex_noise.h"
+#include "open_simplex_noise.h"
#include "core/core_string_names.h"
-SimplexNoise::SimplexNoise() {
+OpenSimplexNoise::OpenSimplexNoise() {
seed = 0;
- persistance = 0.5;
+ persistence = 0.5;
octaves = 3;
period = 64;
lacunarity = 2.0;
@@ -43,16 +43,16 @@ SimplexNoise::SimplexNoise() {
_init_seeds();
}
-SimplexNoise::~SimplexNoise() {
+OpenSimplexNoise::~OpenSimplexNoise() {
}
-void SimplexNoise::_init_seeds() {
+void OpenSimplexNoise::_init_seeds() {
for (int i = 0; i < 6; ++i) {
open_simplex_noise(seed + i * 2, &(contexts[i]));
}
}
-void SimplexNoise::set_seed(int p_seed) {
+void OpenSimplexNoise::set_seed(int p_seed) {
if (seed == p_seed)
return;
@@ -64,36 +64,36 @@ void SimplexNoise::set_seed(int p_seed) {
emit_changed();
}
-int SimplexNoise::get_seed() {
+int OpenSimplexNoise::get_seed() {
return seed;
}
-void SimplexNoise::set_octaves(int p_octaves) {
+void OpenSimplexNoise::set_octaves(int p_octaves) {
if (p_octaves == octaves) return;
octaves = CLAMP(p_octaves, 1, 6);
emit_changed();
}
-void SimplexNoise::set_period(float p_period) {
+void OpenSimplexNoise::set_period(float p_period) {
if (p_period == period) return;
period = p_period;
emit_changed();
}
-void SimplexNoise::set_persistance(float p_persistance) {
- if (p_persistance == persistance) return;
- persistance = p_persistance;
+void OpenSimplexNoise::set_persistence(float p_persistence) {
+ if (p_persistence == persistence) return;
+ persistence = p_persistence;
emit_changed();
}
-void SimplexNoise::set_lacunarity(float p_lacunarity) {
+void OpenSimplexNoise::set_lacunarity(float p_lacunarity) {
if (p_lacunarity == lacunarity) return;
lacunarity = p_lacunarity;
emit_changed();
}
-Ref<Image> SimplexNoise::get_image(int p_width, int p_height) {
+Ref<Image> OpenSimplexNoise::get_image(int p_width, int p_height) {
PoolVector<uint8_t> data;
data.resize(p_width * p_height * 4);
@@ -116,7 +116,7 @@ Ref<Image> SimplexNoise::get_image(int p_width, int p_height) {
return image;
}
-Ref<Image> SimplexNoise::get_seamless_image(int p_size) {
+Ref<Image> OpenSimplexNoise::get_seamless_image(int p_size) {
PoolVector<uint8_t> data;
data.resize(p_size * p_size * 4);
@@ -153,41 +153,41 @@ Ref<Image> SimplexNoise::get_seamless_image(int p_size) {
return image;
}
-void SimplexNoise::_bind_methods() {
+void OpenSimplexNoise::_bind_methods() {
- ClassDB::bind_method(D_METHOD("get_seed"), &SimplexNoise::get_seed);
- ClassDB::bind_method(D_METHOD("set_seed", "seed"), &SimplexNoise::set_seed);
+ ClassDB::bind_method(D_METHOD("get_seed"), &OpenSimplexNoise::get_seed);
+ ClassDB::bind_method(D_METHOD("set_seed", "seed"), &OpenSimplexNoise::set_seed);
- ClassDB::bind_method(D_METHOD("set_octaves", "octave_count"), &SimplexNoise::set_octaves);
- ClassDB::bind_method(D_METHOD("get_octaves"), &SimplexNoise::get_octaves);
+ ClassDB::bind_method(D_METHOD("set_octaves", "octave_count"), &OpenSimplexNoise::set_octaves);
+ ClassDB::bind_method(D_METHOD("get_octaves"), &OpenSimplexNoise::get_octaves);
- ClassDB::bind_method(D_METHOD("set_period", "period"), &SimplexNoise::set_period);
- ClassDB::bind_method(D_METHOD("get_period"), &SimplexNoise::get_period);
+ ClassDB::bind_method(D_METHOD("set_period", "period"), &OpenSimplexNoise::set_period);
+ ClassDB::bind_method(D_METHOD("get_period"), &OpenSimplexNoise::get_period);
- ClassDB::bind_method(D_METHOD("set_persistance", "persistance"), &SimplexNoise::set_persistance);
- ClassDB::bind_method(D_METHOD("get_persistance"), &SimplexNoise::get_persistance);
+ ClassDB::bind_method(D_METHOD("set_persistence", "persistence"), &OpenSimplexNoise::set_persistence);
+ ClassDB::bind_method(D_METHOD("get_persistence"), &OpenSimplexNoise::get_persistence);
- ClassDB::bind_method(D_METHOD("set_lacunarity", "lacunarity"), &SimplexNoise::set_lacunarity);
- ClassDB::bind_method(D_METHOD("get_lacunarity"), &SimplexNoise::get_lacunarity);
+ ClassDB::bind_method(D_METHOD("set_lacunarity", "lacunarity"), &OpenSimplexNoise::set_lacunarity);
+ ClassDB::bind_method(D_METHOD("get_lacunarity"), &OpenSimplexNoise::get_lacunarity);
- ClassDB::bind_method(D_METHOD("get_image", "width", "height"), &SimplexNoise::get_image);
- ClassDB::bind_method(D_METHOD("get_seamless_image", "size"), &SimplexNoise::get_seamless_image);
+ ClassDB::bind_method(D_METHOD("get_image", "width", "height"), &OpenSimplexNoise::get_image);
+ ClassDB::bind_method(D_METHOD("get_seamless_image", "size"), &OpenSimplexNoise::get_seamless_image);
- ClassDB::bind_method(D_METHOD("get_noise_2d", "x", "y"), &SimplexNoise::get_noise_2d);
- ClassDB::bind_method(D_METHOD("get_noise_3d", "x", "y", "z"), &SimplexNoise::get_noise_3d);
- ClassDB::bind_method(D_METHOD("get_noise_4d", "x", "y", "z", "w"), &SimplexNoise::get_noise_4d);
+ ClassDB::bind_method(D_METHOD("get_noise_2d", "x", "y"), &OpenSimplexNoise::get_noise_2d);
+ ClassDB::bind_method(D_METHOD("get_noise_3d", "x", "y", "z"), &OpenSimplexNoise::get_noise_3d);
+ ClassDB::bind_method(D_METHOD("get_noise_4d", "x", "y", "z", "w"), &OpenSimplexNoise::get_noise_4d);
- ClassDB::bind_method(D_METHOD("get_noise_2dv", "pos"), &SimplexNoise::get_noise_2dv);
- ClassDB::bind_method(D_METHOD("get_noise_3dv", "pos"), &SimplexNoise::get_noise_3dv);
+ ClassDB::bind_method(D_METHOD("get_noise_2dv", "pos"), &OpenSimplexNoise::get_noise_2dv);
+ ClassDB::bind_method(D_METHOD("get_noise_3dv", "pos"), &OpenSimplexNoise::get_noise_3dv);
ADD_PROPERTY(PropertyInfo(Variant::INT, "seed"), "set_seed", "get_seed");
ADD_PROPERTY(PropertyInfo(Variant::INT, "octaves", PROPERTY_HINT_RANGE, "1,6,1"), "set_octaves", "get_octaves");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "period", PROPERTY_HINT_RANGE, "0.1,256.0,0.1"), "set_period", "get_period");
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "persistance", PROPERTY_HINT_RANGE, "0.0,1.0,0.001"), "set_persistance", "get_persistance");
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "persistence", PROPERTY_HINT_RANGE, "0.0,1.0,0.001"), "set_persistence", "get_persistence");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "lacunarity", PROPERTY_HINT_RANGE, "0.1,4.0,0.01"), "set_lacunarity", "get_lacunarity");
}
-float SimplexNoise::get_noise_2d(float x, float y) {
+float OpenSimplexNoise::get_noise_2d(float x, float y) {
x /= period;
y /= period;
@@ -196,11 +196,11 @@ float SimplexNoise::get_noise_2d(float x, float y) {
float max = 1.0;
float sum = _get_octave_noise_2d(0, x, y);
- unsigned int i = 0;
+ int i = 0;
while (++i < octaves) {
x *= lacunarity;
y *= lacunarity;
- amp *= persistance;
+ amp *= persistence;
max += amp;
sum += _get_octave_noise_2d(i, x, y) * amp;
}
@@ -208,7 +208,7 @@ float SimplexNoise::get_noise_2d(float x, float y) {
return sum / max;
}
-float SimplexNoise::get_noise_3d(float x, float y, float z) {
+float OpenSimplexNoise::get_noise_3d(float x, float y, float z) {
x /= period;
y /= period;
@@ -218,12 +218,12 @@ float SimplexNoise::get_noise_3d(float x, float y, float z) {
float max = 1.0;
float sum = _get_octave_noise_3d(0, x, y, z);
- unsigned int i = 0;
+ int i = 0;
while (++i < octaves) {
x *= lacunarity;
y *= lacunarity;
z *= lacunarity;
- amp *= persistance;
+ amp *= persistence;
max += amp;
sum += _get_octave_noise_3d(i, x, y, z) * amp;
}
@@ -231,7 +231,7 @@ float SimplexNoise::get_noise_3d(float x, float y, float z) {
return sum / max;
}
-float SimplexNoise::get_noise_4d(float x, float y, float z, float w) {
+float OpenSimplexNoise::get_noise_4d(float x, float y, float z, float w) {
x /= period;
y /= period;
@@ -242,13 +242,13 @@ float SimplexNoise::get_noise_4d(float x, float y, float z, float w) {
float max = 1.0;
float sum = _get_octave_noise_4d(0, x, y, z, w);
- unsigned int i = 0;
+ int i = 0;
while (++i < octaves) {
x *= lacunarity;
y *= lacunarity;
z *= lacunarity;
w *= lacunarity;
- amp *= persistance;
+ amp *= persistence;
max += amp;
sum += _get_octave_noise_4d(i, x, y, z, w) * amp;
}
diff --git a/modules/opensimplex/simplex_noise.h b/modules/opensimplex/open_simplex_noise.h
index 59390c6172..a9bee266e8 100644
--- a/modules/opensimplex/simplex_noise.h
+++ b/modules/opensimplex/open_simplex_noise.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* simplex_noise.h */
+/* open_simplex_noise.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef SIMPLEX_NOISE_H
-#define SIMPLEX_NOISE_H
+#ifndef OPEN_SIMPLEX_NOISE_H
+#define OPEN_SIMPLEX_NOISE_H
#include "core/image.h"
#include "core/reference.h"
@@ -37,21 +37,21 @@
#include "thirdparty/misc/open-simplex-noise.h"
-class SimplexNoise : public Resource {
- GDCLASS(SimplexNoise, Resource)
- OBJ_SAVE_TYPE(SimplexNoise);
+class OpenSimplexNoise : public Resource {
+ GDCLASS(OpenSimplexNoise, Resource)
+ OBJ_SAVE_TYPE(OpenSimplexNoise);
osn_context contexts[6];
int seed;
- float persistance; // Controls details, value in [0,1]. Higher increases grain, lower increases smoothness.
+ float persistence; // Controls details, value in [0,1]. Higher increases grain, lower increases smoothness.
int octaves; // Number of noise layers
float period; // Distance above which we start to see similarities. The higher, the longer "hills" will be on a terrain.
float lacunarity; // Controls period change across octaves. 2 is usually a good value to address all detail levels.
public:
- SimplexNoise();
- ~SimplexNoise();
+ OpenSimplexNoise();
+ ~OpenSimplexNoise();
void _init_seeds();
@@ -64,8 +64,8 @@ public:
void set_period(float p_period);
float get_period() const { return period; }
- void set_persistance(float p_persistance);
- float get_persistance() const { return persistance; }
+ void set_persistence(float p_persistence);
+ float get_persistence() const { return persistence; }
void set_lacunarity(float p_lacunarity);
float get_lacunarity() const { return lacunarity; }
@@ -90,4 +90,4 @@ protected:
static void _bind_methods();
};
-#endif // OPENSIMPLEX_NOISE_H
+#endif // OPEN_SIMPLEX_NOISE_H
diff --git a/modules/opensimplex/register_types.cpp b/modules/opensimplex/register_types.cpp
index 9e4af99651..d1c77da257 100644
--- a/modules/opensimplex/register_types.cpp
+++ b/modules/opensimplex/register_types.cpp
@@ -30,11 +30,11 @@
#include "register_types.h"
#include "noise_texture.h"
-#include "simplex_noise.h"
+#include "open_simplex_noise.h"
void register_opensimplex_types() {
- ClassDB::register_class<SimplexNoise>();
+ ClassDB::register_class<OpenSimplexNoise>();
ClassDB::register_class<NoiseTexture>();
}