pub struct WorldLineTrajectory {
pub worldline: WorldLine,
pub waypoints: Vec<Waypoint>,
}Expand description
A worldline trajectory — the time-like self of a continuant (W2).
Fields§
§worldline: WorldLineThe worldline identity.
waypoints: Vec<Waypoint>Waypoints ordered by time.
Implementations§
Source§impl WorldLineTrajectory
impl WorldLineTrajectory
Sourcepub fn add(&mut self, waypoint: Waypoint) -> &mut Self
pub fn add(&mut self, waypoint: Waypoint) -> &mut Self
Add a waypoint. Waypoints are kept sorted by time.
Sourcepub fn pose_at(&self, t_secs: i64, t_nanos: u32) -> Option<Pose>
pub fn pose_at(&self, t_secs: i64, t_nanos: u32) -> Option<Pose>
Get the pose at a given time by linear interpolation. Returns None if the time is outside the waypoint range.
Sourcepub fn span_nanos(&self) -> Option<i128>
pub fn span_nanos(&self) -> Option<i128>
Total time span in nanoseconds (last - first).
Trait Implementations§
Source§impl Clone for WorldLineTrajectory
impl Clone for WorldLineTrajectory
Auto Trait Implementations§
impl Freeze for WorldLineTrajectory
impl RefUnwindSafe for WorldLineTrajectory
impl Send for WorldLineTrajectory
impl Sync for WorldLineTrajectory
impl Unpin for WorldLineTrajectory
impl UnsafeUnpin for WorldLineTrajectory
impl UnwindSafe for WorldLineTrajectory
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