public class MotionSegment
Segment of a motion profile with constant acceleration.
Constructor and Description |
---|
MotionSegment(MotionState start,
double dt)
Segment of a motion profile with constant acceleration.
|
Modifier and Type | Method and Description |
---|---|
MotionState |
end()
Returns the
class MotionState at the end of the segment (time dt). |
MotionSegment |
flipped()
Returns a flipped (negated) version of the segment.
|
MotionState |
get(double t)
Returns the
class MotionState at time t. |
double |
getDt()
time delta
|
MotionState |
getStart()
start motion state
|
MotionSegment |
reversed()
Returns a reversed version of the segment. Note: it isn't possible to reverse a segment completely so this
method only guarantees that the start and end velocities will be swapped.
|
java.lang.String |
toString() |
public MotionSegment(MotionState start, double dt)
Segment of a motion profile with constant acceleration.
start
- start motion statedt
- time deltastart
- start motion statedt
- time deltapublic MotionState get(double t)
Returns the class MotionState
at time t.
class MotionState
public MotionState end()
Returns the class MotionState
at the end of the segment (time dt).
class MotionState
public MotionSegment reversed()
Returns a reversed version of the segment. Note: it isn't possible to reverse a segment completely so this method only guarantees that the start and end velocities will be swapped.
public MotionSegment flipped()
Returns a flipped (negated) version of the segment.
public java.lang.String toString()
public MotionState getStart()
start motion state
public double getDt()
time delta