Interface TextureSource
- All Known Implementing Classes:
ArrayTextureSource
,AwtTextureSource
,ImageTextureSource
,InMemoryTextureSource
,ProceduralNormalMapSource
,ProceduralTextureSource
,SimpleArrayTextureSource
public interface TextureSource
Feeds texture data to a TextureCache
-
Method Summary
Modifier and TypeMethodDescriptionCalled to initialize and setup the texture clipmap.int
getContributorId
(int clipmapLevel, Tile tile) Returns the contributing source id for the requested tile.getInvalidTiles
(int clipmapLevel, int tileX, int tileY, int numTilesX, int numTilesY) Returns which tiles that should be marked as invalid and updated in the requested region.Request for texture data for a tile.getValidTiles
(int clipmapLevel, int tileX, int tileY, int numTilesX, int numTilesY) Returns which tiles that contain data in the requested region.
-
Method Details
-
getConfiguration
Called to initialize and setup the texture clipmap.- Returns:
- the configuration
- Throws:
Exception
- exception
-
getValidTiles
Set<Tile> getValidTiles(int clipmapLevel, int tileX, int tileY, int numTilesX, int numTilesY) throws Exception Returns which tiles that contain data in the requested region.- Parameters:
clipmapLevel
- the clipmap leveltileX
- the tile abscissatileY
- the tile ordinatenumTilesX
- the number of tiles on XnumTilesY
- the number of tiles on Y- Returns:
- the tiles that contain data in the requested region
- Throws:
Exception
- exception
-
getInvalidTiles
Set<Tile> getInvalidTiles(int clipmapLevel, int tileX, int tileY, int numTilesX, int numTilesY) throws Exception Returns which tiles that should be marked as invalid and updated in the requested region.- Parameters:
clipmapLevel
- the clipmap leveltileX
- the tile abscissatileY
- the tile ordinatenumTilesX
- the number of tiles on XnumTilesY
- 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
Returns the contributing source id for the requested tile.- Parameters:
clipmapLevel
- the clipmap leveltile
- the tile- Returns:
- the contributing source id for the requested tile
-
getTile
Request for texture data for a tile.- Parameters:
clipmapLevel
- the clipmap leveltile
- the tile- Returns:
- the texture data for a tile
- Throws:
Exception
- exception
-