using System;
using Chernobyl.Mathematics.Geometry;
namespace Chernobyl.Mathematics.Collision
{
///
/// An interface for objects that can be collided against and whose
/// collision status can be retrieved through an event.
///
public interface ICollidable : IShape
{
///
/// An event that is raised when a has
/// started colliding with this . When the
/// collision has ended, will be invoked.
///
event EventHandler OnCollisionStarted;
///
/// An event that is raised when the collision with a
/// has ended. This will event will be raised
/// after the invocation of .
///
event EventHandler OnCollisionEnded;
///
/// Called when this has started colliding
/// with another .
///
/// The object that was just hit.
void HandleCollisionStarted(ICollidable collider);
///
/// Called when this has stopped colliding
/// with another .
///
/// The object that was just hit.
void HandleCollisionEnded(ICollidable collider);
}
}