Package com.luciad.maps.effects
Class DepthOfFieldModel
java.lang.Object
com.luciad.maps.effects.DepthOfFieldModel
- All Implemented Interfaces:
AutoCloseable
Immutable set of parameters that describe the
DepthOfFieldEffect, which blurs parts of the map based on their distance to the camera.
This model uses 4 parameters:
- The focusDistance parameter is the distance from the camera, in meters, at which objects are perfectly in focus.
- The blurStartDistance parameter is the distance from the focus plane, in meters, beyond which objects start to blur. Within this distance objects stay perfectly sharp.
- The fullBlurDistance parameter is the distance from the focus plane, in meters, at which the blur saturates and objects are fully blurred. Between blurStartDistance and fullBlurDistance objects are blurred progressively.
- The blurStrength parameter is a multiplier that increases or decreases the strength of the blur.
The sharp and blurred zones are symmetric around the focus plane: the pattern is the same toward the camera and away from it. blurStartDistance and fullBlurDistance are measured from the focus plane and apply equally on both sides:
camera focus plane
o.........|------------|==============|==============|------------|.........
Fb Bs Bs Fb
=== sharp --- blurring ... fully blurred
Bs = blurStartDistance Fb = fullBlurDistance
Create one with DepthOfFieldModel#newBuilder, or start from an existing model with asBuilder, and apply it with DepthOfFieldEffect#setModel.
- Since:
- 2026.1
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionCreates a builder pre-filled with this model's parameters.voidclose()booleanprotected voidfinalize()doubleReturns the blur-start distance in meters.doubleReturns the blur strength multiplier.doubleReturns the focus distance in meters.doubleReturns the full-blur distance in meters.inthashCode()static DepthOfFieldModel.BuilderCreates a new builder with the default depth-of-field parameters.
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
newBuilder
Creates a new builder with the default depth-of-field parameters.- Returns:
- a new builder.
-
asBuilder
Creates a builder pre-filled with this model's parameters.- Returns:
- a builder pre-filled with this model's parameters.
-
getBlurStrength
public double getBlurStrength()Returns the blur strength multiplier.- Returns:
- the blur strength multiplier.
-
getFocusDistance
public double getFocusDistance()Returns the focus distance in meters.- Returns:
- the focus distance in meters.
-
getBlurStartDistance
public double getBlurStartDistance()Returns the blur-start distance in meters.- Returns:
- the blur-start distance in meters.
-
getFullBlurDistance
public double getFullBlurDistance()Returns the full-blur distance in meters.- Returns:
- the full-blur distance in meters.
-
hashCode
public int hashCode() -
equals
-