diff options
author | kwolekr <kwolekr@minetest.net> | 2013-06-28 10:28:15 -0400 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2013-06-28 11:07:45 -0400 |
commit | 3f13dc790caeda7ca8f5e429f6f94458bda5826c (patch) | |
tree | 23912b30d723790d481a69751914ac0f2c8b1f48 /doc | |
parent | 280946ba836cde9516f9344f47561f3356bdf869 (diff) | |
download | minetest-3f13dc790caeda7ca8f5e429f6f94458bda5826c.tar.gz minetest-3f13dc790caeda7ca8f5e429f6f94458bda5826c.tar.bz2 minetest-3f13dc790caeda7ca8f5e429f6f94458bda5826c.zip |
Add voxelarea.lua helper to builtin
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lua_api.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/lua_api.txt b/doc/lua_api.txt index 5920b97a0..c39098a7a 100644 --- a/doc/lua_api.txt +++ b/doc/lua_api.txt @@ -1572,6 +1572,16 @@ methods: ^ will be ignored - update_liquids(): Update liquid flow +VoxelArea: A helper class for voxel areas +- Can be created via VoxelArea:new{MinEdge=pmin, MaxEdge=pmax} +- Coordinates are *inclusive*, like most other things in Minetest +methods: +- getExtent(): returns a 3d vector containing the size of the area formed by MinEdge and MaxEdge +- getVolume(): returns the volume of the area formed by MinEdge and MaxEdge +- index(x, y, z): returns the index of an absolute position in a flat array starting at 1 + ^ useful for things like VoxelManip, raw Schematic specifiers, PerlinNoiseMap:get2d/3dMap, and so on +- indexp(p): same as above, except takes a vector + Mapgen objects --------------- A mapgen object is a construct used in map generation. Mapgen objects can be used by an on_generate |