Skip to content

Commit

Permalink
add new constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyLi23 committed Mar 12, 2022
1 parent f6e7814 commit 39b6425
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
public class QuinticHermiteSplineGroup extends Parametric {

//list of splines
ArrayList<QuinticHermiteSpline> splines = new ArrayList<>();
private ArrayList<QuinticHermiteSpline> splines = new ArrayList<>();

/**
* Creates a new spline group with an initial {@link QuinticHermiteSpline}
Expand All @@ -16,6 +16,17 @@ public QuinticHermiteSplineGroup(QuinticHermiteSpline initialSpline) {
splines.add(initialSpline);
}

/**
* Creates a new spline group with an initial {@link ArrayList} of {@link QuinticHermiteSpline}s
* @param splines initial {@link ArrayList} of {@link QuinticHermiteSpline}s
*/
public QuinticHermiteSplineGroup(ArrayList<QuinticHermiteSpline> splines) {
this.splines = splines;
for(QuinticHermiteSpline spline : splines) {
length += spline.getLength();
}
}

/**
* Creates a new empty spline group
*/
Expand Down

0 comments on commit 39b6425

Please sign in to comment.