aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_noise.h
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2015-05-17 03:38:39 -0400
committerkwolekr <kwolekr@minetest.net>2015-05-17 04:04:17 -0400
commit4c9a8a91c4988b3567a38af622a3eb0d0ec19f6b (patch)
tree1be726a192c20df25e44ff799102199a29ff6744 /src/script/lua_api/l_noise.h
parentc0edb8e313590efcf473e02ab46dd967774386d0 (diff)
downloadhax-minetest-server-4c9a8a91c4988b3567a38af622a3eb0d0ec19f6b.tar.gz
hax-minetest-server-4c9a8a91c4988b3567a38af622a3eb0d0ec19f6b.zip
SAPI/Noise: Add PerlinNoiseMap:getMapSlice() function
This adds the ability to grab 'slices' of noise calculated by PerlinNoiseMap. Retrieving smaller slices of noise from the computation result as needed optimizes memory usage while maintaining a reasonable amount of CPU overhead.
Diffstat (limited to 'src/script/lua_api/l_noise.h')
-rw-r--r--src/script/lua_api/l_noise.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/script/lua_api/l_noise.h b/src/script/lua_api/l_noise.h
index 56d2d59f8..e958c5a23 100644
--- a/src/script/lua_api/l_noise.h
+++ b/src/script/lua_api/l_noise.h
@@ -74,6 +74,10 @@ class LuaPerlinNoiseMap : public ModApiBase {
static int l_get3dMap(lua_State *L);
static int l_get3dMap_flat(lua_State *L);
+ static int l_calc2dMap(lua_State *L);
+ static int l_calc3dMap(lua_State *L);
+ static int l_getMapSlice(lua_State *L);
+
public:
LuaPerlinNoiseMap(NoiseParams *np, int seed, v3s16 size);