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
type Vector: VectorSpace
[src]
type Vector: VectorSpace
[src]The vector type of this collider.
Required methods
fn collision_info(&self, other: &Other) -> Option<CollisionInfo<Self::Vector>>
[src]
fn collision_info(&self, other: &Other) -> Option<CollisionInfo<Self::Vector>>
[src]If both colliders collide, returns some collision info, else returns none.
Provided methods
fn check_collision(&self, other: &Other) -> bool
[src]
fn check_collision(&self, other: &Other) -> bool
[src]Checks the collision between two colliders. Defaults to a check of the return value of collision info.