PathBuilder

public class PathBuilder

This is the PathBuilder class. This class makes it easier to create PathChains, so you don't have to individually create Path instances to create a PathChain. A PathBuilder can be accessed through running the pathBuilder() method on an instance of the Follower class, or just creating an instance of PathBuilder regularly.

Author

Anyi Lin - 10158 Scott's Bots

Aaron Yang - 10158 Scott's Bots

Harrison Womack - 10158 Scott's Bots

Constructors

Link copied to clipboard
public void PathBuilder()
This is an empty constructor for the PathBuilder class so it can get started.

Functions

Link copied to clipboard
public PathBuilder addBezierCurve(Array<Point> controlPoints)
public PathBuilder addBezierCurve(ArrayList<Point> controlPoints)
This adds a default Path defined by a specified BezierCurve to the PathBuilder.
Link copied to clipboard
public PathBuilder addBezierLine(Point startPoint, Point endPoint)
This adds a default Path defined by a specified BezierLine to the PathBuilder.
Link copied to clipboard
public PathBuilder addParametricCallback(double t, Runnable runnable)
This adds a parametric callback on the last Path added to the PathBuilder.
Link copied to clipboard
This adds a default Path defined by a specified BezierCurve to the PathBuilder.
public PathBuilder addPath(Path path)
This adds a Path to the PathBuilder.
Link copied to clipboard
public PathBuilder addTemporalCallback(double time, Runnable runnable)
This adds a temporal callback on the last Path added to the PathBuilder.
Link copied to clipboard
public PathChain build()
This builds all the Path and callback information together into a PathChain.
Link copied to clipboard
public PathBuilder setConstantHeadingInterpolation(double setHeading)
This sets a constant heading interpolation on the last Path added to the PathBuilder.
Link copied to clipboard
public PathBuilder setLinearHeadingInterpolation(double startHeading, double endHeading)
public PathBuilder setLinearHeadingInterpolation(double startHeading, double endHeading, double endTime)
This sets a linear heading interpolation on the last Path added to the PathBuilder.
Link copied to clipboard
This sets the path end heading constraint on the last Path added to the PathBuilder.
Link copied to clipboard
This sets the path end timeout constraint on the last Path added to the PathBuilder.
Link copied to clipboard
This sets the path end translational constraint on the last Path added to the PathBuilder.
Link copied to clipboard
This sets the path end t-value (parametric time) constraint on the last Path added to the PathBuilder.
Link copied to clipboard
This sets the path end velocity constraint on the last Path added to the PathBuilder.
Link copied to clipboard
public PathBuilder setReversed(boolean set)
This sets a reversed or tangent heading interpolation on the last Path added to the PathBuilder.
Link copied to clipboard
This sets the heading interpolation to tangential on the last Path added to the PathBuilder.
Link copied to clipboard
This sets the deceleration multiplier on the last Path added to the PathBuilder.