public static Polygon getFootprintPolygon ( MisoSceneMetrics metrics , int x , int y , int width , int height ) { SmartPolygon footprint = new SmartPolygon ( ) ; Point tpos = MisoUtil . tileToScreen ( metrics , x , y , new Point ( ) ) ; // start with top-center point int rx = tpos . x + metrics . tilehwid , ry = tpos . y ; footprint . addPoint ( rx , ry ) ; // right point rx += width * metrics . tilehwid ; ry += width * metrics . tilehhei ; footprint . addPoint ( rx , ry ) ; // bottom-center point rx -= height * metrics . tilehwid ; ry += height * metrics . tilehhei ; footprint . addPoint ( rx , ry ) ; // left point rx -= width * metrics . tilehwid ; ry -= width * metrics . tilehhei ; footprint . addPoint ( rx , ry ) ; // end with top-center point rx += height * metrics . tilehwid ; ry -= height * metrics . tilehhei ; footprint . addPoint ( rx , ry ) ; return footprint ; }
Returns a polygon framing the specified scene footprint .