gov.nasa.worldwind.render
Class TiledSurfaceObjectRenderer
java.lang.Object
gov.nasa.worldwind.render.TiledSurfaceObjectRenderer
public class TiledSurfaceObjectRenderer
- extends Object
|
Method Summary |
protected void |
addSurfaceObject(DrawContext dc,
SurfaceObject surfaceObject)
|
protected void |
addTile(DrawContext dc,
TextureTile tile)
|
protected void |
addTileOrDescendants(DrawContext dc,
TextureTile tile)
|
protected void |
assemblePickTile(DrawContext dc)
|
protected void |
assembleSurfaceObjects(DrawContext dc)
|
protected void |
assembleTiles(DrawContext dc)
|
protected TextureTile[] |
assembleTopLevelTiles(LevelSet levelSet,
Sector sector)
|
protected void |
beginRendering(DrawContext dc,
OGLStackHandler stackHandler)
|
protected void |
beginUpdateTiles(DrawContext dc,
OGLStackHandler stackHandler)
|
protected PickedObject |
bindPickableObject(DrawContext dc,
Object userObject,
Object objectId)
|
protected void |
clearSurfaceObjects(DrawContext dc)
|
protected void |
clearTiles(DrawContext dc)
|
protected Sector |
computeCurrentBoundingSector()
|
protected void |
copyFramebufferContentsToTile(DrawContext dc,
TextureTile tile,
int width,
int height,
boolean useMipmaps)
|
protected TextureData |
createTileTextureData(int width,
int height,
boolean useMipmaps)
|
protected static String |
createUniqueCacheId()
|
protected void |
draw(DrawContext dc,
boolean isPickCall)
|
protected void |
drawPickTiles(DrawContext dc)
|
protected void |
drawRenderTiles(DrawContext dc)
|
protected void |
drawTiles(DrawContext dc,
boolean isPickCall)
|
protected void |
endRendering(DrawContext dc,
OGLStackHandler stackHandler)
|
protected void |
endUpdateTiles(DrawContext dc,
OGLStackHandler stackHandler)
|
protected TiledSurfaceObjectRenderer.SurfaceObjectState |
getCurrentStateFor(Sector sector)
|
protected TextureTile |
getIntersectingTile(Angle latitude,
Angle longitude,
Iterable<? extends TextureTile> tiles)
|
protected Vec4 |
getNearestPointInSector(DrawContext dc,
Sector sector)
|
protected Position |
getPickedTerrainPosition(DrawContext dc)
|
Iterable<? extends SurfaceObject> |
getSurfaceObjects()
|
double |
getTexelToPixelRatio()
Returns the surface object texel to screen pixel ratio. |
Color |
getTileBackgroundColor()
|
protected TextureTile |
getTileFromMemoryCache(TileKey tileKey)
|
protected TiledSurfaceObjectRenderer.SurfaceObjectState |
getTileState(TextureTile tile)
|
protected PickedObject |
getTopPickedSurfaceObject(DrawContext dc,
Point pickPoint)
|
protected static AVList |
initParams(AVList params)
|
boolean |
isPickEnabled()
|
boolean |
isShowTileOutlines()
|
protected boolean |
isTileCurrent(DrawContext dc,
TextureTile tile,
TiledSurfaceObjectRenderer.SurfaceObjectState state)
|
protected boolean |
isTileMeetsRenderCriteria(DrawContext dc,
Tile tile)
|
protected boolean |
isTileNeeded(DrawContext dc,
Tile tile)
|
protected boolean |
isTileVisible(DrawContext dc,
SurfaceTile tile)
|
boolean |
isUseMipmaps()
|
protected boolean |
needToSubdivide(DrawContext dc,
Sector sector,
int width,
int height)
|
protected static long |
nextUniqueId()
|
void |
pick(DrawContext dc,
Point pickPoint,
Layer layer)
|
void |
preRender(DrawContext dc)
|
void |
render(DrawContext dc)
|
protected void |
resolvePick(DrawContext dc,
Point pickPoint,
Layer layer)
|
void |
setPickEnabled(boolean enabled)
|
void |
setShowTileOutlines(boolean show)
|
void |
setSurfaceObjects(Iterable<? extends SurfaceObject> objects)
|
void |
setTexelToPixelRatio(double ratio)
Sets the surface object texel to screen pixel ratio. |
void |
setTileBackgroundColor(Color color)
|
protected void |
setTileState(TextureTile tile,
TiledSurfaceObjectRenderer.SurfaceObjectState state)
|
protected int[] |
setupRenderToTexture(DrawContext dc,
int width,
int height)
|
void |
setUseMipmaps(boolean useMipmaps)
|
protected void |
updatePickTile(DrawContext dc,
TiledSurfaceObjectRenderer.PickTile tile)
|
protected void |
updatePickTileData(DrawContext dc,
TiledSurfaceObjectRenderer.PickTile tile)
|
protected void |
updateTile(DrawContext dc,
TextureTile tile)
|
protected void |
updateTileData(DrawContext dc,
TextureTile tile,
TiledSurfaceObjectRenderer.SurfaceObjectState state)
|
protected void |
updateTiles(DrawContext dc)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
currentBoundingSector
protected Sector currentBoundingSector
currentSurfaceObjects
protected List<TiledSurfaceObjectRenderer.SurfaceObjectInfo> currentSurfaceObjects
currentTiles
protected List<TextureTile> currentTiles
DEFAULT_NUM_EMPTY_LEVELS
protected static final int DEFAULT_NUM_EMPTY_LEVELS
- See Also:
- Constant Field Values
DEFAULT_NUM_LEVELS
protected static final int DEFAULT_NUM_LEVELS
- See Also:
- Constant Field Values
DEFAULT_PICK_ENABLED
protected static final boolean DEFAULT_PICK_ENABLED
- See Also:
- Constant Field Values
DEFAULT_SECTOR
protected static final Sector DEFAULT_SECTOR
DEFAULT_SHOW_TILE_OUTLINES
protected static final boolean DEFAULT_SHOW_TILE_OUTLINES
- See Also:
- Constant Field Values
DEFAULT_TEXEL_TO_PIXEL_RATIO
protected static final double DEFAULT_TEXEL_TO_PIXEL_RATIO
- See Also:
- Constant Field Values
DEFAULT_TILE_BACKGROUND_COLOR
protected static final Color DEFAULT_TILE_BACKGROUND_COLOR
DEFAULT_TILE_COUNT_NAME
protected static final String DEFAULT_TILE_COUNT_NAME
- See Also:
- Constant Field Values
DEFAULT_TILE_DELTA
protected static final LatLon DEFAULT_TILE_DELTA
DEFAULT_TILE_HEIGHT
protected static final int DEFAULT_TILE_HEIGHT
- See Also:
- Constant Field Values
DEFAULT_TILE_WIDTH
protected static final int DEFAULT_TILE_WIDTH
- See Also:
- Constant Field Values
DEFAULT_USE_MIPMAPS
protected static final boolean DEFAULT_USE_MIPMAPS
- See Also:
- Constant Field Values
havePickTile
protected boolean havePickTile
levelSet
protected LevelSet levelSet
pickEnabled
protected boolean pickEnabled
pickSupport
protected PickSupport pickSupport
pickTile
protected TiledSurfaceObjectRenderer.PickTile pickTile
renderToTextureSupport
protected OGLOrtho2DSupport renderToTextureSupport
showTileOutlines
protected boolean showTileOutlines
surfaceObjectIterable
protected Iterable<? extends SurfaceObject> surfaceObjectIterable
texelToPixelRatio
protected double texelToPixelRatio
tileBackgroundColor
protected Color tileBackgroundColor
tileCountName
protected String tileCountName
tileStateMap
protected Map<TileKey,TiledSurfaceObjectRenderer.SurfaceObjectState> tileStateMap
uniqueId
protected static long uniqueId
useMipmaps
protected boolean useMipmaps
TiledSurfaceObjectRenderer
public TiledSurfaceObjectRenderer()
TiledSurfaceObjectRenderer
public TiledSurfaceObjectRenderer(AVList params)
TiledSurfaceObjectRenderer
public TiledSurfaceObjectRenderer(LevelSet levelSet)
addSurfaceObject
protected void addSurfaceObject(DrawContext dc,
SurfaceObject surfaceObject)
addTile
protected void addTile(DrawContext dc,
TextureTile tile)
addTileOrDescendants
protected void addTileOrDescendants(DrawContext dc,
TextureTile tile)
assemblePickTile
protected void assemblePickTile(DrawContext dc)
assembleSurfaceObjects
protected void assembleSurfaceObjects(DrawContext dc)
assembleTiles
protected void assembleTiles(DrawContext dc)
assembleTopLevelTiles
protected TextureTile[] assembleTopLevelTiles(LevelSet levelSet,
Sector sector)
beginRendering
protected void beginRendering(DrawContext dc,
OGLStackHandler stackHandler)
beginUpdateTiles
protected void beginUpdateTiles(DrawContext dc,
OGLStackHandler stackHandler)
bindPickableObject
protected PickedObject bindPickableObject(DrawContext dc,
Object userObject,
Object objectId)
clearSurfaceObjects
protected void clearSurfaceObjects(DrawContext dc)
clearTiles
protected void clearTiles(DrawContext dc)
computeCurrentBoundingSector
protected Sector computeCurrentBoundingSector()
copyFramebufferContentsToTile
protected void copyFramebufferContentsToTile(DrawContext dc,
TextureTile tile,
int width,
int height,
boolean useMipmaps)
createTileTextureData
protected TextureData createTileTextureData(int width,
int height,
boolean useMipmaps)
createUniqueCacheId
protected static String createUniqueCacheId()
draw
protected void draw(DrawContext dc,
boolean isPickCall)
drawPickTiles
protected void drawPickTiles(DrawContext dc)
drawRenderTiles
protected void drawRenderTiles(DrawContext dc)
drawTiles
protected void drawTiles(DrawContext dc,
boolean isPickCall)
endRendering
protected void endRendering(DrawContext dc,
OGLStackHandler stackHandler)
endUpdateTiles
protected void endUpdateTiles(DrawContext dc,
OGLStackHandler stackHandler)
getCurrentStateFor
protected TiledSurfaceObjectRenderer.SurfaceObjectState getCurrentStateFor(Sector sector)
getIntersectingTile
protected TextureTile getIntersectingTile(Angle latitude,
Angle longitude,
Iterable<? extends TextureTile> tiles)
getNearestPointInSector
protected Vec4 getNearestPointInSector(DrawContext dc,
Sector sector)
getPickedTerrainPosition
protected Position getPickedTerrainPosition(DrawContext dc)
getSurfaceObjects
public Iterable<? extends SurfaceObject> getSurfaceObjects()
getTexelToPixelRatio
public double getTexelToPixelRatio()
- Returns the surface object texel to screen pixel ratio. See {#linkÊsetPixelToTexelRatio(double} for a description
of this value's meaning.
- Returns:
- surface object texel to screen pixel ratio.
getTileBackgroundColor
public Color getTileBackgroundColor()
getTileFromMemoryCache
protected TextureTile getTileFromMemoryCache(TileKey tileKey)
getTileState
protected TiledSurfaceObjectRenderer.SurfaceObjectState getTileState(TextureTile tile)
getTopPickedSurfaceObject
protected PickedObject getTopPickedSurfaceObject(DrawContext dc,
Point pickPoint)
initParams
protected static AVList initParams(AVList params)
isPickEnabled
public boolean isPickEnabled()
isShowTileOutlines
public boolean isShowTileOutlines()
isTileCurrent
protected boolean isTileCurrent(DrawContext dc,
TextureTile tile,
TiledSurfaceObjectRenderer.SurfaceObjectState state)
isTileMeetsRenderCriteria
protected boolean isTileMeetsRenderCriteria(DrawContext dc,
Tile tile)
isTileNeeded
protected boolean isTileNeeded(DrawContext dc,
Tile tile)
isTileVisible
protected boolean isTileVisible(DrawContext dc,
SurfaceTile tile)
isUseMipmaps
public boolean isUseMipmaps()
needToSubdivide
protected boolean needToSubdivide(DrawContext dc,
Sector sector,
int width,
int height)
nextUniqueId
protected static long nextUniqueId()
pick
public void pick(DrawContext dc,
Point pickPoint,
Layer layer)
preRender
public void preRender(DrawContext dc)
render
public void render(DrawContext dc)
resolvePick
protected void resolvePick(DrawContext dc,
Point pickPoint,
Layer layer)
setPickEnabled
public void setPickEnabled(boolean enabled)
setShowTileOutlines
public void setShowTileOutlines(boolean show)
setSurfaceObjects
public void setSurfaceObjects(Iterable<? extends SurfaceObject> objects)
setTexelToPixelRatio
public void setTexelToPixelRatio(double ratio)
- Sets the surface object texel to screen pixel ratio.
-
If
ratio is 1, the renderer will attempt to create tiles whose texels have approximately the same
size as a screen pixel.
-
If
ratio is less than 1, the renderer will attempt to create tiles whose texels are smaller than
a screen pixel. For example, specifying ratio=0.5 indicates that a surface object texel should be half the size
of a screen pixel.
-
If
ratio is greater than 1, the renderer will attempt to create tiles whose texels are larger than
a screen pixel. For example, specifying ratio=2 indicates that a surface object texel should be twice the size of
a screen pixel.
- Parameters:
ratio - surface object texel to screen pixel ratio.
- Throws:
IllegalArgumentException - if ratio is less than or equal to zero.
setTileBackgroundColor
public void setTileBackgroundColor(Color color)
setTileState
protected void setTileState(TextureTile tile,
TiledSurfaceObjectRenderer.SurfaceObjectState state)
setupRenderToTexture
protected int[] setupRenderToTexture(DrawContext dc,
int width,
int height)
setUseMipmaps
public void setUseMipmaps(boolean useMipmaps)
updatePickTile
protected void updatePickTile(DrawContext dc,
TiledSurfaceObjectRenderer.PickTile tile)
updatePickTileData
protected void updatePickTileData(DrawContext dc,
TiledSurfaceObjectRenderer.PickTile tile)
updateTile
protected void updateTile(DrawContext dc,
TextureTile tile)
updateTileData
protected void updateTileData(DrawContext dc,
TextureTile tile,
TiledSurfaceObjectRenderer.SurfaceObjectState state)
updateTiles
protected void updateTiles(DrawContext dc)