|
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.ConformingShape
public abstract class ConformingShape
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:
ConformingShape is abstract. Any direct construction of a SurfaceShape object
can be replaced by an instance of ConformingPolygon using the same actual parametersSurfaceEllipse 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.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.
| Nested Class Summary | |
|---|---|
protected static class |
ConformingShape.CacheKey
|
| Field Summary | |
|---|---|
protected Color |
borderColor
|
protected double |
borderWidth
|
protected static String |
CONFORMINGSHAPE_CACHE_KEY
|
protected static String |
CONFORMINGSHAPE_CACHE_NAME
|
protected boolean |
drawBorder
|
protected boolean |
drawInterior
|
protected Color |
fillColor
|
| Constructor Summary | |
|---|---|
ConformingShape()
|
|
ConformingShape(Color fillColor,
Color borderColor)
|
|
| Method Summary | |
|---|---|
void |
dispose()
|
protected void |
doGetRestorableState(RestorableSupport rs,
RestorableSupport.StateObject context)
|
protected void |
doRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
|
Color |
getBorderColor()
|
double |
getBorderWidth()
|
Paint |
getInteriorColor()
|
abstract Position |
getReferencePosition()
|
String |
getRestorableState()
Returns an XML document string describing the object’s state. |
protected static int |
getUniqueSerialNumber()
|
boolean |
getUseFrustumCull()
|
protected abstract void |
invalidateCache()
|
boolean |
isAntiAlias()
|
boolean |
isDrawBorder()
|
boolean |
isDrawInterior()
|
protected boolean |
isExpired(DrawContext dc)
|
void |
move(Position delta)
Shift the shape over the globe's surface while maintaining its original azimuth, its orientation relative to North. |
abstract void |
moveTo(Position position)
Move the shape over the globe's 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. |
protected abstract void |
renderBoundary(DrawContext dc,
GL gl,
boolean knownToBeVisible)
|
protected abstract boolean |
renderInterior(DrawContext dc,
GL gl)
|
void |
restoreState(String stateInXml)
Restores the object’s state to what is described in the specified XML document string. |
void |
setAntiAlias(boolean antiAlias)
|
void |
setBorderColor(Color borderColor)
|
void |
setBorderWidth(double borderWidth)
|
void |
setDrawBorder(boolean drawBorder)
|
void |
setDrawInterior(boolean drawInterior)
|
void |
setInteriorColor(Color interiorColor)
|
void |
setUseFrustumCull(boolean c)
|
protected static long |
sizeInBytesOf(ArrayList<SectorGeometry.ExtractedShapeDescription> esdL)
|
protected void |
updateExpiryCriteria(DrawContext dc)
|
| 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.geom.MeasurableArea |
|---|
getArea, getHeight, getPerimeter, getWidth |
| Methods inherited from interface gov.nasa.worldwind.geom.MeasurableLength |
|---|
getLength |
| Field Detail |
|---|
protected Color borderColor
protected double borderWidth
protected static final String CONFORMINGSHAPE_CACHE_KEY
protected static final String CONFORMINGSHAPE_CACHE_NAME
protected boolean drawBorder
protected boolean drawInterior
protected Color fillColor
| Constructor Detail |
|---|
public ConformingShape()
public ConformingShape(Color fillColor,
Color borderColor)
| Method Detail |
|---|
public void dispose()
dispose in interface Disposable
protected void doGetRestorableState(RestorableSupport rs,
RestorableSupport.StateObject context)
protected void doRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
public Color getBorderColor()
public double getBorderWidth()
public Paint getInteriorColor()
public abstract Position getReferencePosition()
getReferencePosition in interface Movablepublic String getRestorableState()
RestorablerestoreState and passing the XML document.
getRestorableState in interface Restorableprotected static int getUniqueSerialNumber()
public boolean getUseFrustumCull()
protected abstract void invalidateCache()
public boolean isAntiAlias()
public boolean isDrawBorder()
public boolean isDrawInterior()
protected boolean isExpired(DrawContext dc)
public void move(Position delta)
Movable
move in interface Movabledelta - the latitude and longitude to add to the shape's reference position.public abstract void moveTo(Position position)
Movable
moveTo in interface Movableposition - the new position of the shape's reference position.public void render(DrawContext dc)
RenderableRenderable 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.
render in interface Renderabledc - the DrawContext to be usedDrawContext
protected abstract void renderBoundary(DrawContext dc,
GL gl,
boolean knownToBeVisible)
protected abstract boolean renderInterior(DrawContext dc,
GL gl)
public void restoreState(String stateInXml)
Restorable
restoreState in interface RestorablestateInXml - an XML document string describing an object's state.public void setAntiAlias(boolean antiAlias)
public void setBorderColor(Color borderColor)
public void setBorderWidth(double borderWidth)
public void setDrawBorder(boolean drawBorder)
public void setDrawInterior(boolean drawInterior)
public void setInteriorColor(Color interiorColor)
public void setUseFrustumCull(boolean c)
protected static long sizeInBytesOf(ArrayList<SectorGeometry.ExtractedShapeDescription> esdL)
protected void updateExpiryCriteria(DrawContext dc)
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||