|
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.AbstractSurfaceObject
gov.nasa.worldwind.render.AbstractSurfaceShape
public abstract class AbstractSurfaceShape
| Field Summary | |
|---|---|
protected AreaMeasurer |
areaMeasurer
|
protected long |
areaMeasurerLastModifiedTime
|
protected List<LatLon> |
drawLocations
|
protected long |
drawLocationsLastModifiedTime
|
protected int |
edgeIntervalsPerDegree
|
protected String |
pathType
|
protected TiledSurfaceObjectRenderer |
renderer
|
| Fields inherited from class gov.nasa.worldwind.render.AbstractSurfaceObject |
|---|
lastModifiedTime, visible |
| Constructor Summary | |
|---|---|
AbstractSurfaceShape()
|
|
AbstractSurfaceShape(ShapeAttributes attributes)
|
|
| Method Summary | |
|---|---|
protected abstract void |
computeLocations(Globe globe,
List<LatLon> locations)
|
protected void |
doGetRestorableState(RestorableSupport rs,
RestorableSupport.StateObject context)
|
protected abstract void |
doMoveTo(Position oldReferencePosition,
Position newReferencePosition)
|
protected void |
doRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
|
double |
getArea(Globe globe)
Returns the object's area in square meters. |
double |
getArea(Globe globe,
boolean terrainConformant)
Returns the shapes's area in square meters. |
ShapeAttributes |
getAttributes()
Returns the rendering attributes associated with this SurfaceShape. |
protected List<? extends LatLon> |
getDrawLocations(DrawContext dc)
|
int |
getEdgeIntervalsPerDegree()
Returns the number of edge intervals that will be added between shape locations, er degree of latitude and longitude. |
double |
getHeight(Globe globe)
Returns the latitudanl length of the object in meters. |
double |
getLength(Globe globe)
Returns the object's length in meters. |
Iterable<? extends LatLon> |
getLocations(Globe globe)
Returns the shape's locations as they appear on the specified globe. |
String |
getPathType()
Returns the path type used to interpolate between locations on this SurfaceShape. |
double |
getPerimeter(Globe globe)
Returns the length of the object's perimeter in meters. |
abstract Position |
getReferencePosition()
|
protected TiledSurfaceObjectRenderer |
getRenderer()
|
String |
getRestorableState()
Returns an XML document string describing the object’s state. |
Iterable<? extends Sector> |
getSectors(DrawContext dc)
|
protected static SurfaceShapeSupport |
getSurfaceShapeSupport()
|
double |
getWidth(Globe globe)
Returns the longitudinal length of the object in meters. |
protected void |
legacyRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
Restores state values from previous versions of the SurfaceShape state XML. |
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. |
protected void |
onShapeChanged()
|
protected String |
pathTypeFromString(String s)
|
void |
preRender(DrawContext dc)
|
void |
render(DrawContext dc)
Causes this Renderable to render itself using the DrawContext provided. |
void |
restoreState(String stateInXml)
Restores the object’s state to what is described in the specified XML document string. |
void |
setAttributes(ShapeAttributes attributes)
Sets the rendering attributes associated with this SurfaceShape. |
void |
setEdgeIntervalsPerDegree(int numIntervals)
Sets the number of edge intervals to add between shape locations, per degree of latitude and longitude. |
void |
setPathType(String pathType)
Sets the path type used to interpolate between locations on this SurfaceShape. |
protected AreaMeasurer |
setupAreaMeasurer(Globe globe)
|
| Methods inherited from class gov.nasa.worldwind.render.AbstractSurfaceObject |
|---|
doRenderToRegion, getLastModifiedTime, isVisible, renderToRegion, setVisible, updateModifiedTime |
| 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.render.SurfaceObject |
|---|
getLastModifiedTime, isVisible, renderToRegion, setVisible |
| Field Detail |
|---|
protected AreaMeasurer areaMeasurer
protected long areaMeasurerLastModifiedTime
protected List<LatLon> drawLocations
protected long drawLocationsLastModifiedTime
protected int edgeIntervalsPerDegree
protected String pathType
protected TiledSurfaceObjectRenderer renderer
| Constructor Detail |
|---|
public AbstractSurfaceShape()
public AbstractSurfaceShape(ShapeAttributes attributes)
| Method Detail |
|---|
protected abstract void computeLocations(Globe globe,
List<LatLon> locations)
protected void doGetRestorableState(RestorableSupport rs,
RestorableSupport.StateObject context)
protected abstract void doMoveTo(Position oldReferencePosition,
Position newReferencePosition)
protected void doRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
public double getArea(Globe globe)
MeasurableArea
getArea in interface MeasurableAreaglobe - The globe the object is related to.
public double getArea(Globe globe,
boolean terrainConformant)
SurfaceShapeterrainConformant is true, the area returned is the
surface area of the terrain, including its hillsides and other undulations.
getArea in interface SurfaceShapeglobe - the globe the shape is related to.terrainConformant - whether or not the returned area should treat the shape as conforming to the terrain.
public ShapeAttributes getAttributes()
SurfaceShape
getAttributes in interface SurfaceShapeprotected List<? extends LatLon> getDrawLocations(DrawContext dc)
public int getEdgeIntervalsPerDegree()
SurfaceShape
getEdgeIntervalsPerDegree in interface SurfaceShapepublic double getHeight(Globe globe)
MeasurableArea
getHeight in interface MeasurableAreaglobe - The globe the object is related to.
public double getLength(Globe globe)
MeasurableLength
getLength in interface MeasurableLengthglobe - The globe the object is related to.
public Iterable<? extends LatLon> getLocations(Globe globe)
SurfaceShapeglobe.
getLocations in interface SurfaceShapeglobe - the globe the shape is related to.
public String getPathType()
SurfaceShape
getPathType in interface SurfaceShapepublic double getPerimeter(Globe globe)
MeasurableArea
getPerimeter in interface MeasurableAreaglobe - The globe the object is related to.
public abstract Position getReferencePosition()
getReferencePosition in interface Movableprotected TiledSurfaceObjectRenderer getRenderer()
public String getRestorableState()
RestorablerestoreState and passing the XML document.
getRestorableState in interface Restorablepublic Iterable<? extends Sector> getSectors(DrawContext dc)
getSectors in interface SurfaceObjectprotected static SurfaceShapeSupport getSurfaceShapeSupport()
public double getWidth(Globe globe)
MeasurableArea
getWidth in interface MeasurableAreaglobe - The globe the object is related to.
protected void legacyRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
rs - RestorableSupport object which contains the state value properties.context - active context in the RestorableSupport to read state from.public void move(Position position)
Movable
move in interface Movableposition - the latitude and longitude to add to the shape's reference position.public void moveTo(Position position)
Movable
moveTo in interface Movableposition - the new position of the shape's reference position.protected void onShapeChanged()
protected String pathTypeFromString(String s)
public void preRender(DrawContext dc)
preRender in interface PreRenderablepublic 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 usedDrawContextpublic void restoreState(String stateInXml)
Restorable
restoreState in interface RestorablestateInXml - an XML document string describing an object's state.public void setAttributes(ShapeAttributes attributes)
SurfaceShape
setAttributes in interface SurfaceShapeattributes - this shapes new rendering attributes.public void setEdgeIntervalsPerDegree(int numIntervals)
SurfaceShape
setEdgeIntervalsPerDegree in interface SurfaceShapenumIntervals - number of edge intervals between locations, per degree.public void setPathType(String pathType)
SurfaceShape
setPathType in interface SurfaceShapepathType - path interpolation type.protected AreaMeasurer setupAreaMeasurer(Globe globe)
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||