Interface TerrainSource
- All Known Implementing Classes:
ArrayTerrainSource
,InMemoryTerrainSource
,ProceduralTerrainSource
,SimpleArrayTerrainSource
public interface TerrainSource
Feeds terrain data to a TerrainCache
-
Method Summary
Modifier and TypeMethodDescriptionCalled to initialize and setup the geometry clipmap terrain.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.float[]
Request for height 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 geometry clipmap terrain.- Returns:
- TerrainConfiguration
- 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 abscissa of the tiletileY
- the ordinate of the tilenumTilesX
- 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 abscissa of the tiletileY
- the ordinate of the tilenumTilesX
- 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 contributor identifier
-
getTile
Request for height data for a tile.- Parameters:
clipmapLevel
- the clipmap leveltile
- the tile- Returns:
- the height data for this tile
- Throws:
Exception
- exception
-