Class Area

java.lang.Object
com.valhalla.sdk.api.math.Area

public final class Area extends Object
An immutable rectangular or polygonal world area on one plane.
  • Constructor Details

    • Area

      public Area(int x1, int y1, int x2, int y2)
    • Area

      public Area(int x1, int y1, int x2, int y2, int plane)
    • Area

      public Area(Tile firstCorner, Tile secondCorner)
    • Area

      public Area(Tile... vertices)
  • Method Details

    • getPlane

      public int getPlane()
    • getMinX

      public int getMinX()
    • getMaxX

      public int getMaxX()
    • getMinY

      public int getMinY()
    • getMaxY

      public int getMaxY()
    • getVertices

      public Tile[] getVertices()
    • getCenter

      public Tile getCenter()
    • contains

      public boolean contains(Tile tile)
    • contains

      public boolean contains(int x, int y)
    • getNearestTile

      public Tile getNearestTile(Tile origin)
    • distanceTo

      public int distanceTo(Tile origin)
    • getRandomTile

      public Tile getRandomTile()
    • getRandomTile

      public Tile getRandomTile(Random random)
    • getTiles

      public List<Tile> getTiles()
    • toString

      public String toString()
      Overrides:
      toString in class Object