pub struct Eta3PathSegment {
pub start_pose: Pose2D,
pub end_pose: Pose2D,
pub segment_length: f64,
/* private fields */
}Expand description
A single eta^3 path segment connecting two poses.
Internally stores 2x8 polynomial coefficients (x and y, degree 0..7).
Fields§
§start_pose: Pose2D§end_pose: Pose2D§segment_length: f64Precomputed total arc length of this segment.
Implementations§
Source§impl Eta3PathSegment
impl Eta3PathSegment
Sourcepub fn new(
start_pose: Pose2D,
end_pose: Pose2D,
eta: &EtaParams,
kappa: &KappaParams,
) -> Self
pub fn new( start_pose: Pose2D, end_pose: Pose2D, eta: &EtaParams, kappa: &KappaParams, ) -> Self
Create a new segment from start/end poses with shaping and curvature parameters.
Sourcepub fn calc_point(&self, u: f64) -> (f64, f64)
pub fn calc_point(&self, u: f64) -> (f64, f64)
Evaluate the position (x, y) at parameter u in [0, 1].
Sourcepub fn calc_first_deriv(&self, u: f64) -> (f64, f64)
pub fn calc_first_deriv(&self, u: f64) -> (f64, f64)
First derivative (dx/du, dy/du) at parameter u.
Sourcepub fn calc_second_deriv(&self, u: f64) -> (f64, f64)
pub fn calc_second_deriv(&self, u: f64) -> (f64, f64)
Second derivative (d^2x/du^2, d^2y/du^2) at parameter u.
Sourcepub fn s_dot(&self, u: f64) -> f64
pub fn s_dot(&self, u: f64) -> f64
Rate of change of arc length with respect to u: ||dr/du||. Clamped to a minimum of 1e-6 to avoid division by zero.
Sourcepub fn arc_length(&self, u_end: f64) -> f64
pub fn arc_length(&self, u_end: f64) -> f64
Arc length from u=0 to u_end.
Trait Implementations§
Source§impl Clone for Eta3PathSegment
impl Clone for Eta3PathSegment
Source§fn clone(&self) -> Eta3PathSegment
fn clone(&self) -> Eta3PathSegment
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Eta3PathSegment
impl RefUnwindSafe for Eta3PathSegment
impl Send for Eta3PathSegment
impl Sync for Eta3PathSegment
impl Unpin for Eta3PathSegment
impl UnsafeUnpin for Eta3PathSegment
impl UnwindSafe for Eta3PathSegment
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.