Class DepthOfFieldModel.Builder

java.lang.Object
com.luciad.maps.effects.DepthOfFieldModel.Builder
All Implemented Interfaces:
AutoCloseable
Enclosing class:
DepthOfFieldModel

public static final class DepthOfFieldModel.Builder extends Object implements AutoCloseable
Since:
2026.1
  • Constructor Details

    • Builder

      public Builder(@NotNull DepthOfFieldModel.Builder other)
      Copy constructor.
      Parameters:
      other - the builder to copy.
  • Method Details

    • finalize

      protected void finalize()
      Overrides:
      finalize in class Object
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • blurStrength

      @NotNull public DepthOfFieldModel.Builder blurStrength(double blurStrength) throws IllegalArgumentException
      Sets the blur strength multiplier.

      This value scales the amount of blur applied to out-of-focus objects: at the default of 1, fully out-of-focus objects reach the maximum blur, values above 1 reach the maximum over a shorter distance, and values below 1 soften the blur. The default is 1.

      Parameters:
      blurStrength - the blur strength multiplier. Must be non-negative.
      Returns:
      this builder.
      Throws:
      IllegalArgumentException - when the blur strength is negative.
    • focusDistance

      @NotNull public DepthOfFieldModel.Builder focusDistance(double focusDistance) throws IllegalArgumentException
      Sets the focus distance in meters: the distance from the camera at which objects are perfectly in focus.

      This distance defines the focus plane, around which the blur-start distance and full-blur distance are measured. The default focus distance is 200.

      Parameters:
      focusDistance - the focus distance in meters. Must be non-negative.
      Returns:
      this builder.
      Throws:
      IllegalArgumentException - when the focus distance is negative.
    • blurStartDistance

      @NotNull public DepthOfFieldModel.Builder blurStartDistance(double blurStartDistance) throws IllegalArgumentException
      Sets the blur-start distance in meters: the distance from the focus plane beyond which objects start to blur.

      Within this distance objects stay perfectly sharp. It is measured symmetrically around the focus plane. The default is 200.

      Parameters:
      blurStartDistance - the blur-start distance in meters. Must be non-negative.
      Returns:
      this builder.
      Throws:
      IllegalArgumentException - when the blur-start distance is negative.
    • fullBlurDistance

      @NotNull public DepthOfFieldModel.Builder fullBlurDistance(double fullBlurDistance) throws IllegalArgumentException
      Sets the full-blur distance in meters: the distance from the focus plane at which the blur saturates and objects are fully blurred.

      Between the blur-start distance and this distance objects are blurred progressively. The full-blur distance must be at least the blur-start distance, which build verifies. Setting it equal to the blur-start distance gives an immediate transition to full blur (no progressive blurring). The default is 400.

      Parameters:
      fullBlurDistance - the full-blur distance in meters. Must be non-negative.
      Returns:
      this builder.
      Throws:
      IllegalArgumentException - when the full-blur distance is negative.
    • build

      @NotNull public DepthOfFieldModel build() throws IllegalArgumentException
      Builds the depth-of-field model.
      Returns:
      the built depth-of-field model.
      Throws:
      IllegalArgumentException - when the blur-start distance is larger than the full-blur distance.