Class MultiScalarDataset

java.lang.Object
net.buildtheearth.terracore.worldgen.dataset.scalar.MultiScalarDataset
All Implemented Interfaces:
IScalarDataset

public class MultiScalarDataset extends Object implements IScalarDataset
Implementation of IScalarDataset which can sample from multiple IScalarDatasets and combine the results.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final net.buildtheearth.terracore.geo.bvh.BVH<net.buildtheearth.terracore.worldgen.dataset.scalar.MultiScalarDataset.WrappedDataset>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    MultiScalarDataset(@NonNull String name, boolean useDefault)
     
  • 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.

    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

    • bvh

      protected final net.buildtheearth.terracore.geo.bvh.BVH<net.buildtheearth.terracore.worldgen.dataset.scalar.MultiScalarDataset.WrappedDataset> bvh
  • Constructor Details

    • MultiScalarDataset

      public MultiScalarDataset(@NonNull @NonNull String name, boolean useDefault)
  • 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