NASA World Wind

gov.nasa.worldwind.render
Class SurfaceImage

java.lang.Object
  extended by gov.nasa.worldwind.render.SurfaceImage
All Implemented Interfaces:
Movable, PreRenderable, Renderable, SurfaceTile

public class SurfaceImage
extends Object
implements SurfaceTile, Renderable, PreRenderable, Movable

Renders a single image contained in a local file or BufferedImage


Field Summary
protected  List<LatLon> corners
           
protected  Extent extent
           
protected  WWTexture generatedTexture
           
protected  Object globeStateKey
           
protected  WWTexture sourceTexture
           
 
Constructor Summary
SurfaceImage(Object imageSource, Iterable<? extends LatLon> corners)
           
SurfaceImage(Object imageSource, Sector sector)
          Renders a single image tile from a local image source.
 
Method Summary
 void applyInternalTransform(DrawContext dc)
           
 boolean bind(DrawContext dc)
           
 boolean equals(Object o)
           
 List<LatLon> getCorners()
           
 Extent getExtent(DrawContext dc)
           
 Object getImageSource()
           
 double getOpacity()
           
 Position getReferencePosition()
           
 Sector getSector()
           
 int hashCode()
           
protected  void initializeGeometry(Iterable<? extends LatLon> corners)
           
protected  void initializeSourceTexture(Object imageSource)
           
protected  boolean isExtentValid(DrawContext dc)
           
protected  WWTexture makeGeneratedTexture(DrawContext dc)
           
 void move(Position delta)
          Shift the shape over the globe's surface while maintaining its original azimuth, its orientation relative to North.
 void moveTo(Position position)
          Move the shape over the globe's surface while maintaining its original azimuth, its orientation relative to North.
 void preRender(DrawContext dc)
           
 void render(DrawContext dc)
          Causes this Renderable to render itself using the DrawContext provided.
 void setCorners(Iterable<? extends LatLon> corners)
           
 void setOpacity(double opacity)
           
protected  void setReferencePosition(Position referencePosition)
           
protected  void setSector(Sector sector)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

corners

protected List<LatLon> corners

extent

protected Extent extent

generatedTexture

protected WWTexture generatedTexture

globeStateKey

protected Object globeStateKey

sourceTexture

protected WWTexture sourceTexture
Constructor Detail

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.
Method Detail

applyInternalTransform

public void applyInternalTransform(DrawContext dc)
Specified by:
applyInternalTransform in interface SurfaceTile

bind

public boolean bind(DrawContext dc)
Specified by:
bind in interface SurfaceTile

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)

NASA World Wind