1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

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.
This commit is contained in:
kwolekr 2015-05-17 03:38:39 -04:00
parent c0edb8e313
commit 4c9a8a91c4
6 changed files with 178 additions and 4 deletions

View file

@ -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);