|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.WWObjectImpl
gov.nasa.worldwind.render.SurfaceImage
public class SurfaceImage
Renders a single image contained in a local file, a remote file, or a BufferedImage.
SelectEvents and will not respond to the user's attempts at navigation when the cursor is
over the image. If this is not the desired behavior, disable picking for the layer containing the surface image.
| Field Summary | |
|---|---|
protected List<LatLon> |
corners
|
protected WWTexture |
generatedTexture
|
protected boolean |
generatedTextureExpired
|
protected Object |
imageSource
|
protected WWTexture |
previousGeneratedTexture
|
protected WWTexture |
previousSourceTexture
|
protected WWTexture |
sourceTexture
|
protected List<SurfaceImage> |
thisList
A list that contains only a reference to this instance. |
| Fields inherited from interface gov.nasa.worldwind.Exportable |
|---|
FORMAT_NOT_SUPPORTED, FORMAT_PARTIALLY_SUPPORTED, FORMAT_SUPPORTED |
| Constructor Summary | |
|---|---|
SurfaceImage()
Create a new surface image with no image source. |
|
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 textureIdentityActive)
|
boolean |
bind(DrawContext dc)
|
void |
dispose()
Disposes of any internal resources allocated by the object. |
boolean |
equals(Object o)
|
void |
export(String mimeType,
Object output)
Export the Surface Image. |
protected void |
exportAsKML(Object output)
Export the surface image to KML as a <GroundOverlay> element. |
protected void |
exportKMLLatLonBox(XMLStreamWriter xmlWriter)
|
protected void |
exportKMLLatLonQuad(XMLStreamWriter xmlWriter)
|
List<LatLon> |
getCorners()
|
Extent |
getExtent(DrawContext dc)
|
Object |
getImageSource()
|
double |
getOpacity()
|
Position |
getReferencePosition()
A position associated with the object that indicates its aggregate geographic position. |
Sector |
getSector()
|
int |
hashCode()
|
protected WWTexture |
initializeGeneratedTexture(DrawContext dc)
|
protected void |
initializeGeometry(Iterable<? extends LatLon> corners)
|
protected void |
initializeSourceTexture(DrawContext dc)
|
String |
isExportFormatSupported(String format)
Does this object support a certain export format? |
boolean |
isPickEnabled()
|
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 provided draw context. |
void |
setCorners(Iterable<? extends LatLon> corners)
|
void |
setImageSource(Object imageSource,
Iterable<? extends LatLon> corners)
|
void |
setImageSource(Object imageSource,
Sector sector)
|
void |
setOpacity(double opacity)
|
void |
setPickEnabled(boolean pickEnabled)
|
protected void |
setReferencePosition(Position referencePosition)
|
| Methods inherited from class gov.nasa.worldwind.WWObjectImpl |
|---|
onMessage, propertyChange |
| Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
|---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface gov.nasa.worldwind.avlist.AVList |
|---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
| Field Detail |
|---|
protected List<LatLon> corners
protected WWTexture generatedTexture
protected boolean generatedTextureExpired
protected Object imageSource
protected WWTexture previousGeneratedTexture
protected WWTexture previousSourceTexture
protected WWTexture sourceTexture
protected List<SurfaceImage> thisList
| Constructor Detail |
|---|
public SurfaceImage()
public SurfaceImage(Object imageSource,
Iterable<? extends LatLon> corners)
public SurfaceImage(Object imageSource,
Sector sector)
imageSource - either the file path to a local image or a BufferedImage reference.sector - the sector covered by the image.| Method Detail |
|---|
public void applyInternalTransform(DrawContext dc,
boolean textureIdentityActive)
applyInternalTransform in interface SurfaceTilepublic boolean bind(DrawContext dc)
bind in interface SurfaceTilepublic void dispose()
Disposable
dispose in interface Disposablepublic boolean equals(Object o)
equals in class Object
public void export(String mimeType,
Object output)
throws IOException
output object will receive the exported data. The type of this object
depends on the export format. The formats and object types supported by this class are:
Format Supported output object types
================================================================================
KML (application/vnd.google-earth.kml+xml) java.io.Writer
java.io.OutputStream
javax.xml.stream.XMLStreamWriter
export in interface ExportablemimeType - MIME type of desired export format.output - An object that will receive the exported data. The type of this object depends on the export
format (see above).
IOException - If an exception occurs writing to the output object.Exportable.isExportFormatSupported(String)
protected void exportAsKML(Object output)
throws IOException,
XMLStreamException
<GroundOverlay> element. The output object will receive the
data. This object must be one of: java.io.Writer java.io.OutputStream javax.xml.stream.XMLStreamWriter
output - Object to receive the generated KML.
XMLStreamException - If an exception occurs while writing the KML
IOException - if an exception occurs while exporting the data.export(String, Object)
protected void exportKMLLatLonBox(XMLStreamWriter xmlWriter)
throws XMLStreamException
XMLStreamException
protected void exportKMLLatLonQuad(XMLStreamWriter xmlWriter)
throws XMLStreamException
XMLStreamExceptionpublic List<LatLon> getCorners()
getCorners in interface SurfaceTilepublic Extent getExtent(DrawContext dc)
getExtent in interface SurfaceTilepublic Object getImageSource()
public double getOpacity()
public Position getReferencePosition()
Movable
getReferencePosition in interface Movablepublic Sector getSector()
getSector in interface SurfaceTilepublic int hashCode()
hashCode in class Objectprotected WWTexture initializeGeneratedTexture(DrawContext dc)
protected void initializeGeometry(Iterable<? extends LatLon> corners)
protected void initializeSourceTexture(DrawContext dc)
public String isExportFormatSupported(String format)
isExportFormatSupported in interface Exportableformat - Desired export format.
Exportable.FORMAT_SUPPORTED, Exportable.FORMAT_NOT_SUPPORTED, or Exportable.FORMAT_PARTIALLY_SUPPORTED.Exportable.export(String, Object)public boolean isPickEnabled()
public void move(Position delta)
Movable
move in interface Movabledelta - the latitude and longitude to add to the shape's reference position.public void moveTo(Position position)
Movable
moveTo in interface Movableposition - the new position of the shape's reference position.public void preRender(DrawContext dc)
preRender in interface PreRenderablepublic void render(DrawContext dc)
RenderableRenderable to render itself using the provided draw context.
render in interface Renderabledc - the DrawContext to be usedDrawContextpublic void setCorners(Iterable<? extends LatLon> corners)
public void setImageSource(Object imageSource,
Iterable<? extends LatLon> corners)
public void setImageSource(Object imageSource,
Sector sector)
public void setOpacity(double opacity)
public void setPickEnabled(boolean pickEnabled)
protected void setReferencePosition(Position referencePosition)
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||