Trait mgf::LocalContacts
[−]
[src]
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.
Provided Methods
fn last_local_contact(&self, rhs: &RHS) -> Option<LocalContact>
Returns the last contact found, if one exists.
Implementors
impl LocalContacts<Moving<Component>> for Moving<Component>
impl<Recv, Arg> LocalContacts<Arg> for Recv where
Recv: Contacts<Arg> + Shape + Delta,
Arg: Shape + Delta,impl<Recv, Arg> LocalContacts<Moving<Arg>> for Recv where
Recv: Contacts<Moving<Arg>> + Shape,
Arg: Shape + Copy,impl<Recv, Arg> LocalContacts<Arg> for Moving<Recv> where
Recv: Shape + Copy,
Arg: Contacts<Moving<Recv>> + Shape,impl<Recv, Arg> LocalContacts<Moving<Arg>> for Moving<Recv> where
Recv: Contacts<Moving<Arg>> + Shape + Copy,
Arg: Shape + Copy,