Refactored Triangle and Quad collisions.