NASA World Wind

gov.nasa.worldwind.ogc.kml.impl
Class KMLSurfaceImageImpl

java.lang.Object
  extended by gov.nasa.worldwind.avlist.AVListImpl
      extended by gov.nasa.worldwind.WWObjectImpl
          extended by gov.nasa.worldwind.render.SurfaceImage
              extended by gov.nasa.worldwind.ogc.kml.impl.KMLSurfaceImageImpl
All Implemented Interfaces:
AVList, Disposable, MessageListener, Exportable, Movable, KMLRenderable, PreRenderable, Renderable, SurfaceTile, WWObject, PropertyChangeListener, EventListener

public class KMLSurfaceImageImpl
extends SurfaceImage
implements KMLRenderable


Field Summary
protected  boolean attributesResolved
           
protected  long iconRetrievalTime
          Indicates the time at which the image source was specified.
protected  boolean mustApplyRotation
          Flag to indicate the rotation must be applied to the SurfaceImage.
protected  KMLGroundOverlay parent
           
protected  boolean textureResolved
          Indicates that the source texture has been resolved and loaded.
 
Fields inherited from class gov.nasa.worldwind.render.SurfaceImage
corners, generatedTexture, generatedTextureExpired, imageSource, previousGeneratedTexture, previousSourceTexture, sourceTexture, thisList
 
Fields inherited from interface gov.nasa.worldwind.Exportable
FORMAT_NOT_SUPPORTED, FORMAT_PARTIALLY_SUPPORTED, FORMAT_SUPPORTED
 
Constructor Summary
KMLSurfaceImageImpl(KMLTraversalContext tc, KMLGroundOverlay overlay)
          Create an screen image.
 
Method Summary
protected  void applyRotation(DrawContext dc)
          Apply a rotation to the corner points of the overlay.
protected  boolean mustResolveHref()
          Indicates whether or not the image source needs to be resolved.
 void preRender(KMLTraversalContext tc, DrawContext dc)
          Pre-render this element.
 void render(KMLTraversalContext tc, DrawContext dc)
          Render this element.
protected  String resolveHref()
          Resolve the HREF in this overlay's Icon element against the KML root.
 
Methods inherited from class gov.nasa.worldwind.render.SurfaceImage
applyInternalTransform, bind, dispose, equals, export, exportAsKML, exportKMLLatLonBox, exportKMLLatLonQuad, getCorners, getExtent, getImageSource, getOpacity, getReferencePosition, getSector, hashCode, initializeGeneratedTexture, initializeGeometry, initializeSourceTexture, isExportFormatSupported, isPickEnabled, move, moveTo, preRender, render, setCorners, setImageSource, setImageSource, setOpacity, setPickEnabled, setReferencePosition
 
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.event.MessageListener
onMessage
 
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

attributesResolved

protected boolean attributesResolved

iconRetrievalTime

protected long iconRetrievalTime
Indicates the time at which the image source was specified.


mustApplyRotation

protected boolean mustApplyRotation
Flag to indicate the rotation must be applied to the SurfaceImage. Rotation is applied the first time that the image is rendered.


parent

protected KMLGroundOverlay parent

textureResolved

protected boolean textureResolved
Indicates that the source texture has been resolved and loaded.

Constructor Detail

KMLSurfaceImageImpl

public KMLSurfaceImageImpl(KMLTraversalContext tc,
                           KMLGroundOverlay overlay)
Create an screen image.

Parameters:
tc - the current KMLTraversalContext.
overlay - the Overlay element containing.
Throws:
NullPointerException - if the traversal context is null.
IllegalArgumentException - if the parent overlay or the traversal context is null.
Method Detail

applyRotation

protected void applyRotation(DrawContext dc)
Apply a rotation to the corner points of the overlay.

Parameters:
dc - Current draw context.

mustResolveHref

protected boolean mustResolveHref()
Indicates whether or not the image source needs to be resolved. The source needs to be resolved when the KMLIcon is updated.

Returns:
True if the image source must be resolved.

preRender

public void preRender(KMLTraversalContext tc,
                      DrawContext dc)
Description copied from interface: KMLRenderable
Pre-render this element.

Specified by:
preRender in interface KMLRenderable
Parameters:
tc - the current KML traversal context.
dc - the current draw context.

render

public void render(KMLTraversalContext tc,
                   DrawContext dc)
Render this element.

Specified by:
render in interface KMLRenderable
Parameters:
tc - the current KML traversal context.
dc - the current draw context.

resolveHref

protected String resolveHref()
Resolve the HREF in this overlay's Icon element against the KML root.

Returns:
The resolved path to the image source.

NASA World Wind