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

@ -106,4 +106,9 @@ void warn_if_field_exists(lua_State *L, int table,
const char *fieldname,
const std::string &message);
size_t write_array_slice_float(lua_State *L, int table_index, float *data,
v3u16 data_size, v3u16 slice_offset, v3u16 slice_size);
size_t write_array_slice_u16(lua_State *L, int table_index, u16 *data,
v3u16 data_size, v3u16 slice_offset, v3u16 slice_size);
#endif /* C_CONVERTER_H_ */