pub struct Move { /* private fields */ }Expand description
A straight-line move of all axes that start and finish together. One profile runs the path from 0 to 1; its limits are the tightest of all axes.
Implementations§
Source§impl Move
impl Move
Sourcepub fn new(start: &[f64], target: &[f64], axes: &[AxisInfo]) -> Self
pub fn new(start: &[f64], target: &[f64], axes: &[AxisInfo]) -> Self
The S-curve within the axes’ limits, braking as it speeds up.
Sourcepub fn with_law(
start: &[f64],
target: &[f64],
axes: &[AxisInfo],
law: &MotionLaw,
) -> Self
pub fn with_law( start: &[f64], target: &[f64], axes: &[AxisInfo], law: &MotionLaw, ) -> Self
The move in law. Speeding up, each axis accelerates towards its target; braking, away from it. The vertical
axis has up_ratio of its limit where that is upwards, and braking has deceleration_ratio of every limit.
pub fn duration(&self) -> f64
pub fn delta(&self) -> &[f64]
pub fn at(&self, t: f64, pos: &mut [f64], vel: &mut [f64], acc: &mut [f64])
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Move
impl<'de> Deserialize<'de> for Move
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Move
impl RefUnwindSafe for Move
impl Send for Move
impl Sync for Move
impl Unpin for Move
impl UnsafeUnpin for Move
impl UnwindSafe for Move
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