Commit 6a02ed9d authored by Fedja Beader's avatar Fedja Beader
Browse files

Print .pos bounding box size

parent a21dca87
......@@ -66,10 +66,15 @@ function positions:update()
self.volume = 0
return nil
else
self.volume = (1 + max.x - min.x) * (1 + max.y - min.y) * (1 + max.z - min.z)
local lx = (1 + max.x - min.x)
local ly = (1 + max.y - min.y)
local lz = (1 + max.z - min.z)
self.volume = lx * ly * lz
self.min = min
self.max = max
l:info("Area volume: " .. self.volume .. " min=" .. minetest.pos_to_string(vector.round(self.min))
l:info("Area volume: " .. self.volume
.. " size= " .. minetest.pos_to_string({ x = lx, y = ly, z = lz })
.. " min=" .. minetest.pos_to_string(vector.round(self.min))
.. " max=" .. minetest.pos_to_string(vector.round(self.max)))
end
end
......@@ -77,8 +82,6 @@ end
function positions:set(n, pos)
self.pos_list[n] = vector.round(pos)
l:info("Added position " .. minetest.pos_to_string(pos))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment