File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
src/main/java/com/github/mittyrobotics/pathfollowing Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 55public class QuinticHermiteSplineGroup extends Parametric {
66
77 //list of splines
8- ArrayList <QuinticHermiteSpline > splines = new ArrayList <>();
8+ private ArrayList <QuinticHermiteSpline > splines = new ArrayList <>();
99
1010 /**
1111 * Creates a new spline group with an initial {@link QuinticHermiteSpline}
@@ -16,6 +16,17 @@ public QuinticHermiteSplineGroup(QuinticHermiteSpline initialSpline) {
1616 splines .add (initialSpline );
1717 }
1818
19+ /**
20+ * Creates a new spline group with an initial {@link ArrayList} of {@link QuinticHermiteSpline}s
21+ * @param splines initial {@link ArrayList} of {@link QuinticHermiteSpline}s
22+ */
23+ public QuinticHermiteSplineGroup (ArrayList <QuinticHermiteSpline > splines ) {
24+ this .splines = splines ;
25+ for (QuinticHermiteSpline spline : splines ) {
26+ length += spline .getLength ();
27+ }
28+ }
29+
1930 /**
2031 * Creates a new empty spline group
2132 */
You can’t perform that action at this time.
0 commit comments