Class IntersectionPoint

java.lang.Object
java.awt.geom.Point2D
java.awt.geom.Point2D.Double
org.jhotdraw8.geom.intersect.IntersectionPoint
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
IntersectionPointEx

public class IntersectionPoint extends Point2D.Double
Provides the coordinates and the argument value of one intersecting function at an intersection point.

This class extends Point2D.Double rather than aggregating it to reduce pointer chasing. As a consequence, IntersectionPoint only uses the x and y coordinates for equals and hashCode.

See Also:
  • Field Details

    • argumentA

      protected final double argumentA
    • segmentA

      protected final int segmentA
  • Constructor Details

    • IntersectionPoint

      public IntersectionPoint(double x, double y, double argumentA)
    • IntersectionPoint

      public IntersectionPoint(double x, double y, double argumentA, int segmentA)
    • IntersectionPoint

      public IntersectionPoint(Point2D p, double argumentA)
    • IntersectionPoint

      public IntersectionPoint(Point2D p, double argumentA, int segmentA)
  • Method Details

    • argumentA

      public double argumentA()
    • segmentA

      public int segmentA()
      If parametric function 'a' is a segment of a segmented function, then this field is used to indicate to which segment the parametric function belongs.

      The index of the segment.

    • toString

      public String toString()
      Overrides:
      toString in class Point2D.Double