pub struct ReplayBodyView<'view> { /* private fields */ }Expand description
A body in a single closure-scoped replay epoch.
Implementations§
Source§impl ReplayBodyView<'_>
impl ReplayBodyView<'_>
Sourcepub const fn epoch(&self) -> ReplayEpoch
pub const fn epoch(&self) -> ReplayEpoch
Return the observation epoch that authorizes this view.
Sourcepub const fn ordinal(&self) -> usize
pub const fn ordinal(&self) -> usize
Return the stable creation ordinal used by the replay outliner.
Sourcepub fn is_valid(&self) -> Result<bool>
pub fn is_valid(&self) -> Result<bool>
Return whether this body remains live in the current epoch.
Sourcepub fn body_type(&self) -> Result<BodyType>
pub fn body_type(&self) -> Result<BodyType>
Return the body’s simulation type.
An unknown native discriminant returns Error::InvalidNativeBodyType and permanently
terminalizes the replay player. Later native operations fail with
Error::ReplayNativeFailure before entering Box2D.
Sourcepub fn transform(&self) -> Result<WorldTransform>
pub fn transform(&self) -> Result<WorldTransform>
Return the world-space body transform.
Sourcepub fn linear_velocity(&self) -> Result<Vec2>
pub fn linear_velocity(&self) -> Result<Vec2>
Return the body’s linear velocity.
Sourcepub fn angular_velocity(&self) -> Result<f32>
pub fn angular_velocity(&self) -> Result<f32>
Return the body’s angular velocity.
Auto Trait Implementations§
impl<'view> !RefUnwindSafe for ReplayBodyView<'view>
impl<'view> !Send for ReplayBodyView<'view>
impl<'view> !Sync for ReplayBodyView<'view>
impl<'view> !UnwindSafe for ReplayBodyView<'view>
impl<'view> Freeze for ReplayBodyView<'view>
impl<'view> Unpin for ReplayBodyView<'view>
impl<'view> UnsafeUnpin for ReplayBodyView<'view>
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