Class MotionProfile
- java.lang.Object
-
- org.team1540.rooster.motionprofiling.MotionProfile
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMotionProfile.PointA single instant within aMotionProfile.
-
Field Summary
Fields Modifier and Type Field Description @NotNull MotionProfile.Point[]pointsThePointsin the motion profile.
-
Constructor Summary
Constructors Constructor Description MotionProfile(@NotNull MotionProfile.Point[] points)Create a newMotionProfilefrom an array of points.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MotionProfile.Pointget(int index)Gets the nthMotionProfile.Point(0-indexed) in the motion profile.intsize()Get the number ofpointsin the profile.
-
-
-
Field Detail
-
points
@NotNull public final @NotNull MotionProfile.Point[] points
ThePointsin the motion profile.
-
-
Constructor Detail
-
MotionProfile
public MotionProfile(@NotNull @NotNull MotionProfile.Point[] points)Create a newMotionProfilefrom an array of points.- Parameters:
points- The points to use.
-
-
Method Detail
-
get
@Contract(pure=true) public MotionProfile.Point get(int index)
Gets the nthMotionProfile.Point(0-indexed) in the motion profile.- Parameters:
index- The index of the point to get.- Returns:
- The point at the specified index.
- Throws:
ArrayIndexOutOfBoundsException- ifindex≥size().
-
size
@Contract(pure=true) public int size()
Get the number ofpointsin the profile.- Returns:
- The number of points in the profile; specifically,
points.length.
-
-