gov.nasa.worldwind.render
Class ConformingShape
java.lang.Object
gov.nasa.worldwind.render.ConformingShape
- All Implemented Interfaces:
- Disposable, MeasurableArea, MeasurableLength, Movable, Renderable, Restorable
- Direct Known Subclasses:
- ConformingEllipse, ConformingPolygon
public abstract class ConformingShape - extends Object
- implements Renderable, Disposable, Movable, Restorable, MeasurableArea, MeasurableLength
The design of the class hierarchy for which this class is the base was derived in part from
that of the class hierarchy rooted by SurfaceShape. The major implementation difference is that
instances of this class extract portions of the current tessellation to render the interior of
shapes. There is somewhat of a performance penalty for this.
For the most part, any SurfaceXxx class can be replaced by the corresponding ConformingXxx
class, and all other usage (method names and prototypes) will be the same. The only
exceptions are:
- class
ConformingShape is abstract. Any direct construction of a SurfaceShape object
can be replaced by an instance of ConformingPolygon using the same actual parameters
SurfaceEllipse is replaced by ConformingEllipticalPolygon and ConformingCircularPolygon
since they are actually implemented by generating polygons. The constructor (and other methods) for the corresponding
classes are identical.
- "New" classes
ConformingEllipse and ConformingCircle are used to create shapes
that always have an elliptical or circular shape. These shapes are created without an
"int intervals" parameter and are always rendered as ellipses or circles mapped onto the terrain.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
borderColor
protected Color borderColor
borderWidth
protected double borderWidth
CONFORMINGSHAPE_CACHE_KEY
protected static final String CONFORMINGSHAPE_CACHE_KEY
CONFORMINGSHAPE_CACHE_NAME
protected static final String CONFORMINGSHAPE_CACHE_NAME
- See Also:
- Constant Field Values
drawBorder
protected boolean drawBorder
drawInterior
protected boolean drawInterior
fillColor
protected Color fillColor
ConformingShape
public ConformingShape()
ConformingShape
public ConformingShape(Color fillColor,
Color borderColor)
dispose
public void dispose()
- Specified by:
dispose in interface Disposable
doGetRestorableState
protected void doGetRestorableState(RestorableSupport rs,
RestorableSupport.StateObject context)
doRestoreState
protected void doRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
getBorderColor
public Color getBorderColor()
getBorderWidth
public double getBorderWidth()
getInteriorColor
public Paint getInteriorColor()
getReferencePosition
public abstract Position getReferencePosition()
- Specified by:
getReferencePosition in interface Movable
getRestorableState
public String getRestorableState()
- Description copied from interface:
Restorable
- Returns an XML document string describing the object’s state. This state can be restored later by calling
restoreState and passing the XML document.
- Specified by:
getRestorableState in interface Restorable
- Returns:
- an XML document string describing the object's state.
getUniqueSerialNumber
protected static int getUniqueSerialNumber()
getUseFrustumCull
public boolean getUseFrustumCull()
invalidateCache
protected abstract void invalidateCache()
isAntiAlias
public boolean isAntiAlias()
isDrawBorder
public boolean isDrawBorder()
isDrawInterior
public boolean isDrawInterior()
isExpired
protected boolean isExpired(DrawContext dc)
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 shape's reference position.
moveTo
public abstract void moveTo(Position position)
- Description copied from interface:
Movable
- Move the shape over the globe's surface while maintaining its original azimuth, its orientation relative to
North.
- Specified by:
moveTo in interface Movable
- Parameters:
position - the new position of the shape's reference position.
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 DrawContexts.
- Specified by:
render in interface Renderable
- Parameters:
dc - the DrawContext to be used- See Also:
DrawContext
renderBoundary
protected abstract void renderBoundary(DrawContext dc,
javax.media.opengl.GL gl,
boolean knownToBeVisible)
renderInterior
protected abstract boolean renderInterior(DrawContext dc,
javax.media.opengl.GL gl)
restoreState
public void restoreState(String stateInXml)
- Description copied from interface:
Restorable
- Restores the object’s state to what is described in the specified XML document string.
- Specified by:
restoreState in interface Restorable
- Parameters:
stateInXml - an XML document string describing an object's state.
setAntiAlias
public void setAntiAlias(boolean antiAlias)
setBorderColor
public void setBorderColor(Color borderColor)
setBorderWidth
public void setBorderWidth(double borderWidth)
setDrawBorder
public void setDrawBorder(boolean drawBorder)
setDrawInterior
public void setDrawInterior(boolean drawInterior)
setInteriorColor
public void setInteriorColor(Color interiorColor)
setUseFrustumCull
public void setUseFrustumCull(boolean c)
sizeInBytesOf
protected static long sizeInBytesOf(ArrayList<SectorGeometry.ExtractedShapeDescription> esdL)
updateExpiryCriteria
protected void updateExpiryCriteria(DrawContext dc)
|