src/main/java/de/javagl/geom/CatmullRomSpline.java
/**
     * Set the position of the specified control point
     * 
     * @param index The index of the point
     * @param point The position that the control point will have afterwards
     */
Set the position of the specified control point

@param index The index of the point
@param point The position that the control point will have afterwards
Set the position of the specified control point @param index The index of the point @param point The position that the control point will have afterwards
void updateControlPoint(int index, Point2D point)
    {
        int numPoints = controlPoints.size() - (closed ? 3 : 2);
        if (index < 0)
        {
            throw new IndexOutOfBoundsException(
                "Index "+index+" must be positive");
        }
        if (index >= controlPoints.size() - 1)
        {
            throw new IndexOutOfBoundsException(
                "Index was "+index+", but number of control " + 
                "points was "+numPoints);
        }
        Point2D cp = controlPoints.get(index+1);
        cp.setLocation(point);
        updateRequired = true;
    }
void updateControlPoint ( int index , Point2D point ) { int numPoints = controlPoints . size ( ) - ( closed ? 3 : 2 ) ; if ( index < 0 ) { throw new IndexOutOfBoundsException ( "Index " + index + " must be positive" ) ; } if ( index >= controlPoints . size ( ) - 1 ) { throw new IndexOutOfBoundsException ( "Index was " + index + ", but number of control " + "points was " + numPoints ) ; } Point2D cp = controlPoints . get ( index + 1 ) ; cp . setLocation ( point ) ; updateRequired = true ; }
Set the position of the specified control point
Set the position of the specified control point