Class RectangleDistanceFunction.RectangleDist

  • All Implemented Interfaces:
    RectangleDistanceFunction
    Enclosing interface:
    RectangleDistanceFunction

    public static class RectangleDistanceFunction.RectangleDist
    extends Object
    implements RectangleDistanceFunction
    This class calculates the distance to a rectangular shaped object. This class completely ignores the center given as parameter to the interface. TODO: maybe we could get rid of the center parameter altogether and always let the RectangleDistanceFunction hold it's reference points?
    • Constructor Detail

      • RectangleDist

        public RectangleDist​(double[] lower,
                             double[] upper)
    • Method Detail

      • dist

        public double dist​(double[] ignored,
                           double[] min,
                           double[] max)
        Specified by:
        dist in interface RectangleDistanceFunction
        Parameters:
        ignored - A point
        min - Minimum corner of axis aligned box
        max - Maximum corner of axis aligned box
        Returns:
        Distance between point and box