Class DoubleTiledDataset

java.lang.Object
com.google.common.cache.CacheLoader<net.buildtheearth.terracore.geo.TileLocation,CompletableFuture<double[]>>
net.buildtheearth.terracore.worldgen.dataset.Dataset<net.buildtheearth.terracore.geo.TileLocation,double[]>
net.buildtheearth.terracore.worldgen.dataset.TiledDataset<double[]>
net.buildtheearth.terracore.worldgen.dataset.TiledHttpDataset<double[]>
net.buildtheearth.terracore.worldgen.dataset.scalar.DoubleTiledDataset
All Implemented Interfaces:
IDataset<net.buildtheearth.terracore.geo.TileLocation,double[]>, IScalarDataset
Direct Known Subclasses:
ConfigurableDoubleTiledDataset

public abstract class DoubleTiledDataset extends TiledHttpDataset<double[]> implements IScalarDataset
A TiledDataset which operates on a grid of interpolated doubles.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected class 
     

    Nested classes/interfaces inherited from class com.google.common.cache.CacheLoader

    com.google.common.cache.CacheLoader.InvalidCacheLoadException, com.google.common.cache.CacheLoader.UnsupportedLoadingOperationException
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final BlendMode
     
    protected final int
     
    protected final int
     
    protected final int
     

    Fields inherited from class net.buildtheearth.terracore.worldgen.dataset.TiledDataset

    projection, tileSize

    Fields inherited from class net.buildtheearth.terracore.worldgen.dataset.Dataset

    cache
  • Constructor Summary

    Constructors
    Constructor
    Description
    DoubleTiledDataset(@NonNull net.buildtheearth.terracore.geo.projection.GeographicProjection projection, int resolution, @NonNull BlendMode blend)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    getAsync(double lon, double lat)
    Asynchronously gets a single value at the given point.
    getAsync(@NonNull net.buildtheearth.terracore.geo.CornerBoundingBox2d bounds, int sizeX, int sizeZ)
    Asynchronously gets a bunch of values at the given coordinates.
    int
     
    int
     
    int
     

    Methods inherited from class net.buildtheearth.terracore.worldgen.dataset.TiledHttpDataset

    addProperties, decode, load, urls

    Methods inherited from class net.buildtheearth.terracore.worldgen.dataset.TiledDataset

    projection, tileSize

    Methods inherited from class net.buildtheearth.terracore.worldgen.dataset.Dataset

    getAsync

    Methods inherited from class com.google.common.cache.CacheLoader

    asyncReloading, from, from, loadAll, reload

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.buildtheearth.terracore.worldgen.dataset.IScalarDataset

    getAsync
  • Field Details

    • blend

      protected final BlendMode blend
    • resolution

      protected final int resolution
    • shift

      protected final int shift
    • mask

      protected final int mask
  • Constructor Details

    • DoubleTiledDataset

      public DoubleTiledDataset(@NonNull @NonNull net.buildtheearth.terracore.geo.projection.GeographicProjection projection, int resolution, @NonNull @NonNull BlendMode blend)
  • Method Details

    • getAsync

      public CompletableFuture<Double> getAsync(double lon, double lat) throws net.buildtheearth.terracore.geo.projection.OutOfProjectionBoundsException
      Description copied from interface: IScalarDataset
      Asynchronously gets a single value at the given point.
      Specified by:
      getAsync in interface IScalarDataset
      Parameters:
      lon - the longitude
      lat - the latitude
      Returns:
      a CompletableFuture which will be completed with the value
      Throws:
      net.buildtheearth.terracore.geo.projection.OutOfProjectionBoundsException
    • getAsync

      public CompletableFuture<double[]> getAsync(@NonNull @NonNull net.buildtheearth.terracore.geo.CornerBoundingBox2d bounds, int sizeX, int sizeZ) throws net.buildtheearth.terracore.geo.projection.OutOfProjectionBoundsException
      Description copied from interface: IScalarDataset
      Asynchronously gets a bunch of values at the given coordinates.
      Specified by:
      getAsync in interface IScalarDataset
      Parameters:
      sizeX - the number of samples to take along the X axis
      sizeZ - the number of samples to take along the Z axis
      Returns:
      a CompletableFuture which will be completed with the values
      Throws:
      net.buildtheearth.terracore.geo.projection.OutOfProjectionBoundsException
    • blend

      public BlendMode blend()
    • resolution

      public int resolution()
    • shift

      public int shift()
    • mask

      public int mask()