Class ControlCurve

  • Direct Known Subclasses:
    Bezier, Bspline, NatCubic

    public abstract class ControlCurve
    extends Object
    This class represents a curve defined by a sequence of control points
    Author:
    Tim Lambert (http://www.cse.unsw.edu.au/~lambert/), Andrea Antonello (www.hydrologis.com)
    • Field Detail

      • pts

        protected List<org.locationtech.jts.geom.Coordinate> pts
      • selection

        protected int selection
    • Constructor Detail

      • ControlCurve

        public ControlCurve()
    • Method Detail

      • selectPoint

        public int selectPoint​(double x,
                               double y)
        return index of control point near to (x,y) or -1 if nothing near
      • addPoint

        public double addPoint​(double x,
                               double y)
        add a control point, return index of new control point
      • setPoint

        public void setPoint​(double x,
                             double y)
        set selected control point
      • removePoint

        public void removePoint()
        remove selected control point
      • getInterpolated

        public abstract List<org.locationtech.jts.geom.Coordinate> getInterpolated()