diff options
Diffstat (limited to 'city/geometry.lua')
-rw-r--r-- | city/geometry.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/city/geometry.lua b/city/geometry.lua index 13088d1..78c2aa7 100644 --- a/city/geometry.lua +++ b/city/geometry.lua @@ -80,4 +80,25 @@ geom.square = class{ end } + +-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-- +-- qt_node +-- +-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +geom.qt_node = class{ + __call = function(this, center, span) + local node = {} + node.square = geom.square(center, span) + setmetatable(node, {__index=this}) + return node + end, + + is_leaf = function(self) + if self.children then return true end + return false + end, +} + return geom |