From b994a7af130cb8219fc0c546454317cb105c7322 Mon Sep 17 00:00:00 2001 From: kwolekr Date: Mon, 27 Oct 2014 02:02:38 -0400 Subject: Add support for eased 3d noise --- src/noise.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/noise.h') diff --git a/src/noise.h b/src/noise.h index 9f9e2af6d..093ac1d87 100644 --- a/src/noise.h +++ b/src/noise.h @@ -102,13 +102,10 @@ public: float *buf; float *result; - Noise(NoiseParams *np, int seed, int sx, int sy); - Noise(NoiseParams *np, int seed, int sx, int sy, int sz); - virtual ~Noise(); + Noise(NoiseParams *np, int seed, int sx, int sy, int sz=1); + ~Noise(); - virtual void init(NoiseParams *np, int seed, int sx, int sy, int sz); - void setSize(int sx, int sy); - void setSize(int sx, int sy, int sz); + void setSize(int sx, int sy, int sz=1); void setSpreadFactor(v3f spread); void setOctaves(int octaves); void resizeNoiseBuf(bool is3d); @@ -120,10 +117,10 @@ public: void gradientMap3D( float x, float y, float z, float step_x, float step_y, float step_z, - int seed); + int seed, bool eased=false); float *perlinMap2D(float x, float y); float *perlinMap2DModulated(float x, float y, float *persist_map); - float *perlinMap3D(float x, float y, float z); + float *perlinMap3D(float x, float y, float z, bool eased=false); void transformNoiseMap(); }; -- cgit v1.2.3