Trait mgf::Collider [] [src]

pub trait Collider<CollisionType: Clone, T = Self> {
    fn collide<F: FnMut(CollisionType)>(&self, other: &T, callback: F) -> bool { ... }
fn check_collision(&self, other: &T) -> Option<CollisionType> { ... } }

Determine if two objects collide and collect information on the collision if they do. The type of the collision checked for and the amount of information returned depends on the CollisionType argument requested by the callback passed to collide.

Provided Methods

Collide with an object and call the callback for as many contacts there are. True is returned if any contact is found.

Returns the first collision found if any exists.

Implementors