|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface SurfaceShape
The SurfaceShape is a common interface for surface conforming shapes such as polygon, sector, ellipse, and
quadrilateral. SurfaceShapes implement the PreRenderable and Renderable interfaces, so a surface
shape may be aggregated within any layer or within some arbitrary rendering code. While SurfaceShapes may be
rendered on an individual basis, they are designed to be aggregated with other SurfaceShapes in a
SurfaceShapeLayer. By letting SurfaceShapeLayer handle a collection of shapes
in bulk, the shapes share a common set of system resources, which will increse the scalability of rendering a large
number of shapes.
Most implementations of SurfaceShape will require that PreRenderable.preRender(DrawContext) is called before
Renderable.render(DrawContext), and that preRender is called at the appropriate stage in the current rendering cycle.
Furthermore, most implementations will be designed such that calling preRender will lock in the visual attributes of
the shape for any subsequent calls to render, until the next time preRender is called.
An instance of SurfaceShape is also a SurfaceObject, which allows SurfaceShape to be used anywhere that
a SurfaceObject is accepted. Most importantly, this means that a SurfaceShape does not need to be rendered by
calling preRender and render. Instead, a SurfaceShape may be rendered as input to
TiledSurfaceObjectRenderer.
SurfaceShapeLayer| Method Summary | |
|---|---|
double |
getArea(Globe globe,
boolean terrainConformant)
Returns the shapes's area in square meters. |
ShapeAttributes |
getAttributes()
Returns the rendering attributes associated with this SurfaceShape. |
int |
getEdgeIntervalsPerDegree()
Returns the number of edge intervals that will be added between shape locations, er degree of latitude and longitude. |
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. |
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. |
| Methods inherited from interface gov.nasa.worldwind.render.SurfaceObject |
|---|
getLastModifiedTime, getSectors, isVisible, renderToRegion, setVisible |
| Methods inherited from interface gov.nasa.worldwind.render.PreRenderable |
|---|
preRender |
| Methods inherited from interface gov.nasa.worldwind.render.Renderable |
|---|
render |
| Methods inherited from interface gov.nasa.worldwind.Restorable |
|---|
getRestorableState, restoreState |
| Methods inherited from interface gov.nasa.worldwind.geom.MeasurableArea |
|---|
getArea, getHeight, getPerimeter, getWidth |
| Methods inherited from interface gov.nasa.worldwind.geom.MeasurableLength |
|---|
getLength |
| Method Detail |
|---|
double getArea(Globe globe,
boolean terrainConformant)
terrainConformant is true, the area returned is the
surface area of the terrain, including its hillsides and other undulations.
globe - the globe the shape is related to.terrainConformant - whether or not the returned area should treat the shape as conforming to the terrain.
IllegalArgumentException - if globe is null.ShapeAttributes getAttributes()
int getEdgeIntervalsPerDegree()
Iterable<? extends LatLon> getLocations(Globe globe)
globe.
globe - the globe the shape is related to.
IllegalArgumentException - if globe is null.String getPathType()
void setAttributes(ShapeAttributes attributes)
attributes - this shapes new rendering attributes.
IllegalArgumentException - if attributes is null.void setEdgeIntervalsPerDegree(int numIntervals)
numIntervals - number of edge intervals between locations, per degree.
IllegalArgumentException - if numIntervals is less than 0.void setPathType(String pathType)
pathType - path interpolation type.
IllegalArgumentException - if pathType is null.
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||