Package worldBuilder

Class FoundExporter

  • All Implemented Interfaces:
    Exporter

    public class FoundExporter
    extends java.lang.Object
    implements Exporter
    Exporter to render a Cartesian map w/JSON descriptions of each point.
    • Constructor Summary

      Constructors 
      Constructor Description
      FoundExporter​(int width, int height)
      create a new Foundation exporter
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void entryPoint​(int x_in, int y_in, int x_out, int y_out)
      entry/exit points (for explorers)
      void erodeMap​(double[][] erode)
      Up-load the net erosion/deposition for every tile
      int export_height()
      return the export height (in tiles)
      int export_width()
      return the export width (in tiles)
      void faunaMap​(double[][] fauna, java.lang.String[] names)
      Up-load the fauna type for every tile
      void floraMap​(double[][] flora, java.lang.String[] names)
      Up-load the flora assignments for every tile
      void heightMap​(double[][] heights)
      Up-load the altitude of every tile
      int neededInfo()
      return list of needed map up-loads
      void position​(double lat, double lon)
      Set the lat/lon of the region being exported
      void preview​(Exporter.WhichMap chosen, java.awt.Color[] colorMap)
      generate a preview of the currently up-loaded export
      void rainMap​(double[][] rain)
      Up-load the annual rainfall for every tile
      void soilMap​(double[][] soil, java.lang.String[] names)
      Up-load the soil type for every tile
      void temps​(double meanTemp, double meanSummer, double meanWinter)
      Set seasonal temperature range for region being exported
      void tileSize​(int meters)
      Set the size of a single tile
      void waterMap​(double[][] depths)
      Up-load the surface-water-depth for every tile
      boolean writeFile​(java.lang.String dirname)
      Export the up-loaded information in selected forma
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FoundExporter

        public FoundExporter​(int width,
                             int height)
        create a new Foundation exporter
        Parameters:
        width - of the export area (in tiles)
        height - of the export area ((in tiles)
    • Method Detail

      • neededInfo

        public int neededInfo()
        return list of needed map up-loads
        Specified by:
        neededInfo in interface Exporter
      • export_width

        public int export_width()
        return the export width (in tiles)
        Specified by:
        export_width in interface Exporter
      • export_height

        public int export_height()
        return the export height (in tiles)
        Specified by:
        export_height in interface Exporter
      • heightMap

        public void heightMap​(double[][] heights)
        Up-load the altitude of every tile
        Specified by:
        heightMap in interface Exporter
        Parameters:
        heights - height (in meters) of every point
      • erodeMap

        public void erodeMap​(double[][] erode)
        Up-load the net erosion/deposition for every tile
        Specified by:
        erodeMap in interface Exporter
        Parameters:
        erode - per point height (in meters) of soil lost to erosion negative means sedimentqation
      • soilMap

        public void soilMap​(double[][] soil,
                            java.lang.String[] names)
        Up-load the soil type for every tile
        Specified by:
        soilMap in interface Exporter
        Parameters:
        soil - - per point soil type
        names - - per type name strings
      • waterMap

        public void waterMap​(double[][] depths)
        Up-load the surface-water-depth for every tile
        Specified by:
        waterMap in interface Exporter
        Parameters:
        depths - - per point depth of water
      • floraMap

        public void floraMap​(double[][] flora,
                             java.lang.String[] names)
        Up-load the flora assignments for every tile
        Specified by:
        floraMap in interface Exporter
        Parameters:
        flora - assignments per point
        names - - per type name strings
      • faunaMap

        public void faunaMap​(double[][] fauna,
                             java.lang.String[] names)
        Up-load the fauna type for every tile
        Specified by:
        faunaMap in interface Exporter
        Parameters:
        fauna - - per point fauna type
        names - - per-type name strings
      • entryPoint

        public void entryPoint​(int x_in,
                               int y_in,
                               int x_out,
                               int y_out)
        entry/exit points (for explorers)
        Parameters:
        x_in - (x_points, relative to top-left)
        y_in - (y_points, relative to top-left)
        x_out - (x_points, relative to top-left)
        y_out - (y_points, relative to top-left) Note: Foundation coordinates relative to bottom-left
      • writeFile

        public boolean writeFile​(java.lang.String dirname)
        Export the up-loaded information in selected forma
        Specified by:
        writeFile in interface Exporter
        Parameters:
        dirname - - name of output directory
      • preview

        public void preview​(Exporter.WhichMap chosen,
                            java.awt.Color[] colorMap)
        generate a preview of the currently up-loaded export
        Specified by:
        preview in interface Exporter
        Parameters:
        chosen - map type (e.g. height, flora)
        colorMap - - palette to be used in preview
      • tileSize

        public void tileSize​(int meters)
        Description copied from interface: Exporter
        Set the size of a single tile
        Specified by:
        tileSize in interface Exporter
        Parameters:
        meters - real-world width of a tile
      • position

        public void position​(double lat,
                             double lon)
        Description copied from interface: Exporter
        Set the lat/lon of the region being exported
        Specified by:
        position in interface Exporter
        Parameters:
        lat - real world latitude of map center
        lon - real world longitude of map center
      • temps

        public void temps​(double meanTemp,
                          double meanSummer,
                          double meanWinter)
        Description copied from interface: Exporter
        Set seasonal temperature range for region being exported
        Specified by:
        temps in interface Exporter
        Parameters:
        meanTemp - mean (all year) temperature
        meanSummer - mean (summer) temperature
        meanWinter - mean (winter) temperature
      • rainMap

        public void rainMap​(double[][] rain)
        Description copied from interface: Exporter
        Up-load the annual rainfall for every tile
        Specified by:
        rainMap in interface Exporter
        Parameters:
        rain - per point depth (in meters) of annual rainfall