public class StarsLayer extends RenderableLayer
Modifier and Type | Field and Description |
---|---|
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 |
pickSupport, renderables, renderablesOverride
Constructor and Description |
---|
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.
|
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.
|
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() |
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
propertyChange
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
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.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 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