gov.nasa.worldwind.layers
Class AirspaceLayer
java.lang.Object
gov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.WWObjectImpl
gov.nasa.worldwind.layers.AbstractLayer
gov.nasa.worldwind.layers.AirspaceLayer
- All Implemented Interfaces:
- AVList, Disposable, Layer, Restorable, WWObject, PropertyChangeListener, EventListener
public class AirspaceLayer - extends AbstractLayer
The Airspace class manages a collection of Airspace objects
for rendering and picking. AirspaceLayer delegates to its internal
AirspaceRenderer for rendering and picking operations.
- See Also:
Airspace,
AirspaceRenderer
|
Constructor Summary |
AirspaceLayer()
Creates a new Airspace with an empty collection of Airspaces. |
| Methods inherited from class gov.nasa.worldwind.layers.AbstractLayer |
dispose, doPreRender, getExpiryTime, getMaxActiveAltitude, getMinActiveAltitude, getName, getOpacity, getRestorableState, getScale, getScreenCredit, isAtMaxResolution, isEnabled, isLayerActive, isLayerInView, isMultiResolution, isNetworkRetrievalEnabled, isPickEnabled, pick, preRender, render, restoreState, setEnabled, setExpiryTime, setMaxActiveAltitude, setMinActiveAltitude, setName, setNetworkRetrievalEnabled, setOpacity, setPickEnabled, setScreenCredit |
| 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 interface gov.nasa.worldwind.avlist.AVList |
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
AirspaceLayer
public AirspaceLayer()
- Creates a new
Airspace with an empty collection of Airspaces.
addAirspace
public void addAirspace(Airspace airspace)
- Adds the specified
airspace to this layer's internal collection.
If this layer's internal collection has been overriden with a call to setAirspaces(java.lang.Iterable),
this will throw an exception.
- Parameters:
airspace - Airspace to add.
- Throws:
IllegalArgumentException - If airspace is null.
IllegalStateException - If a custom Iterable has been specified by a call to setAirspaces.
addAirspaces
public void addAirspaces(Iterable<Airspace> airspaces)
- Adds the contents of the specified
airspaces to this layer's internal collection.
If this layer's internal collection has been overriden with a call to setAirspaces(java.lang.Iterable),
this will throw an exception.
- Parameters:
airspaces - Airspaces to add.
- Throws:
IllegalArgumentException - If airspaces is null.
IllegalStateException - If a custom Iterable has been specified by a call to setAirspaces.
doPick
protected void doPick(DrawContext dc,
Point pickPoint)
- Overrides:
doPick in class AbstractLayer
doRender
protected void doRender(DrawContext dc)
- Specified by:
doRender in class AbstractLayer
getAirspaces
public Iterable<Airspace> getAirspaces()
- Returns the Iterable of Airspaces currently in use by this layer.
If the caller has specified a custom Iterable via
setAirspaces(java.lang.Iterable), this will returns a reference
to that Iterable. If the caller passed setAirspaces a null parameter,
or if setAirspaces has not been called, this returns a view of this layer's internal
collection of Airspaces.
- Returns:
- Iterable of currently active Airspaces.
getDepthOffsetFactor
public double getDepthOffsetFactor()
getDepthOffsetUnits
public double getDepthOffsetUnits()
getLightDirection
public Vec4 getLightDirection()
getLightMaterial
public Material getLightMaterial()
getRenderer
protected AirspaceRenderer getRenderer()
isDrawExtents
public boolean isDrawExtents()
isDrawWireframe
public boolean isDrawWireframe()
isEnableAntialiasing
public boolean isEnableAntialiasing()
isEnableBlending
public boolean isEnableBlending()
isEnableDepthOffset
public boolean isEnableDepthOffset()
isEnableLighting
public boolean isEnableLighting()
removeAirspace
public void removeAirspace(Airspace airspace)
- Removes the specified
airspace from this layer's internal collection, if it exists.
If this layer's internal collection has been overriden with a call to setAirspaces(java.lang.Iterable),
this will throw an exception.
- Parameters:
airspace - Airspace to remove.
- Throws:
IllegalArgumentException - If airspace is null.
IllegalStateException - If a custom Iterable has been specified by a call to setAirspaces.
removeAllAirspaces
public void removeAllAirspaces()
- Clears the contents of this layer's internal Airspace collection.
If this layer's internal collection has been overriden with a call to
setAirspaces(java.lang.Iterable),
this will throw an exception.
- Throws:
IllegalStateException - If a custom Iterable has been specified by a call to setAirspaces.
setAirspaces
public void setAirspaces(Iterable<Airspace> airspaceIterable)
- Overrides the collection of currently active Airspaces with the specified
airspaceIterable.
This layer will maintain a reference to airspaceIterable strictly for picking and rendering.
This layer will not modify the Iterable reference. However, this will clear
the internal collection of Airspaces, and will prevent any modification to its contents via
addAirspace, addAirspaces, or removeAirspaces.
If the specified airspaceIterable is null, this layer will revert to maintaining its internal
collection.
- Parameters:
airspaceIterable - Iterable to use instead of this layer's internal collection, or null to use this
layer's internal collection.
setDepthOffsetFactor
public void setDepthOffsetFactor(double factor)
setDepthOffsetUnits
public void setDepthOffsetUnits(double units)
setDrawExtents
public void setDrawExtents(boolean draw)
setDrawWireframe
public void setDrawWireframe(boolean draw)
setEnableAntialiasing
public void setEnableAntialiasing(boolean enable)
setEnableBlending
public void setEnableBlending(boolean enable)
setEnableDepthOffset
public void setEnableDepthOffset(boolean enable)
setEnableLighting
public void setEnableLighting(boolean enable)
setLightDirection
public void setLightDirection(Vec4 direction)
setLightMaterial
public void setLightMaterial(Material material)
toString
public String toString()
- Overrides:
toString in class AbstractLayer
|
|