gov.nasa.worldwind.render
Class SurfaceImage
java.lang.Object
gov.nasa.worldwind.render.SurfaceImage
- All Implemented Interfaces:
- Disposable, Movable, PreRenderable, Renderable, SurfaceTile
public class SurfaceImage - extends Object
- implements SurfaceTile, Renderable, PreRenderable, Movable, Disposable
Renders a single image contained in a local file or BufferedImage
corners
protected List<LatLon> corners
extent
protected Extent extent
generatedTexture
protected WWTexture generatedTexture
globeStateKey
protected Object globeStateKey
sourceTexture
protected WWTexture sourceTexture
SurfaceImage
public SurfaceImage(Object imageSource,
Iterable<? extends LatLon> corners)
SurfaceImage
public SurfaceImage(Object imageSource,
Sector sector)
- Renders a single image tile from a local image source.
- Parameters:
imageSource - either the file path to a local image or a BufferedImage reference.sector - the sector covered by the image.
applyInternalTransform
public void applyInternalTransform(DrawContext dc)
- Specified by:
applyInternalTransform in interface SurfaceTile
bind
public boolean bind(DrawContext dc)
- Specified by:
bind in interface SurfaceTile
dispose
public void dispose()
- Specified by:
dispose in interface Disposable
equals
public boolean equals(Object o)
- Overrides:
equals in class Object
getCorners
public List<LatLon> getCorners()
- Specified by:
getCorners in interface SurfaceTile
getExtent
public Extent getExtent(DrawContext dc)
- Specified by:
getExtent in interface SurfaceTile
getImageSource
public Object getImageSource()
getOpacity
public double getOpacity()
getReferencePosition
public Position getReferencePosition()
- Specified by:
getReferencePosition in interface Movable
getSector
public Sector getSector()
- Specified by:
getSector in interface SurfaceTile
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
initializeGeometry
protected void initializeGeometry(Iterable<? extends LatLon> corners)
initializeSourceTexture
protected void initializeSourceTexture(Object imageSource)
isExtentValid
protected boolean isExtentValid(DrawContext dc)
makeGeneratedTexture
protected WWTexture makeGeneratedTexture(DrawContext dc)
move
public void move(Position delta)
- Description copied from interface:
Movable
- Shift the shape over the globe's surface while maintaining its original azimuth, its orientation relative to
North.
- Specified by:
move in interface Movable
- Parameters:
delta - the latitude and longitude to add to the shape's reference position.
moveTo
public void moveTo(Position position)
- Description copied from interface:
Movable
- Move the shape over the globe's surface while maintaining its original azimuth, its orientation relative to
North.
- Specified by:
moveTo in interface Movable
- Parameters:
position - the new position of the shape's reference position.
preRender
public void preRender(DrawContext dc)
- Specified by:
preRender in interface PreRenderable
render
public void render(DrawContext dc)
- Description copied from interface:
Renderable
- Causes this
Renderable to render itself using the DrawContext provided. The
DrawContext provides the elevation model, openGl instance, globe and other information required for
drawing. It is recommended that the DrawContext is non-null as most implementations do not support
null DrawContexts.
- Specified by:
render in interface Renderable
- Parameters:
dc - the DrawContext to be used- See Also:
DrawContext
setCorners
public void setCorners(Iterable<? extends LatLon> corners)
setOpacity
public void setOpacity(double opacity)
setReferencePosition
protected void setReferencePosition(Position referencePosition)
setSector
protected void setSector(Sector sector)
|