Package com.kraken.api.service.tile
Class AreaService
- java.lang.Object
-
- com.kraken.api.service.tile.AreaService
-
public class AreaService extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description AreaService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GameAreacreateAreaFromRadius(net.runelite.api.coords.WorldPoint center, int radius)Creates a square area around a center point.GameAreacreateFromPoints(java.util.Collection<net.runelite.api.coords.WorldPoint> points)Creates an area from a raw collection of points.GameAreacreatePolygonArea(java.util.List<net.runelite.api.coords.WorldPoint> vertices)Creates a complex shape from a list of vertices.GameAreacreatePolygonArea(net.runelite.api.coords.WorldPoint... vertices)Creates a complex shape (e.g., L-shape) from vertices.GameAreacreateReachableArea(net.runelite.api.coords.WorldPoint center, int range, boolean ignoreCollision)Creates an area based on movement reachability (BFS).
-
-
-
Method Detail
-
createAreaFromRadius
public GameArea createAreaFromRadius(net.runelite.api.coords.WorldPoint center, int radius)
Creates a square area around a center point.- Parameters:
center- The center of the radiusradius- The distance from the center to the outside edge of the area- Returns:
- GameArea the game area containing the WorldPoints within the radius
-
createReachableArea
public GameArea createReachableArea(net.runelite.api.coords.WorldPoint center, int range, boolean ignoreCollision)
Creates an area based on movement reachability (BFS). Uses your existing TileService logic.- Parameters:
center- The center of the reachable arearange- The range that the reachable area should extend toignoreCollision- True if collision maps should be ignored when generating the game area- Returns:
- GameArea the game area containing the WorldPoints within the radius
-
createPolygonArea
public GameArea createPolygonArea(java.util.List<net.runelite.api.coords.WorldPoint> vertices)
Creates a complex shape from a list of vertices. This rasterizes the polygon: it finds all discrete tiles inside the shape.- Parameters:
vertices- A list of vertices- Returns:
- GameArea the game area containing the WorldPoints within the specified vertices
-
createPolygonArea
public GameArea createPolygonArea(net.runelite.api.coords.WorldPoint... vertices)
Creates a complex shape (e.g., L-shape) from vertices. This rasterizes the polygon: it finds all discrete tiles inside the shape.- Parameters:
vertices- A set of vertices making up the bounds of the polygon area- Returns:
- GameArea the game area containing the WorldPoints within the specified vertices
-
createFromPoints
public GameArea createFromPoints(java.util.Collection<net.runelite.api.coords.WorldPoint> points)
Creates an area from a raw collection of points. This must include all world points within a given "outline" of an area (i.e. the vertices making up a polygon). If you want to use an outline and generate the internal world points for an area usecreatePolygonArea()instead.- Parameters:
points- A set of WorldPoint objects used to create an area.- Returns:
- GameArea the game area containing the WorldPoints specified in the set.
-
-