Class MapUtilities
java.lang.Object
de.gurkenlabs.litiengine.environment.tilemap.MapUtilities
-
Method Summary
Modifier and TypeMethodDescriptionstatic Path2DconvertPolyshapeToPath(IMapObject mapObject) static IMapObjectfindMapObject(IMap map, int id) static ITilesetfindTileSet(IMap map, ITile tile) Searches for the tile set that contains the specified tile, identified by the grid id.getAbsolutePolyshapePoints(IMapObject mapObject) static Rectangle2DgetBounds(IMapObject... objects) static Point2DgetMapLocation(IMap map, Point tileLocation) static intgetMaxMapId(IMap map) static PointGet the corresponding tile for a given pixel map location.static PointGet the corresponding tile for a given pixel map location.static Rectangle2DgetTileBoundingBox(int x, int y) static Rectangle2DgetTileBoundingBox(IMap map, int x, int y) static Rectangle2DgetTileBoundingBox(IMap map, Point2D mapLocation) static Rectangle2DgetTileBoundingBox(IMap map, Rectangle2D box) static Rectangle2DgetTileBoundingBox(IMap map, Point tile) static Rectangle2DgetTileBoundingBox(Point2D mapLocation) static Rectangle2DgetTileBoundingBox(Point tile) getTilesByPixelLocation(IMap map, Point2D location) static ITilegetTopMostTile(IMap map, Point2D location) static ITilegetTopMostTile(IMap map, Point point) static ITilegetTopMostTile(Point2D location) static ITilegetTopMostTile(Point point) static booleanisStaggeredRowOrColumn(StaggerIndex staggerIndex, int index) Check if the row or column with the given index is staggered.
-
Method Details
-
getBounds
-
getMaxMapId
-
getTileBoundingBox
-
getTile
Get the corresponding tile for a given pixel map location. This is an overload taking the Map from the current environment to calculate a tile location.- Parameters:
mapLocation- the pixel map location.- Returns:
- The x / y tile coordinate for the given location.
- See Also:
-
getTile
-
isStaggeredRowOrColumn
Check if the row or column with the given index is staggered.- Parameters:
staggerIndex- the staggerIndex property of the map. Every second row (or column, depending on theStaggerAxisof the map is staggered half a tile.index- the index of the current row or column for which we want to determine if it's staggered or not.- Returns:
- a boolean representing if the row or column with the given index is staggered.
-
getMapLocation
-
getTilesByPixelLocation
-
getTopMostTile
-
getTopMostTile
-
getTopMostTile
-
getTopMostTile
-
findTileSet
-
convertPolyshapeToPath
-
getAbsolutePolyshapePoints
-
findMapObject
-
getTileBoundingBox
-
getTileBoundingBox
-
getTileBoundingBox
-
getTileBoundingBox
-
getTileBoundingBox
-
getTileBoundingBox
-