public class TextureTile extends Tile implements SurfaceTile
Modifier and Type | Field and Description |
---|---|
protected boolean |
hasMipmapData |
protected AtomicLong |
updateTime |
Constructor and Description |
---|
TextureTile(Sector sector) |
TextureTile(Sector sector,
Level level,
int row,
int col) |
TextureTile(Sector sector,
Level level,
int row,
int column,
String cacheName) |
Modifier and Type | Method and Description |
---|---|
void |
applyInternalTransform(DrawContext dc,
boolean textureIdentityActive) |
protected void |
applyResourceTextureTransform(DrawContext dc) |
boolean |
bind(DrawContext dc) |
protected TextureTile |
createSubTile(Sector sector,
Level level,
int row,
int col)
|
protected TileKey |
createSubTileKey(Level level,
int row,
int col)
Returns a key for a sub tile of this texture tile with the specified
Level , row,
and column. |
TextureTile[] |
createSubTiles(Level nextLevel)
Splits this texture tile into four tiles; one for each sub quadrant of this texture tile.
|
boolean |
equals(Object o) |
Vec4 |
getCentroidPoint(Globe globe) |
List<? extends LatLon> |
getCorners() |
Extent |
getExtent(DrawContext dc) |
TextureTile |
getFallbackTile() |
static MemoryCache |
getMemoryCache()
Returns the memory cache used to cache tiles for this class and its subclasses, initializing the cache if it
doesn't yet exist.
|
long |
getSizeInBytes()
Retrieves the approximate size of this object in bytes.
|
Texture |
getTexture(GpuResourceCache tc) |
TextureData |
getTextureData()
Returns the texture data most recently specified for the tile.
|
protected TextureTile |
getTileFromMemoryCache(TileKey tileKey) |
long |
getUpdateTime() |
int |
hashCode() |
protected Texture |
initializeTexture(DrawContext dc) |
boolean |
isTextureExpired() |
boolean |
isTextureExpired(long expiryTime) |
boolean |
isTextureInMemory(GpuResourceCache tc) |
void |
setFallbackTile(TextureTile fallbackTile) |
void |
setTexture(GpuResourceCache tc,
Texture texture) |
void |
setTextureData(TextureData textureData)
Specifies new texture data for the tile.
|
protected void |
setTextureParameters(DrawContext dc,
Texture t) |
String |
toString() |
protected void |
updateMemoryCache() |
compareTo, computeColumn, computeColumnLongitude, computeRow, computeRowLatitude, getCacheName, getColumn, getFormatSuffix, getHeight, getLabel, getLevel, getLevelName, getLevelNumber, getPath, getPathBase, getPriority, getResourceURL, getResourceURL, getRow, getSector, getTileKey, getWidth, setPriority
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getSector
protected boolean hasMipmapData
protected AtomicLong updateTime
public TextureTile(Sector sector)
public void applyInternalTransform(DrawContext dc, boolean textureIdentityActive)
applyInternalTransform
in interface SurfaceTile
protected void applyResourceTextureTransform(DrawContext dc)
public boolean bind(DrawContext dc)
bind
in interface SurfaceTile
protected TextureTile createSubTile(Sector sector, Level level, int row, int col)
Sector
, Level
, row, and column. This is called by createSubTiles(gov.nasa.worldwind.util.Level)
,
to construct a sub tile for each quadrant of this tile. Subclasses must override this method to return an
instance of the derived version.sector
- the sub tile's sector.level
- the sub tile's level.row
- the sub tile's row.col
- the sub tile's column.protected TileKey createSubTileKey(Level level, int row, int col)
Level
, row,
and column. This is called by createSubTiles(gov.nasa.worldwind.util.Level)
, to create a sub tile key
for each quadrant of this tile.level
- the sub tile's level.row
- the sub tile's row.col
- the sub tile's column.public TextureTile[] createSubTiles(Level nextLevel)
createSubTile(gov.nasa.worldwind.geom.Sector,
gov.nasa.worldwind.util.Level, int, int)
to create sub tiles not found in the cache.nextLevel
- the level for the sub tiles.IllegalArgumentException
- if the level is null.public List<? extends LatLon> getCorners()
getCorners
in interface SurfaceTile
public Extent getExtent(DrawContext dc)
getExtent
in interface SurfaceTile
public TextureTile getFallbackTile()
public static MemoryCache getMemoryCache()
public long getSizeInBytes()
Cacheable
getSizeInBytes
in interface Cacheable
getSizeInBytes
in class Tile
Cacheable
object's size in bytespublic Texture getTexture(GpuResourceCache tc)
public TextureData getTextureData()
protected TextureTile getTileFromMemoryCache(TileKey tileKey)
public long getUpdateTime()
protected Texture initializeTexture(DrawContext dc)
public boolean isTextureExpired()
public boolean isTextureExpired(long expiryTime)
public boolean isTextureInMemory(GpuResourceCache tc)
public void setFallbackTile(TextureTile fallbackTile)
public void setTexture(GpuResourceCache tc, Texture texture)
public void setTextureData(TextureData textureData)
textureData
- the texture data, which may be null.protected void setTextureParameters(DrawContext dc, Texture t)
protected void updateMemoryCache()