Package com.luciad.maps.effects
Class FogEffect
java.lang.Object
com.luciad.maps.effects.FogEffect
- All Implemented Interfaces:
AutoCloseable
Graphics effect that fades geometry into a fog color with increasing distance (and optionally with decreasing altitude), improving depth perception on large 3D scenes.
The effect is disabled by default and is only applied to a 3D view. On a 2D view it has no effect.
|
|
Fog is an artist-controlled alternative to the AtmosphereEffect scattering model: it does not require a light, and you steer it directly with distances in meters. See the map effects article for guidance on when to use fog versus atmospheric scattering.
The fog parameters are held by an immutable FogModel. Read them with getModel and change them by building a new model and passing it to setModel.
You cannot create a FogEffect. Retrieve it from GraphicsEffects#getFog.
- Since:
- 2026.1
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidfinalize()getModel()Returns the fog model.booleanReturns whether the fog effect is enabled.voidsetEnabled(boolean enabled) Sets whether the fog effect is enabled.voidSets the fog model.
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
isEnabled
public boolean isEnabled()Returns whether the fog effect is enabled.- Returns:
- whether the fog effect is enabled.
-
setEnabled
public void setEnabled(boolean enabled) Sets whether the fog effect is enabled.The default is
false.- Parameters:
enabled- true to enable the fog effect or false to disable it.
-
getModel
Returns the fog model.- Returns:
- the fog model.
-
setModel
Sets the fog model.- Parameters:
model- the fog model.- Throws:
NullPointerException- when the model is anullvalue.
-