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:
parent
c0edb8e313
commit
4c9a8a91c4
6 changed files with 178 additions and 4 deletions
|
@ -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_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue