Interface MapMetric

  • All Known Implementing Classes:
    AtlantisMapMetric, EresseaMapMetric

    public interface MapMetric
    A map metric handles the properties of a coordinate system, mainly that of directions mapping to coordinates and vice versa.
    • Method Detail

      • getDirection

        Direction getDirection​(Region from,
                               Region to)
        Returns the direction from a coordinate to an adjacent coordinate.
        The corresponding direction, Direction.INVALID if from and to are not adjacent.
      • getDirections

        java.util.List<Direction> getDirections()
        Returns a list of all directions, sorted by ascending direction code.
      • getDifference

        int getDifference​(Direction from,
                          Direction to)
        Returns the difference to the specified directions. E.g., getDifference(NE, W) == -2 , getDifference(NE, SE) == 2, getDifference(NE, SW) == 3. Differences to Direction.INVALID are always Integer.MAX_VALUE.
      • createBBox

        BoxTransformer.BBox createBBox()
        Returns a bounding box suited for this coordinate system.