pub struct StampedTransform<T: Copy + Debug + Default + 'static> {
pub transform: Transform3D<T>,
pub stamp: CuTime,
pub parent_frame: FrameIdString,
pub child_frame: FrameIdString,
}
Fields§
§transform: Transform3D<T>
§stamp: CuTime
§parent_frame: FrameIdString
§child_frame: FrameIdString
Implementations§
Source§impl<T: Copy + Debug + 'static + Default + Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Div<Output = T> + NumCast> StampedTransform<T>
impl<T: Copy + Debug + 'static + Default + Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Div<Output = T> + NumCast> StampedTransform<T>
Sourcepub fn compute_velocity(&self, previous: &Self) -> Option<VelocityTransform<T>>
pub fn compute_velocity(&self, previous: &Self) -> Option<VelocityTransform<T>>
Compute the velocity (linear and angular) from this transform and a previous transform
Returns None if:
- Different parent/child frames are used
- Time difference is zero or negative
- Time difference is too large for reliable velocity computation
The velocity is computed using finite differencing between transforms.
Trait Implementations§
Source§impl<T: Clone + Copy + Debug + Default + 'static> Clone for StampedTransform<T>
impl<T: Clone + Copy + Debug + Default + 'static> Clone for StampedTransform<T>
Source§fn clone(&self) -> StampedTransform<T>
fn clone(&self) -> StampedTransform<T>
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<'de, T> Deserialize<'de> for StampedTransform<T>
impl<'de, T> Deserialize<'de> for StampedTransform<T>
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<T> Freeze for StampedTransform<T>
impl<T> RefUnwindSafe for StampedTransform<T>where
T: RefUnwindSafe,
impl<T> Send for StampedTransform<T>where
T: Send,
impl<T> Sync for StampedTransform<T>where
T: Sync,
impl<T> Unpin for StampedTransform<T>where
T: Unpin,
impl<T> UnwindSafe for StampedTransform<T>where
T: UnwindSafe,
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> EncodableKey for Twhere
T: Serialize,
impl<T> EncodableKey for Twhere
T: Serialize,
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