Trait collide::Collider[][src]

pub trait Collider<Other = Self> {
    type Vector: VectorSpace;
    fn collision_info(
        &self,
        other: &Other
    ) -> Option<CollisionInfo<Self::Vector>>; fn check_collision(&self, other: &Other) -> bool { ... } }
Expand description

The collider trait, all colliders need to implement.

Associated Types

The vector type of this collider.

Required methods

If both colliders collide, returns some collision info, else returns none.

Provided methods

Checks the collision between two colliders. Defaults to a check of the return value of collision info.

Implementors