gov.nasa.worldwind.render
Class SurfaceShape
java.lang.Object
gov.nasa.worldwind.render.SurfaceShape
- All Implemented Interfaces:
- Disposable, Movable, Renderable
- Direct Known Subclasses:
- SurfacePolygon
public abstract class SurfaceShape
- extends java.lang.Object
- implements Renderable, Disposable, Movable
Constructor Summary |
SurfaceShape(java.lang.Iterable<LatLon> positions,
java.awt.Color color,
java.awt.Color borderColor,
java.awt.Dimension textureSize)
|
Method Summary |
static SurfaceShape |
createEllipse(Globe globe,
LatLon center,
double majorAxisLength,
double minorAxisLength,
Angle orientation,
int intervals,
java.awt.Color interiorColor,
java.awt.Color borderColor,
java.awt.Dimension textureSize)
|
protected void |
createTextureTiles()
|
void |
dispose()
|
protected abstract java.awt.image.BufferedImage |
drawShape(Globe globe,
Sector sector,
java.awt.image.BufferedImage image)
|
java.awt.Color |
getBorderColor()
|
double |
getNumEdgeIntervalsPerDegree()
|
java.awt.Paint |
getPaint()
|
java.lang.Iterable<LatLon> |
getPositions()
|
Position |
getReferencePosition()
|
java.util.ArrayList<Sector> |
getSectors()
|
java.awt.Stroke |
getStroke()
|
java.awt.Dimension |
getTextureSize()
|
boolean |
isAntiAlias()
|
boolean |
isDrawBorder()
|
boolean |
isDrawInterior()
|
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 sphereoid surface while maintaining its original azimuth -- its orientation relative to
North. |
void |
render(DrawContext dc)
Causes this Renderable to render itself using the DrawContext provided. |
void |
setAntiAlias(boolean antiAlias)
|
void |
setBorderColor(java.awt.Color borderColor)
|
void |
setDrawBorder(boolean drawBorder)
|
void |
setDrawInterior(boolean drawInterior)
|
void |
setNumEdgeIntervalsPerDegree(double numEdgeIntervals)
|
void |
setPaint(java.awt.Paint paint)
|
void |
setPositions(java.lang.Iterable<LatLon> positions)
|
void |
setStroke(java.awt.Stroke stroke)
|
void |
setTextureSize(java.awt.Dimension textureSize)
|
void |
shiftTo(Position position)
Move the shape over the sphereoid surface without maintaining its original azimuth -- its orientation relative to
North. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
globe
protected Globe globe
positions
protected java.util.ArrayList<LatLon> positions
TEXTURE_SIZE_1024
public static java.awt.Dimension TEXTURE_SIZE_1024
TEXTURE_SIZE_128
public static java.awt.Dimension TEXTURE_SIZE_128
TEXTURE_SIZE_16
public static java.awt.Dimension TEXTURE_SIZE_16
TEXTURE_SIZE_256
public static java.awt.Dimension TEXTURE_SIZE_256
TEXTURE_SIZE_32
public static java.awt.Dimension TEXTURE_SIZE_32
TEXTURE_SIZE_512
public static java.awt.Dimension TEXTURE_SIZE_512
TEXTURE_SIZE_64
public static java.awt.Dimension TEXTURE_SIZE_64
TEXTURE_SIZE_8
public static java.awt.Dimension TEXTURE_SIZE_8
SurfaceShape
public SurfaceShape(java.lang.Iterable<LatLon> positions,
java.awt.Color color,
java.awt.Color borderColor,
java.awt.Dimension textureSize)
createEllipse
public static SurfaceShape createEllipse(Globe globe,
LatLon center,
double majorAxisLength,
double minorAxisLength,
Angle orientation,
int intervals,
java.awt.Color interiorColor,
java.awt.Color borderColor,
java.awt.Dimension textureSize)
createTextureTiles
protected void createTextureTiles()
dispose
public void dispose()
- Specified by:
dispose
in interface Disposable
drawShape
protected abstract java.awt.image.BufferedImage drawShape(Globe globe,
Sector sector,
java.awt.image.BufferedImage image)
getBorderColor
public java.awt.Color getBorderColor()
getNumEdgeIntervalsPerDegree
public double getNumEdgeIntervalsPerDegree()
getPaint
public java.awt.Paint getPaint()
getPositions
public java.lang.Iterable<LatLon> getPositions()
getReferencePosition
public Position getReferencePosition()
- Specified by:
getReferencePosition
in interface Movable
getSectors
public java.util.ArrayList<Sector> getSectors()
getStroke
public java.awt.Stroke getStroke()
getTextureSize
public java.awt.Dimension getTextureSize()
isAntiAlias
public boolean isAntiAlias()
isDrawBorder
public boolean isDrawBorder()
isDrawInterior
public boolean isDrawInterior()
move
public void move(Position delta)
- Description copied from interface:
Movable
- Shift the shape over the globe's surface while maintaining its original azimuth -- its orientation relative to
North.
- Specified by:
move
in interface Movable
- Parameters:
delta
- the latitude and longitude to add to the shapes reference position.
moveTo
public void moveTo(Position position)
- Move the shape over the sphereoid surface while maintaining its original azimuth -- its orientation relative to
North.
- Specified by:
moveTo
in interface Movable
- Parameters:
position
- the new position to move the shapes reference position to.
render
public void render(DrawContext dc)
- Description copied from interface:
Renderable
- Causes this
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.
- Specified by:
render
in interface Renderable
- Parameters:
dc
- the DrawContext
to be used- See Also:
DrawContext
setAntiAlias
public void setAntiAlias(boolean antiAlias)
setBorderColor
public void setBorderColor(java.awt.Color borderColor)
setDrawBorder
public void setDrawBorder(boolean drawBorder)
setDrawInterior
public void setDrawInterior(boolean drawInterior)
setNumEdgeIntervalsPerDegree
public void setNumEdgeIntervalsPerDegree(double numEdgeIntervals)
setPaint
public void setPaint(java.awt.Paint paint)
setPositions
public void setPositions(java.lang.Iterable<LatLon> positions)
setStroke
public void setStroke(java.awt.Stroke stroke)
setTextureSize
public void setTextureSize(java.awt.Dimension textureSize)
shiftTo
public void shiftTo(Position position)
- Move the shape over the sphereoid surface without maintaining its original azimuth -- its orientation relative to
North.
- Parameters:
position
- the new position to move the shapes reference position to.