|
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.layers.AbstractLayer
gov.nasa.worldwind.layers.RenderableLayer
gov.nasa.worldwind.layers.StarsLayer
public class StarsLayer
Renders a star background based on a subset of ESA Hipparcos catalog.
| Field Summary | |
|---|---|
protected static double |
DEFAULT_MIN_ACTIVE_ALTITUDE
|
protected static String |
DEFAULT_STARS_FILE
The default name of the stars file.s |
protected Angle |
latitudeOffset
The star sphere latitudinal rotation. |
protected Angle |
longitudeOffset
The star sphere longitudinal rotation. |
protected int |
numStars
|
protected Double |
radius
The radius of the spherical shell containing the stars. |
protected boolean |
rebuild
|
protected FloatBuffer |
starsBuffer
The float buffer holding the Cartesian star coordinates. |
protected String |
starsFileName
The stars file name. |
protected Object |
vboCacheKey
|
| Fields inherited from class gov.nasa.worldwind.layers.RenderableLayer |
|---|
pickSupport, renderables, renderablesOverride |
| Constructor Summary | |
|---|---|
StarsLayer()
Constructs a stars layer using the default stars file, which may be specified in Configuration. |
|
StarsLayer(String starsFileName)
Constructs a stars layer using a specified stars file. |
|
StarsLayer(String starsFileName,
Double radius)
Constructs a stars layer using a specified stars file and star-field radius. |
|
| Method Summary | |
|---|---|
void |
doRender(DrawContext dc)
|
protected boolean |
drawWithVBO(DrawContext dc)
|
protected void |
drawWithVertexArray(DrawContext dc)
|
protected void |
fillVbo(DrawContext dc)
Creates and fills this layer's vertex buffer. |
Angle |
getLatitudeOffset()
Returns the latitude offset (tilt) for the star sphere. |
Angle |
getLongitudeOffset()
Returns the longitude offset of the star sphere. |
String |
getStarsFileName()
Indicates the path and filename of the stars file. |
protected void |
initialize(String starsFileName,
Double radius)
Called by constructors to save the stars file name, the stars field radius and the layer's minimum active altitude. |
protected void |
loadStars()
Read stars file and load it into a float buffer. |
void |
setLatitudeOffset(Angle offset)
Sets the latitude offset (tilt) of the star sphere. |
void |
setLongitudeOffset(Angle offset)
Sets the longitude offset of the star sphere. |
void |
setStarsFileName(String fileName)
Specifies the path and filename of the stars file. |
String |
toString()
|
| Methods inherited from class gov.nasa.worldwind.layers.RenderableLayer |
|---|
addRenderable, addRenderables, clearRenderables, dispose, disposeRenderables, doPick, doPick, doPreRender, doPreRender, doRender, getActiveRenderables, getNumRenderables, getOpacity, getRenderables, onMessage, removeAllRenderables, removeRenderable, setOpacity, setRenderables |
| Methods inherited from class gov.nasa.worldwind.WWObjectImpl |
|---|
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, 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 |
|---|
protected static final double DEFAULT_MIN_ACTIVE_ALTITUDE
protected static final String DEFAULT_STARS_FILE
protected Angle latitudeOffset
protected Angle longitudeOffset
protected int numStars
protected Double radius
protected boolean rebuild
protected FloatBuffer starsBuffer
protected String starsFileName
protected Object vboCacheKey
| Constructor Detail |
|---|
public StarsLayer()
Configuration.
public StarsLayer(String starsFileName)
starsFileName - the full path the star file.
public StarsLayer(String starsFileName,
Double radius)
starsFileName - the full path the star file.radius - the radius of the stars sphere. May be null, in which case the radius in the stars file is
used.| Method Detail |
|---|
public void doRender(DrawContext dc)
doRender in class RenderableLayerprotected boolean drawWithVBO(DrawContext dc)
protected void drawWithVertexArray(DrawContext dc)
protected void fillVbo(DrawContext dc)
dc - the current draw context.public Angle getLatitudeOffset()
public Angle getLongitudeOffset()
public String getStarsFileName()
protected void initialize(String starsFileName,
Double radius)
starsFileName - the full path the star file.radius - the radius of the stars sphere. May be null, in which case the radius in the stars file is
used.protected void loadStars()
public void setLatitudeOffset(Angle offset)
offset - the latitude offset.public void setLongitudeOffset(Angle offset)
offset - the longitude offset.
IllegalArgumentException - if the angle is null.spublic void setStarsFileName(String fileName)
fileName - the path and filename.
IllegalArgumentException - if the file name is null or empty.public String toString()
toString in class RenderableLayer
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||