Trait CanCollide

Source
pub trait CanCollide {
    // Required method
    fn collides_with_pos(&self, pos: Vec2D) -> bool;
}
Expand description

Must be implemented to be used by the CollisionContainer

Required Methods§

Source

fn collides_with_pos(&self, pos: Vec2D) -> bool

Returns true if the collider intersects the passed position

Trait Implementations§

Source§

impl<'e> From<&'e dyn CanCollide> for CollisionContainer<'e>

Source§

fn from(element: &'e dyn CanCollide) -> Self

Converts to this type from the input type.

Implementors§