NASA World Wind

gov.nasa.worldwind.data
Class MipMappedBufferedImageRaster

java.lang.Object
  extended by gov.nasa.worldwind.avlist.AVListImpl
      extended by gov.nasa.worldwind.data.AbstractDataRaster
          extended by gov.nasa.worldwind.data.BufferedImageRaster
              extended by gov.nasa.worldwind.data.MipMappedBufferedImageRaster
All Implemented Interfaces:
AVList, Cacheable, DataRaster, Disposable

public class MipMappedBufferedImageRaster
extends BufferedImageRaster


Field Summary
protected  BufferedImageRaster[] levelRasters
           
 
Fields inherited from class gov.nasa.worldwind.data.AbstractDataRaster
height, width
 
Constructor Summary
MipMappedBufferedImageRaster(Sector sector, BufferedImage image)
          Creates a mipmapped version of a BufferedImageRaster from a single BufferedImage instance.
MipMappedBufferedImageRaster(Sector sector, BufferedImage[] images)
          Creates a mipmapped version of a BufferedImageRaster from multi-resolution array od BufferedImage instances.
 
Method Summary
protected  BufferedImageRaster chooseRasterForCanvas(BufferedImageRaster canvas)
           
protected  int computeMipmapLevel(int sourceWidth, int sourceHeight, Sector sourceSector, int destWidth, int destHeight, Sector destSector)
           
 void dispose()
          Disposes of any internal resources allocated by the object.
protected  void doDrawOnTo(BufferedImageRaster canvas)
           
 long getSizeInBytes()
          Retrieves the approximate size of this object in bytes.
 
Methods inherited from class gov.nasa.worldwind.data.BufferedImageRaster
drawOnTo, fill, getBufferedImage, getGraphics, wrap, wrapAsGeoreferencedRaster
 
Methods inherited from class gov.nasa.worldwind.data.AbstractDataRaster
computeClipRect, computeGeographicToRasterTransform, computeSourceToDestTransform, getHeight, getSector, getSubRaster, getSubRaster, getWidth, setValue
 
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, setValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, 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, setValues
 

Field Detail

levelRasters

protected BufferedImageRaster[] levelRasters
Constructor Detail

MipMappedBufferedImageRaster

public MipMappedBufferedImageRaster(Sector sector,
                                    BufferedImage image)
Creates a mipmapped version of a BufferedImageRaster from a single BufferedImage instance.

Parameters:
sector - A sector
image - BufferedImage

MipMappedBufferedImageRaster

public MipMappedBufferedImageRaster(Sector sector,
                                    BufferedImage[] images)
Creates a mipmapped version of a BufferedImageRaster from multi-resolution array od BufferedImage instances.

Parameters:
sector - A sector
images - An array of BufferedImages
Method Detail

chooseRasterForCanvas

protected BufferedImageRaster chooseRasterForCanvas(BufferedImageRaster canvas)

computeMipmapLevel

protected int computeMipmapLevel(int sourceWidth,
                                 int sourceHeight,
                                 Sector sourceSector,
                                 int destWidth,
                                 int destHeight,
                                 Sector destSector)

dispose

public void dispose()
Description copied from interface: Disposable
Disposes of any internal resources allocated by the object.

Specified by:
dispose in interface Disposable
Overrides:
dispose in class BufferedImageRaster

doDrawOnTo

protected void doDrawOnTo(BufferedImageRaster canvas)
Overrides:
doDrawOnTo in class BufferedImageRaster

getSizeInBytes

public long getSizeInBytes()
Description copied from interface: Cacheable
Retrieves the approximate size of this object in bytes. Implementors are encouraged to calculate the exact size for smaller objects, but use approximate values for objects that include such large components that the approximation would produce an error so small that the extra computation would be wasteful.

Specified by:
getSizeInBytes in interface Cacheable
Overrides:
getSizeInBytes in class BufferedImageRaster
Returns:
this Cacheable object's size in bytes

NASA World Wind