|
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.SkyGradientLayer
public class SkyGradientLayer
Renders an atmosphere around the globe and a sky dome at low altitude.
Note : based on a spherical globe.
| Field Summary | |
|---|---|
protected float[] |
horizonColor
|
protected static int |
SLICES
|
protected static int |
STACKS
|
protected double |
thickness
|
protected float[] |
zenithColor
|
| Constructor Summary | |
|---|---|
SkyGradientLayer()
Renders an atmosphere around the globe |
|
| Method Summary | |
|---|---|
protected void |
applyDrawProjection(DrawContext dc,
OGLStackHandler ogsh)
|
protected void |
applyDrawTransform(DrawContext dc,
OGLStackHandler ogsh)
|
protected static Vec4 |
CartesianToSpherical(double x,
double y,
double z)
Converts position in cartesian coordinates (XYZ) to spherical (radius, lat, lon) coordinates. |
void |
doRender(DrawContext dc)
|
protected void |
drawSkyDome(DrawContext dc,
float radius,
double startLat,
double endLat,
int slices,
int stacks,
float zenithOpacity,
float gradientBias)
Draws the sky dome |
double |
getAtmosphereThickness()
Get the atmosphere thickness in meter |
Color |
getHorizonColor()
Get the horizon color |
Color |
getZenithColor()
Get the zenith color |
void |
setAtmosphereThickness(double thickness)
Set the atmosphere thickness in meter |
void |
setHorizonColor(Color color)
Set the horizon color |
void |
setZenithColor(Color color)
Set the zenith color |
protected static Vec4 |
SphericalToCartesian(double latitude,
double longitude,
double radius)
Converts position in spherical coordinates (lat/lon/altitude) to cartesian (XYZ) coordinates. |
String |
toString()
|
protected void |
updateSkyDome(DrawContext dc)
|
| Methods inherited from class gov.nasa.worldwind.WWObjectImpl |
|---|
onMessage, 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 |
| Methods inherited from interface gov.nasa.worldwind.event.MessageListener |
|---|
onMessage |
| Field Detail |
|---|
protected float[] horizonColor
protected static final int SLICES
protected static final int STACKS
protected double thickness
protected float[] zenithColor
| Constructor Detail |
|---|
public SkyGradientLayer()
| Method Detail |
|---|
protected void applyDrawProjection(DrawContext dc,
OGLStackHandler ogsh)
protected void applyDrawTransform(DrawContext dc,
OGLStackHandler ogsh)
protected static Vec4 CartesianToSpherical(double x,
double y,
double z)
x - X coordinatey - Y coordinatez - Z coordinate
Vec4 point for the spherical coordinates {radius, lat, lon}public void doRender(DrawContext dc)
doRender in class AbstractLayer
protected void drawSkyDome(DrawContext dc,
float radius,
double startLat,
double endLat,
int slices,
int stacks,
float zenithOpacity,
float gradientBias)
dc - the current DrawContextradius - the sky dome radiusstartLat - the horizon latitudeendLat - the zenith latitudeslices - the number of slices - vertical divisionsstacks - the nuber os stacks - horizontal divisionszenithOpacity - the sky opacity at zenithgradientBias - determines how fast the sky goes from the horizon color to the zenith color. A value of
1 with produce a balanced gradient, a value greater then 1 will
have the zenith color dominate and a value less then 1 will have the opposite
effect.public double getAtmosphereThickness()
public Color getHorizonColor()
public Color getZenithColor()
public void setAtmosphereThickness(double thickness)
thickness - the atmosphere thickness in meterpublic void setHorizonColor(Color color)
color - the horizon colorpublic void setZenithColor(Color color)
color - the zenith color
protected static Vec4 SphericalToCartesian(double latitude,
double longitude,
double radius)
latitude - Latitude in decimal degreeslongitude - Longitude in decimal degreesradius - Radius
public String toString()
toString in class AbstractLayerprotected void updateSkyDome(DrawContext dc)
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||