src/main/java/org/a05annex/util/geo2d/KochanekBartelsSpline.java
@NotNull
    public ControlPoint insertControlPoint(@NotNull PathPoint pathPoint) {
        // validity testing
        if (null == m_first) {
            throw new IllegalStateException("There is no path to insert control points into.");
        }

        // The path point has all the information we need for inserting the new point. The deal here is we insert
        // the control point with the path point parameters so that the curve is essentially unchanged by the insertion.

        // Create
        ControlPoint newControlPoint = new ControlPoint(pathPoint.time);
        newControlPoint.m_last = pathPoint.previousControlPoint;
        pathPoint.nextControlPoint.m_last = newControlPoint;
        newControlPoint.m_next = pathPoint.nextControlPoint;
        pathPoint.previousControlPoint.m_next = newControlPoint;

        // set the location, heading, and derivatives for this control point
        newControlPoint.setFieldLocation(pathPoint.fieldPt.getX(), pathPoint.fieldPt.getY());
        newControlPoint.setFieldHeading(pathPoint.fieldHeading);
        newControlPoint.setTangent(pathPoint.field_dX, pathPoint.field_dY);
        return newControlPoint;
    }
/**
     * Insert a control point at a specific PathPoint. NOTE, for this to behave as expected the speed multiplier
     * must be 1.0 when the path point is generated.
     *
     * @param pathPoint The path point at which to insert the new control point.
     * @return Returns the added control point.
     */
Insert a control point at a specific PathPoint. NOTE, for this to behave as expected the speed multiplier
must be 1.0 when the path point is generated.

@param pathPoint The path point at which to insert the new control point.
@return Returns the added control point.
Insert a control point at a specific PathPoint . NOTE for this to behave as expected the speed multiplier must be 1 . 0 when the path point is generated . @param pathPoint The path point at which to insert the new control point . @return Returns the added control point .
@NotNull
    public ControlPoint insertControlPoint(@NotNull PathPoint pathPoint) {
        if (null == m_first) {
            throw new IllegalStateException("There is no path to insert control points into.");
        }
        ControlPoint newControlPoint = new ControlPoint(pathPoint.time);
        newControlPoint.m_last = pathPoint.previousControlPoint;
        pathPoint.nextControlPoint.m_last = newControlPoint;
        newControlPoint.m_next = pathPoint.nextControlPoint;
        pathPoint.previousControlPoint.m_next = newControlPoint;
        newControlPoint.setFieldLocation(pathPoint.fieldPt.getX(), pathPoint.fieldPt.getY());
        newControlPoint.setFieldHeading(pathPoint.fieldHeading);
        newControlPoint.setTangent(pathPoint.field_dX, pathPoint.field_dY);
        return newControlPoint;
    }
@ NotNull public ControlPoint insertControlPoint ( @ NotNull PathPoint pathPoint ) { if ( null == m_first ) { throw new IllegalStateException ( "There is no path to insert control points into." ) ; } ControlPoint newControlPoint = new ControlPoint ( pathPoint . time ) ; newControlPoint . m_last = pathPoint . previousControlPoint ; pathPoint . nextControlPoint . m_last = newControlPoint ; newControlPoint . m_next = pathPoint . nextControlPoint ; pathPoint . previousControlPoint . m_next = newControlPoint ; newControlPoint . setFieldLocation ( pathPoint . fieldPt . getX ( ) , pathPoint . fieldPt . getY ( ) ) ; newControlPoint . setFieldHeading ( pathPoint . fieldHeading ) ; newControlPoint . setTangent ( pathPoint . field_dX , pathPoint . field_dY ) ; return newControlPoint ; }
Insert a control point at a specific PathPoint.
Insert a control point at a specific PathPoint .
// validity testing // The path point has all the information we need for inserting the new point. The deal here is we insert // the control point with the path point parameters so that the curve is essentially unchanged by the insertion. // Create // set the location, heading, and derivatives for this control point