A collision detection class