NASA World Wind

gov.nasa.worldwind.layers
Class FogLayer

java.lang.Object
  extended by gov.nasa.worldwind.avlist.AVListImpl
      extended by gov.nasa.worldwind.WWObjectImpl
          extended by gov.nasa.worldwind.layers.AbstractLayer
              extended by gov.nasa.worldwind.layers.RenderableLayer
                  extended by gov.nasa.worldwind.layers.FogLayer
All Implemented Interfaces:
AVList, Disposable, Layer, Restorable, WWObject, PropertyChangeListener, EventListener

public class FogLayer
extends RenderableLayer

Sets fog range/density according to view altitude.


Field Summary
 
Fields inherited from class gov.nasa.worldwind.avlist.AVListImpl
changeSupport
 
Constructor Summary
FogLayer()
          Sets fog range/density according to view altitude
 
Method Summary
 void doRender(DrawContext dc)
          Setup fog
 Color getColor()
          Get the fog color
 float getFarFactor()
          Get the far distance factor that is applied to the eye distance to the horizon.
 float getNearFactor()
          Get the near distance factor that is applied to the view altitude.
 void setColor(Color color)
          Set the fog color
 void setFarFactor(float factor)
          Set the far distance factor applied to the eye distance to the horizon
 void setNearFactor(float factor)
          Set the near distance factor applied to the view altitude
 String toString()
           
 
Methods inherited from class gov.nasa.worldwind.layers.RenderableLayer
addRenderable, addRenderables, dispose, doPick, getDelegateOwner, getRenderables, removeAllRenderables, removeRenderable, setRenderables
 
Methods inherited from class gov.nasa.worldwind.layers.AbstractLayer
getMaxActiveAltitude, getMinActiveAltitude, getName, getOpacity, getRestorableState, getScale, isAtMaxResolution, isEnabled, isLayerActive, isLayerInView, isMultiResolution, isPickEnabled, pick, render, restoreState, setEnabled, setMaxActiveAltitude, setMinActiveAltitude, setName, setOpacity, setPickEnabled
 
Methods inherited from class gov.nasa.worldwind.WWObjectImpl
propertyChange
 
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, wait, wait, wait
 
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
 
Methods inherited from interface java.beans.PropertyChangeListener
propertyChange
 

Constructor Detail

FogLayer

public FogLayer()
Sets fog range/density according to view altitude

Method Detail

doRender

public void doRender(DrawContext dc)
Setup fog

Overrides:
doRender in class RenderableLayer
Parameters:
dc - the current DrawContext

getColor

public Color getColor()
Get the fog color

Returns:
the fog color

getFarFactor

public float getFarFactor()
Get the far distance factor that is applied to the eye distance to the horizon.

Returns:
the far factor

getNearFactor

public float getNearFactor()
Get the near distance factor that is applied to the view altitude.

Returns:
the near factor

setColor

public void setColor(Color color)
Set the fog color

Parameters:
color - the fog color

setFarFactor

public void setFarFactor(float factor)
Set the far distance factor applied to the eye distance to the horizon

Parameters:
factor - the factor to apply to the eye distance to the horizon

setNearFactor

public void setNearFactor(float factor)
Set the near distance factor applied to the view altitude

Parameters:
factor - the factor to apply to the view altitude

toString

public String toString()
Overrides:
toString in class RenderableLayer

NASA World Wind