|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.WWObjectImpl
gov.nasa.worldwind.render.AbstractSurfaceObject
gov.nasa.worldwind.render.AbstractSurfaceShape
gov.nasa.worldwind.render.SurfaceQuad
public class SurfaceQuad
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class gov.nasa.worldwind.render.AbstractSurfaceShape |
|---|
AbstractSurfaceShape.GeometryKey, AbstractSurfaceShape.SurfaceShapeStateKey |
| Nested classes/interfaces inherited from class gov.nasa.worldwind.render.AbstractSurfaceObject |
|---|
AbstractSurfaceObject.CacheEntry, AbstractSurfaceObject.SurfaceObjectStateKey |
| Field Summary | |
|---|---|
protected LatLon |
center
|
protected Angle |
heading
|
protected double |
height
|
protected double |
width
|
| Fields inherited from class gov.nasa.worldwind.render.AbstractSurfaceObject |
|---|
delegateOwner, drawBoundingSectors, enableBatchPicking, extentCache, lastModifiedTime, nextUniqueId, pickLayer, pickSupport, pickTileBuilder, pickTiles, uniqueId, visible |
| Fields inherited from interface gov.nasa.worldwind.Exportable |
|---|
FORMAT_NOT_SUPPORTED, FORMAT_PARTIALLY_SUPPORTED, FORMAT_SUPPORTED |
| Constructor Summary | |
|---|---|
SurfaceQuad()
Constructs a new surface quad with the default attributes, default center location, default dimensions, and default heading. |
|
SurfaceQuad(LatLon center,
double width,
double height)
Constructs a new surface quad with the default attributes, the specified center location and dimensions (in meters). |
|
SurfaceQuad(LatLon center,
double width,
double height,
Angle heading)
Constructs a new surface quad with the default attributes, the specified center location, dimensions (in meters), and heading clockwise from North. |
|
SurfaceQuad(ShapeAttributes normalAttrs)
Constructs a new surface quad with the specified normal (as opposed to highlight) attributes, default center location, default dimensions, and default heading. |
|
SurfaceQuad(ShapeAttributes normalAttrs,
LatLon center,
double width,
double height)
Constructs a new surface quad with the specified normal (as opposed to highlight) attributes, the specified center location and dimensions (in meters). |
|
SurfaceQuad(ShapeAttributes normalAttrs,
LatLon center,
double width,
double height,
Angle heading)
Constructs a new surface quad with the specified normal (as opposed to highlight) attributes, the specified center location and dimensions (in meters). |
|
| Method Summary | |
|---|---|
protected List<List<LatLon>> |
createGeometry(Globe globe,
SurfaceTileDrawContext sdc)
|
protected void |
doGetRestorableState(RestorableSupport rs,
RestorableSupport.StateObject context)
|
protected void |
doMoveTo(Position oldReferencePosition,
Position newReferencePosition)
|
protected void |
doRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
|
protected void |
exportAsKML(Object output)
Export the polygon to KML as a <Placemark> element. |
LatLon |
getCenter()
|
Angle |
getHeading()
|
double |
getHeight()
|
Iterable<? extends LatLon> |
getLocations(Globe globe)
Returns the shape's locations as they appear on the specified globe, or null if the shape has no
locations. |
Position |
getReferencePosition()
A position associated with the object that indicates its aggregate geographic position. |
Object |
getStateKey(DrawContext dc)
Returns an object that uniquely identifies the surface object's state on the specified draw context. |
double |
getWidth()
|
protected void |
legacyRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
Restores state values from previous versions of the SurfaceShape state XML. |
void |
setCenter(LatLon center)
|
void |
setHeading(Angle heading)
|
void |
setHeight(double height)
|
void |
setSize(double width,
double height)
|
void |
setWidth(double width)
|
| Methods inherited from class gov.nasa.worldwind.WWObjectImpl |
|---|
onMessage, propertyChange |
| Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
|---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, 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.Exportable |
|---|
export, isExportFormatSupported |
| Methods inherited from interface gov.nasa.worldwind.render.SurfaceObject |
|---|
getDelegateOwner, getDistanceFromEye, getExtent, isVisible, pick, preRender, render, setDelegateOwner, 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 LatLon center
protected Angle heading
protected double height
protected double width
| Constructor Detail |
|---|
public SurfaceQuad()
public SurfaceQuad(LatLon center,
double width,
double height)
center - the quad's center location.width - the quad's width, in meters.height - the quad's height, in meters.
IllegalArgumentException - if the center is null, or if the width or height are negative.
public SurfaceQuad(LatLon center,
double width,
double height,
Angle heading)
center - the quad's center location.width - the quad's width, in meters.height - the quad's height, in meters.heading - the quad's heading, clockwise from North.
IllegalArgumentException - if the center or heading are null, or if the width or height are negative.public SurfaceQuad(ShapeAttributes normalAttrs)
normalAttrs - the normal attributes. May be null, in which case default attributes are used.
public SurfaceQuad(ShapeAttributes normalAttrs,
LatLon center,
double width,
double height)
normalAttrs - the normal attributes. May be null, in which case default attributes are used.center - the quad's center location.width - the quad's width, in meters.height - the quad's height, in meters.
IllegalArgumentException - if the center is null, or if the width or height are negative.
public SurfaceQuad(ShapeAttributes normalAttrs,
LatLon center,
double width,
double height,
Angle heading)
normalAttrs - the normal attributes. May be null, in which case default attributes are used.center - the quad's center location.width - the quad's width, in meters.height - the quad's height, in meters.heading - the quad's heading, clockwise from North.
IllegalArgumentException - if the center or heading are null, or if the width or height are negative.| Method Detail |
|---|
protected List<List<LatLon>> createGeometry(Globe globe,
SurfaceTileDrawContext sdc)
createGeometry in class AbstractSurfaceShape
protected void doGetRestorableState(RestorableSupport rs,
RestorableSupport.StateObject context)
doGetRestorableState in class AbstractSurfaceShape
protected void doMoveTo(Position oldReferencePosition,
Position newReferencePosition)
doMoveTo in class AbstractSurfaceShape
protected void doRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
doRestoreState in class AbstractSurfaceShape
protected void exportAsKML(Object output)
throws IOException,
XMLStreamException
<Placemark> element. The output object will receive the data. This
object must be one of: java.io.Writer java.io.OutputStream javax.xml.stream.XMLStreamWriter
exportAsKML in class AbstractSurfaceShapeoutput - Object to receive the generated KML.
XMLStreamException - If an exception occurs while writing the KML
IOException - if an exception occurs while exporting the data.AbstractSurfaceShape.export(String, Object)public LatLon getCenter()
public Angle getHeading()
public double getHeight()
public Iterable<? extends LatLon> getLocations(Globe globe)
SurfaceShapeglobe, or null if the shape has no
locations.
getLocations in interface SurfaceShapeglobe - the globe the shape is related to.
public Position getReferencePosition()
Movable
getReferencePosition in interface MovablegetReferencePosition in class AbstractSurfaceShapepublic Object getStateKey(DrawContext dc)
Globe. Subclasses
that depend on the Globe should return a state key that include the globe's state key.
Overridden to include the globe's state key in the returned state key.
getStateKey in interface SurfaceObjectgetStateKey in class AbstractSurfaceShapedc - the draw context the state key relates to.
Globe.getStateKey(DrawContext)public double getWidth()
protected void legacyRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
AbstractSurfaceShapeAbstractSurfaceShape.doRestoreState(gov.nasa.worldwind.util.RestorableSupport,
gov.nasa.worldwind.util.RestorableSupport.StateObject).
legacyRestoreState in class AbstractSurfaceShapers - RestorableSupport object which contains the state value properties.context - active context in the RestorableSupport to read state from.public void setCenter(LatLon center)
public void setHeading(Angle heading)
public void setHeight(double height)
public void setSize(double width,
double height)
public void setWidth(double width)
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||