[][src]Trait mgf::LocalContacts

pub trait LocalContacts<RHS> {
    fn local_contacts<F: FnMut(LocalContact)>(
        &self,
        rhs: &RHS,
        callback: F
    ) -> bool; fn last_local_contact(&self, rhs: &RHS) -> Option<LocalContact> { ... } }

A type that can produce a point of contact with another and convert it to local coordinates.

Because the points in a Contact are global at the time of collision, they are not immediately useful to physics resolution. Upon being translated to local coordinates, which refer to the points as if the origin was the center of the object they belong to.

Required methods

fn local_contacts<F: FnMut(LocalContact)>(&self, rhs: &RHS, callback: F) -> bool

Calls the closure for each contact found. Returns true if any contact was found.

Loading content...

Provided methods

fn last_local_contact(&self, rhs: &RHS) -> Option<LocalContact>

Returns the last contact found, if one exists.

Loading content...

Implementors

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

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

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

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

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

Loading content...