Package com.luciad.maps.effects
Class AtmosphereEffect
java.lang.Object
com.luciad.maps.effects.AtmosphereEffect
- All Implemented Interfaces:
AutoCloseable
Graphics effect which adds a sky/atmosphere background to a 3D view.
This effect is only applied in 3D views.
If the view has a geocentric reference, an atmospheric glow effect is drawn around the globe. The colors of this glow can be configured using setHorizonColor()
and setSkyColor()
.
You cannot create an AtmosphereEffect
. Instead, you can retrieve it from GraphicsEffects#getAtmosphere
.
- Since:
- 2023.1
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
protected void
finalize()
android.graphics.Color
Returns the horizon color.android.graphics.Color
Returns the sky color.boolean
Returns whether the atmosphere effect is enabled.void
setEnabled
(boolean enabled) Sets whether the atmosphere effect is enabled.void
setHorizonColor
(android.graphics.Color color) Sets the horizon color.void
setSkyColor
(android.graphics.Color color) Sets the sky color.
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
isEnabled
public boolean isEnabled()Returns whether the atmosphere effect is enabled.- Returns:
- whether the atmosphere effect is enabled.
-
setEnabled
public void setEnabled(boolean enabled) Sets whether the atmosphere effect is enabled.The default is
true
.- Parameters:
enabled
- true to enable the atmosphere effect or false to disable it.
-
getSkyColor
@NotNull public android.graphics.Color getSkyColor()Returns the sky color.Only used in geocentric views, where a gradient going from
getHorizonColor()
togetSkyColor()
will be visible on the horizon.- Returns:
- the color of the sky.
-
setSkyColor
public void setSkyColor(@NotNull android.graphics.Color color) Sets the sky color.- Parameters:
color
- the sky color.
-
getHorizonColor
@NotNull public android.graphics.Color getHorizonColor()Returns the horizon color.Only used in geocentric views, where a gradient going from
getHorizonColor()
togetSkyColor()
will be visible on the horizon.- Returns:
- the color of the horizon.
-
setHorizonColor
public void setHorizonColor(@NotNull android.graphics.Color color) Sets the horizon color.- Parameters:
color
- the horizon color.
-