collision detection uses segments