public class PathSegment
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
PathSegment.ClosestPointReport |
static class |
PathSegment.Sample |
Modifier and Type | Field and Description |
---|---|
protected static double |
kEpsilon |
protected Translation2d |
mEnd |
protected double |
mLength |
protected double |
mSpeed |
protected Translation2d |
mStart |
protected Translation2d |
mStartToEnd |
Constructor and Description |
---|
PathSegment(Translation2d start,
Translation2d end,
double speed) |
Modifier and Type | Method and Description |
---|---|
double |
dotProduct(Translation2d other) |
PathSegment.ClosestPointReport |
getClosestPoint(Translation2d query_point) |
Translation2d |
getEnd() |
double |
getLength() |
double |
getSpeed() |
Translation2d |
getStart() |
Translation2d |
interpolate(double index) |
void |
updateStart(Translation2d new_start) |
protected static final double kEpsilon
protected double mSpeed
protected Translation2d mStart
protected Translation2d mEnd
protected Translation2d mStartToEnd
protected double mLength
public PathSegment(Translation2d start, Translation2d end, double speed)
public void updateStart(Translation2d new_start)
public double getSpeed()
public Translation2d getStart()
public Translation2d getEnd()
public double getLength()
public Translation2d interpolate(double index)
public double dotProduct(Translation2d other)
public PathSegment.ClosestPointReport getClosestPoint(Translation2d query_point)