public class Atmosphere
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
fragmentShaderAtmosTri |
static java.lang.String |
fragmentShaderGroundTri |
static java.lang.String |
k_blendColor |
static java.lang.String |
k_ESun |
static java.lang.String |
k_fCameraHeight |
static java.lang.String |
k_fCameraHeight2 |
static java.lang.String |
k_fExposure |
static java.lang.String |
k_fInnerRadius |
static java.lang.String |
k_fInnerRadius2 |
static java.lang.String |
k_fOuterRadius |
static java.lang.String |
k_fOuterRadius2 |
static java.lang.String |
k_fSamples |
static java.lang.String |
k_fScale |
static java.lang.String |
k_fScaleDepth |
static java.lang.String |
k_fScaleOverScaleDepth |
static java.lang.String |
k_g |
static java.lang.String |
k_g2 |
static java.lang.String |
k_Km |
static java.lang.String |
k_Km4PI |
static java.lang.String |
k_KmESun |
static java.lang.String |
k_Kr |
static java.lang.String |
k_Kr4PI |
static java.lang.String |
k_KrESun |
static java.lang.String |
k_nSamples |
static java.lang.String |
k_v3CameraPos |
static java.lang.String |
k_v3InvWavelength |
static java.lang.String |
k_v3LightPos |
static java.lang.String |
kAtmosphereGroundShader |
static java.lang.String |
kAtmosphereShader |
static int |
kMaplyAtmosphereDrawPriorityDefault |
static java.lang.String |
vertexShaderAtmosTri |
static java.lang.String |
vertexShaderGroundTri |
Constructor and Description |
---|
Atmosphere(GlobeController inViewC,
RenderControllerInterface.ThreadMode mode)
Set up the atmospheric shaders and the default parameters for rendering.
|
Modifier and Type | Method and Description |
---|---|
float |
geteSun()
Brightness of the sun (20.0 by default)
|
float |
getExposure()
Exposure constant in fragment shader.
|
float |
getG()
Constant used in the fragment shader.
|
Shader |
getGroundShader()
The ground shader we set up.
|
float |
getKm()
Mie scattering constant (0.0010 by default)
|
float |
getKr() |
int |
getNumSamples()
Number of samples for the ray through the atmosphere (3 by default)
|
float |
getOuterRadius()
Outer radius of the atmosphere (1.05 by default).
|
float[] |
getWaveLength()
Wavelengths of the light (RGB).
|
float |
getWavelengthForComponent(short component)
Wavelengths of the light (RGB).
|
void |
removeFromController()
Remove any objects from the globe controller and shut down the atmosphere.
|
void |
seteSun(float eSun)
Brightness of the sun (20.0 by default)
|
void |
setExposure(float exposure)
Exposure constant in fragment shader.
|
void |
setG(float g)
Constant used in the fragment shader.
|
void |
setKm(float km)
Mie scattering constant (0.0010 by default)
|
void |
setKr(float kr)
Rayleigh scattering constant (0.0025 by default)
|
void |
setLockToCamera(boolean newVal)
If set, we'll lock the sun to the camera position.
|
void |
setNumSamples(int numSamples)
Number of samples for the ray through the atmosphere (3 by default)
|
void |
setOuterRadius(float outerRadius)
Outer radius of the atmosphere (1.05 by default).
|
void |
setSunPosition(Point3d sunDir)
Set the sun's position relative to the earth.
|
Shader |
setupShader()
Return the shader for use by the atmosphere.
|
void |
setWaveLength(float[] waveLength)
Wavelengths of the light (RGB).
|
void |
setWaveLength(float redWavelength,
float greenWavelength,
float blueWavelength)
Wavelengths of the light (RGB).
|
public static final java.lang.String k_v3CameraPos
public static final java.lang.String k_v3LightPos
public static final java.lang.String k_fCameraHeight
public static final java.lang.String k_fCameraHeight2
public static final java.lang.String k_fInnerRadius
public static final java.lang.String k_fInnerRadius2
public static final java.lang.String k_fOuterRadius
public static final java.lang.String k_fOuterRadius2
public static final java.lang.String k_fScale
public static final java.lang.String k_fScaleDepth
public static final java.lang.String k_fScaleOverScaleDepth
public static final java.lang.String k_Kr
public static final java.lang.String k_Kr4PI
public static final java.lang.String k_Km
public static final java.lang.String k_Km4PI
public static final java.lang.String k_ESun
public static final java.lang.String k_KmESun
public static final java.lang.String k_KrESun
public static final java.lang.String k_v3InvWavelength
public static final java.lang.String k_fSamples
public static final java.lang.String k_nSamples
public static final java.lang.String k_g
public static final java.lang.String k_g2
public static final java.lang.String k_fExposure
public static final java.lang.String k_blendColor
public static final java.lang.String vertexShaderAtmosTri
public static final java.lang.String fragmentShaderAtmosTri
public static final java.lang.String kAtmosphereShader
public static final java.lang.String vertexShaderGroundTri
public static final java.lang.String fragmentShaderGroundTri
public static final java.lang.String kAtmosphereGroundShader
public static final int kMaplyAtmosphereDrawPriorityDefault
public Atmosphere(GlobeController inViewC, RenderControllerInterface.ThreadMode mode)
inViewC
- The globe controller to create objects in.mode
- Whether or not to work on this thread on put the work in the background.public float getKr()
public void setKr(float kr)
public float getKm()
public void setKm(float km)
public float geteSun()
public void seteSun(float eSun)
public int getNumSamples()
public void setNumSamples(int numSamples)
public float getOuterRadius()
public void setOuterRadius(float outerRadius)
public float getG()
public void setG(float g)
public float getExposure()
public void setExposure(float exposure)
public Shader getGroundShader()
public void setLockToCamera(boolean newVal)
public void setWaveLength(float[] waveLength)
public void setWaveLength(float redWavelength, float greenWavelength, float blueWavelength)
public float[] getWaveLength()
public float getWavelengthForComponent(short component)
public void setSunPosition(Point3d sunDir)
public Shader setupShader()
public void removeFromController()