|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.worldwind.render.SurfaceImage
public class SurfaceImage
Renders a single image tile. The image source can be a local file, a BufferedImage
or a network http source.
Images from remote sources are downloaded in background and will be saved in the cache directory
Constructor Summary | |
---|---|
SurfaceImage(Object imageSource,
Sector sector)
Renders a single image tile from a local or remote network source. |
|
SurfaceImage(Object imageSource,
Sector sector,
Layer layer)
Renders a single image tile from a local or remote network source. |
|
SurfaceImage(Object imageSource,
Sector sector,
Layer layer,
String cacheDirectory)
Renders a single image tile from a local or remote network source. |
Method Summary | |
---|---|
void |
applyInternalTransform(DrawContext dc)
|
boolean |
bind(DrawContext dc)
|
boolean |
equals(Object o)
|
Extent |
getExtent(DrawContext dc)
|
Object |
getImageSource()
Get the image source object. |
Layer |
getLayer()
Get the layer reference to which this SurfaceImage belongs. |
double |
getOpacity()
|
Position |
getReferencePosition()
|
Sector |
getSector()
|
int |
hashCode()
|
boolean |
hasProblem()
Returns whether there was any problem loading texture data. |
boolean |
isLoading()
Returns if the image is loading texture data. |
void |
move(Position position)
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. |
boolean |
reload(boolean useCache)
Force texture data to be reloaded. |
void |
render(DrawContext dc)
Causes this Renderable to render itself using the DrawContext provided. |
void |
setOpacity(double opacity)
|
void |
setSector(Sector sector)
Sets the sector for the image allowing to change its size or position. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SurfaceImage(Object imageSource, Sector sector)
imageSource
- can be a local image path, a BufferedImage
or a url string pointing to
an http server.sector
- the sector covered by the image.public SurfaceImage(Object imageSource, Sector sector, Layer layer)
imageSource
- can be a local image path, a BufferedImage
or a url string pointing to
an http server.sector
- the sector covered by the image.layer
- a reference to the layer handling this image. This layer will fire an event when the image has
finished downloading.public SurfaceImage(Object imageSource, Sector sector, Layer layer, String cacheDirectory)
imageSource
- can be a local image path, a BufferedImage
or a url string pointing to
an http server.sector
- the sector covered by the image.layer
- a reference to the layer handling this image. This layer will fire an event when the image has
finished downloading.cacheDirectory
- the cache directory where the downloaded image should be saved and retrieved.Method Detail |
---|
public void applyInternalTransform(DrawContext dc)
applyInternalTransform
in interface SurfaceTile
public boolean bind(DrawContext dc)
bind
in interface SurfaceTile
public boolean equals(Object o)
equals
in class Object
public Extent getExtent(DrawContext dc)
getExtent
in interface SurfaceTile
public Object getImageSource()
String
containing a path to either a
local file or a networked file. It can also be a BufferedImage
.
public Layer getLayer()
SurfaceImage
belongs. May be null
public double getOpacity()
public Position getReferencePosition()
getReferencePosition
in interface Movable
public Sector getSector()
getSector
in interface SurfaceTile
public int hashCode()
hashCode
in class Object
public boolean hasProblem()
public boolean isLoading()
public void move(Position position)
Movable
move
in interface Movable
position
- the latitude and longitude to add to the shapes reference position.public void moveTo(Position position)
Movable
moveTo
in interface Movable
position
- the new position of the shapes reference position.public boolean reload(boolean useCache)
useCache
- true if data should be reloaded from the cache.
public void render(DrawContext dc)
Renderable
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 DrawContext
s.
render
in interface Renderable
dc
- the DrawContext
to be usedDrawContext
public void setOpacity(double opacity)
public void setSector(Sector sector)
sector
- the new sector.
|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |