Class ArrayTextureSource

java.lang.Object
com.ardor3d.extension.terrain.providers.array.ArrayTextureSource
All Implemented Interfaces:
TextureSource

public class ArrayTextureSource extends Object implements TextureSource
  • Constructor Details

    • ArrayTextureSource

      public ArrayTextureSource(int tileSize, List<float[]> heightMaps, List<Integer> heightMapSizes)
  • Method Details

    • getConfiguration

      public TextureConfiguration getConfiguration() throws Exception
      Description copied from interface: TextureSource
      Called to initialize and setup the texture clipmap.
      Specified by:
      getConfiguration in interface TextureSource
      Returns:
      the configuration
      Throws:
      Exception - exception
    • getValidTiles

      public Set<Tile> getValidTiles(int clipmapLevel, int tileX, int tileY, int numTilesX, int numTilesY) throws Exception
      Description copied from interface: TextureSource
      Returns which tiles that contain data in the requested region.
      Specified by:
      getValidTiles in interface TextureSource
      Parameters:
      clipmapLevel - the clipmap level
      tileX - the tile abscissa
      tileY - the tile ordinate
      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: TextureSource
      Returns which tiles that should be marked as invalid and updated in the requested region.
      Specified by:
      getInvalidTiles in interface TextureSource
      Parameters:
      clipmapLevel - the clipmap level
      tileX - the tile abscissa
      tileY - the tile ordinate
      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: TextureSource
      Returns the contributing source id for the requested tile.
      Specified by:
      getContributorId in interface TextureSource
      Parameters:
      clipmapLevel - the clipmap level
      tile - the tile
      Returns:
      the contributing source id for the requested tile
    • getTile

      public ByteBuffer getTile(int clipmapLevel, Tile tile) throws Exception
      Description copied from interface: TextureSource
      Request for texture data for a tile.
      Specified by:
      getTile in interface TextureSource
      Parameters:
      clipmapLevel - the clipmap level
      tile - the tile
      Returns:
      the texture data for a tile
      Throws:
      Exception - exception