pub struct Trajectory {
pub frames: Vec<TrajectoryFrame>,
pub metadata: TrajectoryMetadata,
}Expand description
Collection of trajectory frames.
Fields§
§frames: Vec<TrajectoryFrame>Frames in the trajectory.
metadata: TrajectoryMetadataMetadata.
Implementations§
Source§impl Trajectory
impl Trajectory
Sourcepub fn with_metadata(metadata: TrajectoryMetadata) -> Self
pub fn with_metadata(metadata: TrajectoryMetadata) -> Self
Create with metadata.
Sourcepub fn add_frame(&mut self, frame: TrajectoryFrame)
pub fn add_frame(&mut self, frame: TrajectoryFrame)
Add a frame.
Sourcepub fn frame(&self, index: usize) -> Option<&TrajectoryFrame>
pub fn frame(&self, index: usize) -> Option<&TrajectoryFrame>
Get frame at index.
Sourcepub fn frame_at_time(&self, time: f64) -> Option<&TrajectoryFrame>
pub fn frame_at_time(&self, time: f64) -> Option<&TrajectoryFrame>
Get frame closest to time.
Trait Implementations§
Source§impl Clone for Trajectory
impl Clone for Trajectory
Source§fn clone(&self) -> Trajectory
fn clone(&self) -> Trajectory
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 moreSource§impl Debug for Trajectory
impl Debug for Trajectory
Source§impl Default for Trajectory
impl Default for Trajectory
Source§fn default() -> Trajectory
fn default() -> Trajectory
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Trajectory
impl<'de> Deserialize<'de> for Trajectory
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 Trajectory
impl RefUnwindSafe for Trajectory
impl Send for Trajectory
impl Sync for Trajectory
impl Unpin for Trajectory
impl UnsafeUnpin for Trajectory
impl UnwindSafe for Trajectory
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