diff --git a/polygon.lua b/polygon.lua index 4ad97e1..0a43782 100644 --- a/polygon.lua +++ b/polygon.lua @@ -184,7 +184,7 @@ function Polygon:clone() end -- get bounding box -function Polygon:getBBox() +function Polygon:bbox() local ulx,uly = self.vertices[1].x, self.vertices[1].y local lrx,lry = ulx,uly for i=2,#self.vertices do diff --git a/shapes.lua b/shapes.lua index a472cdd..3fadc26 100644 --- a/shapes.lua +++ b/shapes.lua @@ -281,11 +281,11 @@ function PointShape:outcircle() end function ConvexPolygonShape:bbox() - return self._polygon:getBBox() + return self._polygon:bbox() end function ConcavePolygonShape:bbox() - return self._polygon:getBBox() + return self._polygon:bbox() end function CircleShape:bbox()