NASA World Wind

gov.nasa.worldwind.layers
Class StarsLayer

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.StarsLayer
All Implemented Interfaces:
AVList, Disposable, Layer, Restorable, WWObject, PropertyChangeListener, EventListener

public class StarsLayer
extends RenderableLayer

Renders a star background based on a subset of ESA Hipparcos catalog.


Field Summary
protected  String starsFileName
           
 
Fields inherited from class gov.nasa.worldwind.avlist.AVListImpl
changeSupport
 
Constructor Summary
StarsLayer()
          A RenderableLayer that displays a star background
StarsLayer(String starsFileName)
          A RenderableLayer that displays a star background
 
Method Summary
 void dispose()
          Disposes the contents of this layer's internal Renderable collection, but does not remove any elements from that collection.
 void doRender(DrawContext dc)
           
 float getBrightness()
          Get the actual brightness multiplier.
 Angle getLatitudeOffset()
          Returns the latitude offset or relative tilt for the star sphere.
 Angle getLongitudeOffset()
          Returns the longitude offset or rotation of the star sphere.
 double getRadius()
          Get the star sphere radius.
 String getStarsFileName()
          Get the path and filename of the stars catalog file.
 void setBrightness(float brightness)
          Set the brightness multiplier.
 void setLatitudeOffset(Angle offset)
          Sets the latitude offset or relative tilt of the star sphere.
 void setLongitudeOffset(Angle offset)
          Sets the longitude offset or rotation of the star sphere.
 void setRadius(double radius)
          Set the star sphere radius in meter.
 void setStarsFileName(String fileName)
          Set the path and filename of the stars catalog file.
 String toString()
           
 
Methods inherited from class gov.nasa.worldwind.layers.RenderableLayer
addRenderable, addRenderables, 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
 

Field Detail

starsFileName

protected String starsFileName
Constructor Detail

StarsLayer

public StarsLayer()
A RenderableLayer that displays a star background


StarsLayer

public StarsLayer(String starsFileName)
A RenderableLayer that displays a star background

Parameters:
starsFileName - the path and filename of the star catalog file
Method Detail

dispose

public void dispose()
Description copied from class: RenderableLayer
Disposes the contents of this layer's internal Renderable collection, but does not remove any elements from that collection.

Specified by:
dispose in interface Disposable
Overrides:
dispose in class RenderableLayer

doRender

public void doRender(DrawContext dc)
Overrides:
doRender in class RenderableLayer

getBrightness

public float getBrightness()
Get the actual brightness multiplier.

Returns:
brightness

getLatitudeOffset

public Angle getLatitudeOffset()
Returns the latitude offset or relative tilt for the star sphere.

Returns:
the latitude offset.

getLongitudeOffset

public Angle getLongitudeOffset()
Returns the longitude offset or rotation of the star sphere.

Returns:
the longitude offset.

getRadius

public double getRadius()
Get the star sphere radius.

Returns:
the star sphere radius in meter.

getStarsFileName

public String getStarsFileName()
Get the path and filename of the stars catalog file.


setBrightness

public void setBrightness(float brightness)
Set the brightness multiplier. eg : 1.0f = no change, 0.5f = darker, 2.0f = brighter.

Parameters:
brightness - the brightness multiplier

setLatitudeOffset

public void setLatitudeOffset(Angle offset)
Sets the latitude offset or relative tilt of the star sphere.

Parameters:
offset - the latitude offset.

setLongitudeOffset

public void setLongitudeOffset(Angle offset)
Sets the longitude offset or rotation of the star sphere.

Parameters:
offset - the longitude offset.

setRadius

public void setRadius(double radius)
Set the star sphere radius in meter.

Parameters:
radius - the radius in meter.

setStarsFileName

public void setStarsFileName(String fileName)
Set the path and filename of the stars catalog file.

Parameters:
fileName - the path and filename

toString

public String toString()
Overrides:
toString in class RenderableLayer

NASA World Wind