pub struct PositionInterpolator { /* private fields */ }Expand description
Position interpolation for smooth user movement
Implementations§
Source§impl PositionInterpolator
impl PositionInterpolator
Sourcepub fn add_position_sample(
&mut self,
user_id: &UserId,
snapshot: PositionSnapshot,
)
pub fn add_position_sample( &mut self, user_id: &UserId, snapshot: PositionSnapshot, )
Add a position sample for a user
Sourcepub fn interpolate_position(
&self,
user_id: &UserId,
target_time: Instant,
) -> Option<Position3D>
pub fn interpolate_position( &self, user_id: &UserId, target_time: Instant, ) -> Option<Position3D>
Interpolate user position at a specific time
Sourcepub fn estimate_latency(&self, user_id: &UserId) -> Option<f64>
pub fn estimate_latency(&self, user_id: &UserId) -> Option<f64>
Estimate network latency based on position update patterns
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PositionInterpolator
impl RefUnwindSafe for PositionInterpolator
impl Send for PositionInterpolator
impl Sync for PositionInterpolator
impl Unpin for PositionInterpolator
impl UnsafeUnpin for PositionInterpolator
impl UnwindSafe for PositionInterpolator
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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