Class AwtTextureSource

java.lang.Object
com.ardor3d.extension.terrain.providers.awt.AwtTextureSource
All Implemented Interfaces:
TextureSource, ElementUpdateListener

public class AwtTextureSource extends Object implements TextureSource, ElementUpdateListener
  • Constructor Details

    • AwtTextureSource

      public AwtTextureSource(int availableClipmapLevels, TextureStoreFormat format)
  • Method Details

    • getProvider

      public AwtElementProvider getProvider()
    • 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 sourceTile)
      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
      sourceTile - 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
    • elementUpdated

      public void elementUpdated(ReadOnlyVector4 oldBounds, ReadOnlyVector4 newBounds)
      Specified by:
      elementUpdated in interface ElementUpdateListener
    • addTiles

      protected void addTiles(ReadOnlyVector4 bounds)