pub struct CompressedSegment { /* private fields */ }Expand description
A segment in a compressed trajectory
Compressed segments use variable-length encoding where each axis can have 0, 1, 3, or 7 coefficients depending on the complexity of motion along that axis.
Implementations§
Source§impl CompressedSegment
impl CompressedSegment
Sourcepub fn new(
duration: f32,
x: Vec<f32>,
y: Vec<f32>,
z: Vec<f32>,
yaw: Vec<f32>,
) -> Result<Self>
pub fn new( duration: f32, x: Vec<f32>, y: Vec<f32>, z: Vec<f32>, yaw: Vec<f32>, ) -> Result<Self>
Create a new compressed segment
§Arguments
duration- Duration of this segment in secondsx- X polynomial coefficients (must be 0, 1, 3, or 7 elements)y- Y polynomial coefficients (must be 0, 1, 3, or 7 elements)z- Z polynomial coefficients (must be 0, 1, 3, or 7 elements)yaw- Yaw polynomial coefficients (must be 0, 1, 3, or 7 elements)
§Errors
Returns an error if any element vector has an invalid length
Trait Implementations§
Source§impl Clone for CompressedSegment
impl Clone for CompressedSegment
Source§fn clone(&self) -> CompressedSegment
fn clone(&self) -> CompressedSegment
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 CompressedSegment
impl RefUnwindSafe for CompressedSegment
impl Send for CompressedSegment
impl Sync for CompressedSegment
impl Unpin for CompressedSegment
impl UnsafeUnpin for CompressedSegment
impl UnwindSafe for CompressedSegment
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