Interface FocusAreaBuilder


@ForUseOnly public interface FocusAreaBuilder
Builder for a focus area preset.
Since:
5.2.200705
  • Method Details

    • title

      @Contract("_ -> this") @NotNull FocusAreaBuilder title(@Nullable String title)
      Configures the title describing the focus area.
      Parameters:
      title - The title text.
      Returns:
      This builder.
      Since:
      5.2.200705
    • bounds

      @Contract("_ -> this") @NotNull FocusAreaBuilder bounds(@Nullable Rectangle bounds)
      Configures the bounds of the focus area preset based on absolute pixel coordinates inside the image, where 0x0 represents the top-left corner.
      Parameters:
      bounds - The bounds as pixel.
      Returns:
      This builder.
      Since:
      5.2.200705
    • orientationFromEulerAngles

      @Contract("_ -> this") @NotNull FocusAreaBuilder orientationFromEulerAngles(double pitch, double roll, double yaw)
      Configures the orientation of the subject as determined by its Euler angles pitch, roll and yaw. The given angles are expected to be specified as degree between -180 and 180. Each axis is described as follows, where left and right are taken from the observer's perspective:
      • pitch axis turns the head up (+) or down (-)
      • roll axis tilts the head to the left (-) or right (+)
      • yaw axis turns the head left (-) or right (+)
      The specified Euler angles will be used to determine a point on a sphere projected onto a 2D plane. This results in an orientation as 2D vector with a magnitude depending on the given 3D rotation.
      Parameters:
      pitch - Subject rotation on the pitch axis.
      roll - Subject rotation on the roll axis.
      yaw - Subject rotation on the yaw axis.
      Returns:
      This builder.
      Since:
      5.2.200705
    • orientationFromDegree

      @Contract("_ -> this") @NotNull FocusAreaBuilder orientationFromDegree(double degree)
      Configures the orientation as degree, where right is and top 90°
      Parameters:
      degree - The orientation as rotation in degree.
      Returns:
      This builder.
      Since:
      5.2.200705
    • orientationFromRatio

      @Contract("_ -> this") @NotNull FocusAreaBuilder orientationFromRatio(@Nullable Point2D.Double ratio)
      Configures the orientation represented as an optional 2D vector, which is to be considered as the viewing angle and field of view for calculating the total size of a resolution. The vector will be evaluated with the center of the focus area as its origin, while x points to the left (negative) and right (positive) and y points up (negative) and down (positive). The configured 2D vector and its magnitude may be used later to expand a the specified focus area bounds, while its magnitude is interpreted in relation to the radius of a unit circle fitting inside the focus area.
      Parameters:
      ratio - The 2D ratio vector.
      Returns:
      This builder.
      Since:
      5.2.200705
    • orientationFromPoint

      @Contract("_ -> this") @NotNull FocusAreaBuilder orientationFromPoint(@Nullable Point point)
      Configures the orientation as directional 2D ratio vector, based on the given point of interest inside the image.
      Parameters:
      point - The point of interest inside the image.
      Returns:
      This builder.
      Since:
      5.2.200705
    • create

      Creates the FocusArea using the configured settings.
      Returns:
      The focus area preset.
      Since:
      5.2.200705