Class Linear
java.lang.Object
me.wobblyyyy.pathfinder.trajectory.Spline
me.wobblyyyy.pathfinder.trajectory.Linear
- All Implemented Interfaces:
Segment
public class Linear extends Spline
An extension of the very lovely
Spline
class that seeks to make
splines even more simple by reducing the amount of input points to 2. Note
that using splines as the basis for all types of lines is rather inefficient,
as running spline calculations for a very simple line is quite expensive
in terms of the computational power required to do so. It may be a wise
idea to try to optimize this.- Since:
- 0.4.0
- Author:
- Colin Robertson
-
Constructor Summary
Constructors Constructor Description Linear(HeadingPoint start, HeadingPoint end)
Create a new linear spline, which is basically a fancy way of saying a line. -
Method Summary
Methods inherited from class me.wobblyyyy.pathfinder.trajectory.Spline
angleAt, end, interpolateFromX, interpolateFromY, maximum, minimum, start, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
Linear
Create a new linear spline, which is basically a fancy way of saying a line. Yes, that's it. It's just a line. Nothing more, nothing less - it's just a linear line. Yes.- Parameters:
start
- the line's start point.end
- the line's end/target/destination point.
-