LinearPath

class LinearPath(var startPose: Pose = Pose(), var endPose: Pose = Pose()) : Path

LinearPath class representing a straight line path in 2D space

Parameters

startPose

The starting pose of the path

endPose

The ending pose of the path

Constructors

Link copied to clipboard
constructor(startPose: Pose = Pose(), endPose: Pose = Pose())
constructor(startX: Double, startY: Double, endX: Double, endY: Double)

Types

Link copied to clipboard
class Builder

Properties

Link copied to clipboard
open override var endPose: Pose
Link copied to clipboard
open override var startPose: Pose

Functions

Link copied to clipboard
open fun getClosestPoint(position: Pose): Pose

Gets the closest point on the path to the given position

Link copied to clipboard
open override fun getClosestPointT(position: Pose): Double

Gets the closest point t value to the given position on the path

Link copied to clipboard
open override fun getCurvature(t: Double): Double

Gets the curvature at the given parameter t

Link copied to clipboard
open override fun getLength(): Double

Gets the arc length of the path

Link copied to clipboard
open override fun getLengthSoFar(t: Double): Double

Gets the arc length from the start of the path to the given parameter t

Link copied to clipboard
open override fun getPoint(t: Double): Pose

Gets the point at the given parameter t

Link copied to clipboard
open override fun getPose(t: Double): Pose

Gets the pose on the path at the given parameter t

Link copied to clipboard
open override fun getTFromLength(length: Double): Double

Gets the parameter t value from the given arc length