pub struct Sweep {
pub local_center: Vec2,
pub c1: Vec2,
pub c2: Vec2,
pub q1: Rot,
pub q2: Rot,
}Expand description
Sweep input used by continuous collision algorithms.
Fields§
§local_center: Vec2§c1: Vec2§c2: Vec2§q1: Rot§q2: RotImplementations§
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, ) -> Self
pub fn from_raw(raw: b2Sweep) -> Self
pub fn into_raw(self) -> b2Sweep
Sourcepub fn validate(&self) -> ApiResult<()>
pub fn validate(&self) -> ApiResult<()>
Validate this sweep for Box2D continuous-collision algorithms.
Sourcepub fn transform_at(self, time: f32) -> Transform
pub fn transform_at(self, time: f32) -> Transform
Evaluate the sweep transform at time in the [0, 1] interval.
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