1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-16 18:01:40 +00:00

Add VoxelArea:position, VoxelArea:iter and VoxelArea:iterp

This commit is contained in:
Kahrl 2013-07-09 16:26:52 +02:00
parent 52beafff53
commit 6027c8d259
2 changed files with 48 additions and 0 deletions

View file

@ -1676,6 +1676,13 @@ methods:
- 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
- position(i): returns the absolute position vector corresponding to index i
- contains(x, y, z): check if (x,y,z) is inside area formed by MinEdge and MaxEdge
- containsp(p): same as above, except takes a vector
- containsi(i): same as above, except takes an index
- iter(minx, miny, minz, maxx, maxy, maxz): returns an iterator that returns indices
^ from (minx,miny,minz) to (maxx,maxy,maxz) in the order of [z [y [x]]]
- iterp(minp, maxp): same as above, except takes a vector
Mapgen objects
---------------