Interface DeltaCallback64

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface DeltaCallback64
Functional interface for calculating a variable delta during polygon offsetting.

Implementations of this interface define how to calculate the delta (the amount of offset) to apply at each point in a polygon during an offset operation. The offset can vary from point to point, allowing for variable offsetting.

  • Method Summary

    Modifier and Type
    Method
    Description
    double
    calculate(Path64 path, PathD path_norms, int currPt, int prevPt)
    Calculates the delta (offset) for a given point in the polygon path.
  • Method Details

    • calculate

      double calculate(Path64 path, PathD path_norms, int currPt, int prevPt)
      Calculates the delta (offset) for a given point in the polygon path.

      This method is used during polygon offsetting operations to determine the amount by which each point of the polygon should be offset.

      Parameters:
      path - The Path64 object representing the original polygon path.
      path_norms - The PathD object containing the normals of the path, which may be used to influence the delta calculation.
      currPt - The index of the current point in the path for which the delta is being calculated.
      prevPt - The index of the previous point in the path, which can be referenced to determine the delta based on adjacent segments.
      Returns:
      A double value representing the calculated delta for the current point. This value will be used to offset the point in the resulting polygon.