public class StarsLayer extends RenderableLayer
Modifier and Type | Field and Description |
---|---|
protected static double |
DEFAULT_MIN_ACTIVE_ALTITUDE |
protected static java.lang.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 java.lang.Double |
radius
The radius of the spherical shell containing the stars.
|
protected boolean |
rebuild |
protected java.nio.FloatBuffer |
starsBuffer
The float buffer holding the Cartesian star coordinates.
|
protected java.lang.String |
starsFileName
The stars file name.
|
protected java.lang.Object |
vboCacheKey |
pickSupport, renderables, renderablesOverride
Constructor and Description |
---|
StarsLayer()
Constructs a stars layer using the default stars file, which may be specified in
Configuration . |
StarsLayer(java.lang.String starsFileName)
Constructs a stars layer using a specified stars file.
|
StarsLayer(java.lang.String starsFileName,
java.lang.Double radius)
Constructs a stars layer using a specified stars file and star-field radius.
|
Modifier and Type | Method and Description |
---|---|
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.
|
java.lang.String |
getStarsFileName()
Indicates the path and filename of the stars file.
|
protected void |
initialize(java.lang.String starsFileName,
java.lang.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(java.lang.String fileName)
Specifies the path and filename of the stars file.
|
java.lang.String |
toString() |
addRenderable, addRenderable, addRenderables, clearRenderables, dispose, disposeRenderables, doPick, doPick, doPreRender, doPreRender, doRender, getActiveRenderables, getNumRenderables, getOpacity, getRenderables, onMessage, removeAllRenderables, removeRenderable, setOpacity, setRenderables
createLayerConfigElements, getDataFileStore, getExpiryTime, getLayerConfigParams, getMaxActiveAltitude, getMaxEffectiveAltitude, getMinActiveAltitude, getMinEffectiveAltitude, getName, getRestorableState, getScale, getScreenCredit, isAtMaxResolution, isEnabled, isLayerActive, isLayerConfigDocument, isLayerInView, isMultiResolution, isNetworkRetrievalEnabled, isPickEnabled, pick, preRender, render, restoreState, setDataFileStore, setEnabled, setExpiryTime, setMaxActiveAltitude, setMinActiveAltitude, setName, setNetworkRetrievalEnabled, setPickEnabled, setScreenCredit
propertyChange
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
protected static final double DEFAULT_MIN_ACTIVE_ALTITUDE
protected static final java.lang.String DEFAULT_STARS_FILE
protected Angle latitudeOffset
protected Angle longitudeOffset
protected int numStars
protected java.lang.Double radius
protected boolean rebuild
protected java.nio.FloatBuffer starsBuffer
protected java.lang.String starsFileName
protected java.lang.Object vboCacheKey
public StarsLayer()
Configuration
.public StarsLayer(java.lang.String starsFileName)
starsFileName
- the full path the star file.public StarsLayer(java.lang.String starsFileName, java.lang.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.public void doRender(DrawContext dc)
doRender
in class RenderableLayer
protected 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 java.lang.String getStarsFileName()
protected void initialize(java.lang.String starsFileName, java.lang.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.java.lang.IllegalArgumentException
- if the angle is null.spublic void setStarsFileName(java.lang.String fileName)
fileName
- the path and filename.java.lang.IllegalArgumentException
- if the file name is null or empty.public java.lang.String toString()
toString
in class RenderableLayer