Package rsb.wrappers
Class RSArea
java.lang.Object
rsb.wrappers.RSArea
Represents a shape made of RSTiles.
- Author:
- GigiaJ
-
Constructor Summary
ConstructorsConstructorDescriptionRSArea
(int swX, int swY, int neX, int neY) RSArea
(int swX, int swY, int neX, int neY, int p) RSArea
(Positionable positionable, int radius) Creates an area with the given tile as the center and the sides being the given radius from the center tile -
Method Summary
-
Constructor Details
-
RSArea
- Parameters:
tiles
- An Array containing of RSTiles forming a polygon shape.plane
- The plane of the RSArea.
-
RSArea
- Parameters:
tiles
- An Array containing of RSTiles forming a polygon shape.
-
RSArea
- Parameters:
sw
- The South West RSTile of the RSAreane
- The North East RSTile of the RSAreaplane
- The plane of the RSArea.
-
RSArea
- Parameters:
sw
- The South West RSTile of the RSAreane
- The North East RSTile of the RSArea
-
RSArea
public RSArea(int swX, int swY, int neX, int neY) - Parameters:
swX
- The X axle of the South West RSTile of the RSAreaswY
- The Y axle of the South West RSTile of the RSAreaneX
- The X axle of the North East RSTile of the RSAreaneY
- The Y axle of the North East RSTile of the RSArea
-
RSArea
public RSArea(int swX, int swY, int neX, int neY, int p) - Parameters:
swX
- The X axle of the South West RSTile of the RSAreaswY
- The Y axle of the South West RSTile of the RSAreaneX
- The X axle of the North East RSTile of the RSAreaneY
- The Y axle of the North East RSTile of the RSAreap
- The plane of the RSArea
-
RSArea
Creates an area with the given tile as the center and the sides being the given radius from the center tile- Parameters:
positionable
- The tile to be the center of the arearadius
- The radius of the area
-
-
Method Details
-
contains
public boolean contains(net.runelite.api.coords.WorldPoint point) -
contains
public boolean contains(int x, int y) - Parameters:
x
- The x location of the RSTile that will be checked.y
- The y location of the RSTile that will be checked.- Returns:
- True if the RSArea contains the given RSTile.
-
contains
- Parameters:
plane
- The plane to check.tiles
- The RSTile(s) that will be checked.- Returns:
- True if the RSArea contains the given RSTile(s).
-
contains
- Parameters:
tiles
- The RSTile(s) that will be checked.- Returns:
- True if the RSArea contains the given RSTile(s).
-
getCentralTile
- Returns:
- The central RSTile of the RSArea.
-
getNearestTile
- Parameters:
base
- The base tile to measure the closest tile off of.- Returns:
- The nearest RSTile in the RSArea to the given RSTile.
-
getTileArray
- Returns:
- The RSTiles the RSArea contains.
-
getTiles
- Returns:
- The RSTiles the RSArea contains.
-
getRandomTile
- Returns:
- a random RSTile in the RSArea
-
getWidth
public int getWidth()- Returns:
- The distance between the the RSTile that's most East and the RSTile that's most West.
-
getHeight
public int getHeight()- Returns:
- The distance between the the RSTile that's most South and the RSTile that's most North.
-
getX
public int getX()- Returns:
- The X axle of the RSTile that's most West.
-
getY
public int getY()- Returns:
- The Y axle of the RSTile that's most South.
-
getPlane
public int getPlane()- Returns:
- The plane of the RSArea.
-
getBounds
- Returns:
- The bounding box of the RSArea.
-