Class PathGenerator
java.lang.Object
me.wobblyyyy.pathfinder.trajectory.PathGenerator
public class PathGenerator
extends java.lang.Object
Convert a trajectory into a path.
- Since:
- 0.5.0
- Author:
- Colin Robertson
-
Constructor Summary
Constructors Constructor Description PathGenerator()
-
Method Summary
Modifier and Type Method Description static me.wobblyyyy.edt.DynamicArray<HeadingPoint>
toPath(Trajectory trajectory)
Convert a trajectory into a path.static me.wobblyyyy.edt.DynamicArray<HeadingPoint>
toPath(Trajectory trajectory, int samples)
Convert a trajectory into a path.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
PathGenerator
public PathGenerator()
-
-
Method Details
-
toPath
public static me.wobblyyyy.edt.DynamicArray<HeadingPoint> toPath(Trajectory trajectory, int samples)Convert a trajectory into a path. The path is generated by sampling the trajectory 50 times per segment, and then adding all of the sampled points into an array which is returned to you.- Parameters:
trajectory
- the trajectory that should be converted.samples
- how many times the trajectory should be sampled.- Returns:
- a
DynamicArray
of points generated from the trajectory's component segments.
-
toPath
Convert a trajectory into a path. The path is generated by sampling the trajectory 50 times per segment, and then adding all of the sampled points into an array which is returned to you.- Parameters:
trajectory
- the trajectory that should be converted.- Returns:
- a
DynamicArray
of points generated from the trajectory's component segments.
-