Class SimpleArrayTerrainSource

java.lang.Object
com.ardor3d.extension.terrain.providers.simplearray.SimpleArrayTerrainSource
All Implemented Interfaces:
TerrainSource

public class SimpleArrayTerrainSource extends Object implements TerrainSource
  • Constructor Details

    • SimpleArrayTerrainSource

      public SimpleArrayTerrainSource(int tileSize, float[] heightData, int size)
  • Method Details

    • getConfiguration

      public TerrainConfiguration getConfiguration() throws Exception
      Description copied from interface: TerrainSource
      Called to initialize and setup the geometry clipmap terrain.
      Specified by:
      getConfiguration in interface TerrainSource
      Returns:
      TerrainConfiguration
      Throws:
      Exception - exception
    • getValidTiles

      public Set<Tile> getValidTiles(int clipmapLevel, int tileX, int tileY, int numTilesX, int numTilesY) throws Exception
      Description copied from interface: TerrainSource
      Returns which tiles that contain data in the requested region.
      Specified by:
      getValidTiles in interface TerrainSource
      Parameters:
      clipmapLevel - the clipmap level
      tileX - the abscissa of the tile
      tileY - the ordinate of the tile
      numTilesX - the number of tiles on X
      numTilesY - the number of tiles on Y
      Returns:
      the tiles that contain data in the requested region
      Throws:
      Exception - exception
    • getInvalidTiles

      public Set<Tile> getInvalidTiles(int clipmapLevel, int tileX, int tileY, int numTilesX, int numTilesY) throws Exception
      Description copied from interface: TerrainSource
      Returns which tiles that should be marked as invalid and updated in the requested region.
      Specified by:
      getInvalidTiles in interface TerrainSource
      Parameters:
      clipmapLevel - the clipmap level
      tileX - the abscissa of the tile
      tileY - the ordinate of the tile
      numTilesX - the number of tiles on X
      numTilesY - the number of tiles on Y
      Returns:
      the tiles that should be marked as invalid and updated in the requested region
      Throws:
      Exception - exception
    • getContributorId

      public int getContributorId(int clipmapLevel, Tile tile)
      Description copied from interface: TerrainSource
      Returns the contributing source id for the requested tile.
      Specified by:
      getContributorId in interface TerrainSource
      Parameters:
      clipmapLevel - the clipmap level
      tile - the tile
      Returns:
      the contributor identifier
    • getTile

      public float[] getTile(int clipmapLevel, Tile tile) throws Exception
      Description copied from interface: TerrainSource
      Request for height data for a tile.
      Specified by:
      getTile in interface TerrainSource
      Parameters:
      clipmapLevel - the clipmap level
      tile - the tile
      Returns:
      the height data for this tile
      Throws:
      Exception - exception