[][src]Struct mgf::Moving

pub struct Moving<T: Shape>(pub T, pub Vector3<f32>);

A geometry swept accross a given path of motion.

Methods

impl<T: Copy + Clone + Shape> Moving<T>[src]

pub fn sweep(obj: T, vel: Vector3<f32>) -> Self[src]

Create a moving object with velocity of vel

impl<T: Shape> Moving<T>[src]

pub fn vel(&self) -> Vector3<f32>[src]

Return the velocity of the object.

Trait Implementations

impl<T: Shape> AsMut<T> for Moving<T>[src]

impl<T: Shape> AsRef<T> for Moving<T>[src]

impl<B: Bound, T: Copy + Clone + Shape + BoundedBy<B>> BoundedBy<B> for Moving<T>[src]

fn bounds(&self) -> B[src]

The bounds for a swept object is the bounds extended in the direction and magnitude of the velocity.

impl<T: Clone + Shape> Clone for Moving<T>[src]

impl<Recv, Arg> Contacts<Arg> for Moving<Recv> where
    Arg: Shape + Copy,
    Recv: Contacts<Moving<Arg>> + Shape
[src]

impl<Recv, Arg> Contacts<Moving<Arg>> for Moving<Recv> where
    Recv: Contacts<Moving<Arg>> + Shape + Copy,
    Arg: Shape + Copy
[src]

Any two moving object collision can be reduced to a one moving one static object collision. This is done by finding the relative velocity between the two objects.

impl Contacts<Moving<Capsule>> for Plane[src]

impl<Poly: Polygon> Contacts<Moving<Capsule>> for Poly[src]

Colliding a moving capsule with a single-faced polygon can potentially produce multiple contacts depending on the angle between the capsule's length and the normal of the polygon's face.

impl Contacts<Moving<Capsule>> for Sphere[src]

impl Contacts<Moving<Capsule>> for Capsule[src]

impl Contacts<Moving<Component>> for Plane[src]

impl Contacts<Moving<Component>> for Triangle[src]

impl Contacts<Moving<Component>> for Rectangle[src]

impl Contacts<Moving<Component>> for Sphere[src]

impl Contacts<Moving<Component>> for Capsule[src]

impl Contacts<Moving<Sphere>> for Plane[src]

impl<Poly: Polygon> Contacts<Moving<Sphere>> for Poly[src]

impl Contacts<Moving<Sphere>> for Sphere[src]

impl Contacts<Moving<Sphere>> for Capsule[src]

impl Contacts<Plane> for Moving<Sphere>[src]

impl Contacts<Plane> for Moving<Capsule>[src]

impl<RHS> Contacts<RHS> for Moving<Component> where
    RHS: Contacts<Moving<Sphere>> + Contacts<Moving<Capsule>>, 
[src]

impl Contacts<Rectangle> for Moving<Sphere>[src]

impl Contacts<Rectangle> for Moving<Capsule>[src]

impl Contacts<Triangle> for Moving<Sphere>[src]

impl Contacts<Triangle> for Moving<Capsule>[src]

impl<T: Copy + Shape> Copy for Moving<T>[src]

impl<T: Debug + Shape> Debug for Moving<T>[src]

impl<T: Shape> Delta for Moving<T>[src]

impl<'de, T: Shape> Deserialize<'de> for Moving<T> where
    T: Deserialize<'de>, 
[src]

impl From<Moving<Sphere>> for Capsule[src]

impl<P: Particle> Intersects<Moving<Sphere>> for P[src]

impl<Recv, Arg> LocalContacts<Arg> for Moving<Recv> where
    Recv: Shape + Copy,
    Arg: Contacts<Moving<Recv>> + Shape
[src]

impl<Recv, Arg> LocalContacts<Moving<Arg>> for Recv where
    Recv: Contacts<Moving<Arg>> + Shape,
    Arg: Shape + Copy
[src]

impl<Recv, Arg> LocalContacts<Moving<Arg>> for Moving<Recv> where
    Recv: Contacts<Moving<Arg>> + Shape + Copy,
    Arg: Shape + Copy
[src]

impl LocalContacts<Moving<Component>> for Moving<Component>[src]

impl<T: Shape> Serialize for Moving<T> where
    T: Serialize
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Moving<T> where
    T: RefUnwindSafe

impl<T> Send for Moving<T> where
    T: Send

impl<T> Sync for Moving<T> where
    T: Sync

impl<T> Unpin for Moving<T> where
    T: Unpin

impl<T> UnwindSafe for Moving<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.