gov.nasa.worldwind.render
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Nested Class Summary | |
|---|---|
protected static class |
AbstractSurfaceShape.CacheEntry<T>
|
| Field Summary | |
|---|---|
protected AreaMeasurer |
areaMeasurer
|
protected long |
areaMeasurerLastModifiedTime
|
protected static int |
DEFAULT_CACHE_CAPACITY
|
protected static int |
DEFAULT_MAX_EDGE_INTERVALS
|
protected static int |
DEFAULT_MIN_EDGE_INTERVALS
|
protected static String |
DEFAULT_PATH_TYPE
|
protected static int |
DEFAULT_TEXELS_PER_EDGE_INTERVAL
|
protected BoundedHashMap<Object,AbstractSurfaceShape.CacheEntry<List<LatLon>>> |
drawLocationCache
|
protected int |
maxEdgeIntervals
|
protected int |
minEdgeIntervals
|
protected String |
pathType
|
protected TiledSurfaceObjectRenderer |
renderer
|
protected BoundedHashMap<Object,AbstractSurfaceShape.CacheEntry<Iterable<? extends Sector>>> |
sectorCache
|
protected boolean |
showBoundingSectors
|
protected double |
texelsPerEdgeInterval
|
protected List<Vec4> |
vertices
|
| Fields inherited from class gov.nasa.worldwind.render.AbstractSurfaceObject |
|---|
lastModifiedTime, visible |
| Fields inherited from class gov.nasa.worldwind.avlist.AVListImpl |
|---|
changeSupport |
| Constructor Summary | |
|---|---|
AbstractSurfaceShape()
|
|
AbstractSurfaceShape(ShapeAttributes attributes)
|
|
| Method Summary | |
|---|---|
protected void |
assembleShapeVertices(DrawContext dc,
Sector sector,
int x,
int y,
int width,
int height,
List<Vec4> vertices)
|
protected void |
beginRenderToRegion(DrawContext dc,
Sector sector,
int x,
int y,
int width,
int height)
|
protected void |
bindShapeData(DrawContext dc,
Sector sector,
int x,
int y,
int width,
int height)
|
protected abstract void |
computeDrawLocations(Globe globe,
double edgeIntervalsPerDegree,
List<LatLon> locations)
|
protected double |
computeEdgeIntervalsPerDegree(DrawContext dc,
Sector sector,
int x,
int y,
int width,
int height)
|
protected abstract void |
computeLocations(Globe globe,
List<LatLon> locations)
|
protected void |
doGetRestorableState(RestorableSupport rs,
RestorableSupport.StateObject context)
|
protected Iterable<? extends Sector> |
doGetSectors(DrawContext dc,
double texelSizeRadians)
|
protected abstract void |
doMoveTo(Position oldReferencePosition,
Position newReferencePosition)
|
protected void |
doRenderBoundingSectors(DrawContext dc,
Sector sector,
int x,
int y,
int width,
int height)
|
protected abstract void |
doRenderInteriorToRegion(DrawContext dc,
Sector sector,
int x,
int y,
int width,
int height)
|
protected abstract void |
doRenderOutlineToRegion(DrawContext dc,
Sector sector,
int x,
int y,
int width,
int height)
|
protected void |
doRenderToRegion(DrawContext dc,
Sector sector,
int x,
int y,
int width,
int height)
|
protected void |
doRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
|
protected void |
endRenderToRegion(DrawContext dc,
Sector sector,
int x,
int y,
int width,
int height)
|
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,
double edgeIntervalsPerDegree)
|
protected List<? extends LatLon> |
getDrawLocations(DrawContext dc,
Sector sector,
int x,
int y,
int width,
int height)
|
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. |
int[] |
getMinAndMaxEdgeIntervals()
Returns the minimum and maximum number of interpolated intervals that may be added to each shape edge. |
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,
double texelSizeRadians)
|
protected static SurfaceShapeSupport |
getSurfaceShapeSupport()
|
double |
getTexelsPerEdgeInterval()
Returns the number of texels per shape edge interval. |
double |
getWidth(Globe globe)
Returns the longitudinal length of the object in meters. |
boolean |
isShowBoundingSectors()
|
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. |
protected void |
renderBoundingSectors(DrawContext dc,
Sector sector,
int x,
int y,
int width,
int height)
|
protected void |
renderInteriorToRegion(DrawContext dc,
Sector sector,
int x,
int y,
int width,
int height)
|
protected void |
renderOutlineToRegion(DrawContext dc,
Sector sector,
int x,
int y,
int width,
int height)
|
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 |
setMinAndMaxEdgeIntervals(int minEdgeIntervals,
int maxEdgeIntervals)
Sets the minimum and maximum number of interpolated intervals that may be added to each shape edge. |
void |
setPathType(String pathType)
Sets the path type used to interpolate between locations on this SurfaceShape. |
void |
setShowBoundingSectors(boolean showBoundingSectors)
|
void |
setTexelsPerEdgeInterval(double texelsPerEdgeInterval)
Sets the number of texels per shape edge interval. |
protected AreaMeasurer |
setupAreaMeasurer(Globe globe)
|
| Methods inherited from class gov.nasa.worldwind.render.AbstractSurfaceObject |
|---|
getLastModifiedTime, isVisible, renderToRegion, setVisible, updateModifiedTime |
| Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
|---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
| 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 |
| Methods inherited from interface gov.nasa.worldwind.avlist.AVList |
|---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
| Field Detail |
|---|
protected AreaMeasurer areaMeasurer
protected long areaMeasurerLastModifiedTime
protected static final int DEFAULT_CACHE_CAPACITY
protected static final int DEFAULT_MAX_EDGE_INTERVALS
protected static final int DEFAULT_MIN_EDGE_INTERVALS
protected static final String DEFAULT_PATH_TYPE
protected static final int DEFAULT_TEXELS_PER_EDGE_INTERVAL
protected BoundedHashMap<Object,AbstractSurfaceShape.CacheEntry<List<LatLon>>> drawLocationCache
protected int maxEdgeIntervals
protected int minEdgeIntervals
protected String pathType
protected TiledSurfaceObjectRenderer renderer
protected BoundedHashMap<Object,AbstractSurfaceShape.CacheEntry<Iterable<? extends Sector>>> sectorCache
protected boolean showBoundingSectors
protected double texelsPerEdgeInterval
protected List<Vec4> vertices
| Constructor Detail |
|---|
public AbstractSurfaceShape()
public AbstractSurfaceShape(ShapeAttributes attributes)
| Method Detail |
|---|
protected void assembleShapeVertices(DrawContext dc, Sector sector, int x, int y, int width, int height, List<Vec4> vertices)
protected void beginRenderToRegion(DrawContext dc, Sector sector, int x, int y, int width, int height)
protected void bindShapeData(DrawContext dc, Sector sector, int x, int y, int width, int height)
protected abstract void computeDrawLocations(Globe globe, double edgeIntervalsPerDegree, List<LatLon> locations)
protected double computeEdgeIntervalsPerDegree(DrawContext dc, Sector sector, int x, int y, int width, int height)
protected abstract void computeLocations(Globe globe, List<LatLon> locations)
protected void doGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)
protected Iterable<? extends Sector> doGetSectors(DrawContext dc, double texelSizeRadians)
protected abstract void doMoveTo(Position oldReferencePosition, Position newReferencePosition)
protected void doRenderBoundingSectors(DrawContext dc, Sector sector, int x, int y, int width, int height)
protected abstract void doRenderInteriorToRegion(DrawContext dc, Sector sector, int x, int y, int width, int height)
protected abstract void doRenderOutlineToRegion(DrawContext dc, Sector sector, int x, int y, int width, int height)
protected void doRenderToRegion(DrawContext dc, Sector sector, int x, int y, int width, int height)
doRenderToRegion in class AbstractSurfaceObjectprotected void doRestoreState(RestorableSupport rs, RestorableSupport.StateObject context)
protected void endRenderToRegion(DrawContext dc, Sector sector, int x, int y, int width, int height)
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, double edgeIntervalsPerDegree)
protected List<? extends LatLon> getDrawLocations(DrawContext dc, Sector sector, int x, int y, int width, int height)
public 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 int[] getMinAndMaxEdgeIntervals()
SurfaceShape
getMinAndMaxEdgeIntervals in interface SurfaceShapeSurfaceShape.setMinAndMaxEdgeIntervals(int, int)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, double texelSizeRadians)
getSectors in interface SurfaceObjectprotected static SurfaceShapeSupport getSurfaceShapeSupport()
public double getTexelsPerEdgeInterval()
SurfaceShape
getTexelsPerEdgeInterval in interface SurfaceShapeSurfaceShape.setTexelsPerEdgeInterval(double)public double getWidth(Globe globe)
MeasurableArea
getWidth in interface MeasurableAreaglobe - The globe the object is related to.
public boolean isShowBoundingSectors()
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
position - the latitude and longitude to add to the shape's reference position.public void moveTo(Position position)
Movable
position - 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 usedDrawContextprotected void renderBoundingSectors(DrawContext dc, Sector sector, int x, int y, int width, int height)
protected void renderInteriorToRegion(DrawContext dc, Sector sector, int x, int y, int width, int height)
protected void renderOutlineToRegion(DrawContext dc, Sector sector, int x, int y, int width, int height)
public 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 setMinAndMaxEdgeIntervals(int minEdgeIntervals,
int maxEdgeIntervals)
SurfaceShapeminEdgeIntervals
or maxEdgeIntervals too large may adversely impact surface shape rendering performance.
setMinAndMaxEdgeIntervals in interface SurfaceShapeminEdgeIntervals - the minimum number of interpolated edge intervals.maxEdgeIntervals - the maximum number of interpolated edge intervals.SurfaceShape.setTexelsPerEdgeInterval(double)public void setPathType(String pathType)
SurfaceShape
setPathType in interface SurfaceShapepathType - path interpolation type.public void setShowBoundingSectors(boolean showBoundingSectors)
public void setTexelsPerEdgeInterval(double texelsPerEdgeInterval)
SurfaceShapeSurfaceShape.setMinAndMaxEdgeIntervals(int, int).
setTexelsPerEdgeInterval in interface SurfaceShapetexelsPerEdgeInterval - the size, in texels, of each interpolated edge interval.SurfaceShape.setMinAndMaxEdgeIntervals(int, int)protected AreaMeasurer setupAreaMeasurer(Globe globe)
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||