public class SurfaceImage extends WWObjectImpl implements SurfaceTile, Renderable, PreRenderable, Movable, Disposable, Exportable
BufferedImage.
Note: The view input handlers detect the surface image rather than the terrain as the top picked object in 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.| Modifier and Type | Field and Description |
|---|---|
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.
|
FORMAT_NOT_SUPPORTED, FORMAT_PARTIALLY_SUPPORTED, FORMAT_SUPPORTED| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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) |
onMessage, propertyChangeaddPropertyChangeListener, 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, setValuesclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValuesprotected WWTexture generatedTexture
protected boolean generatedTextureExpired
protected Object imageSource
protected WWTexture previousGeneratedTexture
protected WWTexture previousSourceTexture
protected WWTexture sourceTexture
protected List<SurfaceImage> thisList
public SurfaceImage()
public void applyInternalTransform(DrawContext dc, boolean textureIdentityActive)
applyInternalTransform in interface SurfaceTilepublic boolean bind(DrawContext dc)
bind in interface SurfaceTilepublic void dispose()
Disposabledispose in interface Disposablepublic 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.XMLStreamWriteroutput - Object to receive the generated KML.XMLStreamException - If an exception occurs while writing the KMLIOException - if an exception occurs while exporting the data.export(String, Object)protected void exportKMLLatLonBox(XMLStreamWriter xmlWriter) throws XMLStreamException
XMLStreamExceptionprotected 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()
MovablegetReferencePosition in interface Movablepublic Sector getSector()
getSector in interface SurfaceTileprotected WWTexture initializeGeneratedTexture(DrawContext dc)
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)
Movablepublic void moveTo(Position position)
Movablepublic 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 setOpacity(double opacity)
public void setPickEnabled(boolean pickEnabled)
protected void setReferencePosition(Position referencePosition)