Class InMemoryTerrainSource
java.lang.Object
com.ardor3d.extension.terrain.providers.inmemory.InMemoryTerrainSource
- All Implemented Interfaces:
TerrainSource
-
Constructor Summary
ConstructorDescriptionInMemoryTerrainSource
(int tileSize, InMemoryTerrainData inMemoryTerrainData) -
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.
-
Constructor Details
-
InMemoryTerrainSource
-
-
Method Details
-
getConfiguration
Description copied from interface:TerrainSource
Called to initialize and setup the geometry clipmap terrain.- Specified by:
getConfiguration
in interfaceTerrainSource
- 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 interfaceTerrainSource
- 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
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 interfaceTerrainSource
- 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
Description copied from interface:TerrainSource
Returns the contributing source id for the requested tile.- Specified by:
getContributorId
in interfaceTerrainSource
- Parameters:
clipmapLevel
- the clipmap leveltile
- the tile- Returns:
- the contributor identifier
-
getTile
Description copied from interface:TerrainSource
Request for height data for a tile.- Specified by:
getTile
in interfaceTerrainSource
- Parameters:
clipmapLevel
- the clipmap leveltile
- the tile- Returns:
- the height data for this tile
- Throws:
Exception
- exception
-