Class PointPair2D

java.lang.Object
inra.ijpb.geometry.PointPair2D

public class PointPair2D
extends java.lang.Object
A pair of points in the plane, useful for representing result of Max Feret Diameter computation or similar problems. Simply contains the reference to each extremity.
Author:
dlegland
See Also:
PointPair3D
  • Field Summary

    Fields
    Modifier and Type Field Description
    java.awt.geom.Point2D p1
    The first point of the pair.
    java.awt.geom.Point2D p2
    The second point of the pair.
  • Constructor Summary

    Constructors
    Constructor Description
    PointPair2D​(java.awt.geom.Point2D p1, java.awt.geom.Point2D p2)
    Creates a new point pair.
  • Method Summary

    Modifier and Type Method Description
    double angle()  
    double diameter()  

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • p1

      public final java.awt.geom.Point2D p1
      The first point of the pair.
    • p2

      public final java.awt.geom.Point2D p2
      The second point of the pair.
  • Constructor Details

    • PointPair2D

      public PointPair2D​(java.awt.geom.Point2D p1, java.awt.geom.Point2D p2)
      Creates a new point pair.
      Parameters:
      p1 - the first point of the pair.
      p2 - the second point of the pair.
  • Method Details

    • diameter

      public double diameter()
      Returns:
      the diameter of the pair, as the distance between the two points.
    • angle

      public double angle()
      Returns:
      the angle formed by this point pair, in radians.