pub struct Sweep { /* private fields */ }Expand description
Sweep input used by continuous collision algorithms.
Implementations§
Source§impl Sweep
impl Sweep
pub fn new<LC: Into<Vec2>, C1: Into<Vec2>, C2: Into<Vec2>>( local_center: LC, c1: C1, c2: C2, q1: Rot, q2: Rot, ) -> Result<Self>
Sourcepub fn from_raw(raw: b2Sweep) -> Result<Self>
pub fn from_raw(raw: b2Sweep) -> Result<Self>
Construct from a raw Box2D sweep after validating its invariants.
pub const fn local_center(self) -> Vec2
pub const fn start_center(self) -> Vec2
pub const fn end_center(self) -> Vec2
pub const fn start_rotation(self) -> Rot
pub const fn end_rotation(self) -> Rot
pub fn into_raw(self) -> b2Sweep
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Validate this sweep for Box2D continuous-collision algorithms.
Sourcepub fn transform_at(self, time: f32) -> Result<Transform>
pub fn transform_at(self, time: f32) -> Result<Transform>
Evaluate the sweep transform at time in the [0, 1] interval.
The complete sweep and time are validated before foundation activity is leased and before Box2D is called.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sweep
impl RefUnwindSafe for Sweep
impl Send for Sweep
impl Sync for Sweep
impl Unpin for Sweep
impl UnsafeUnpin for Sweep
impl UnwindSafe for Sweep
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