Consolidated intersection test to its own function.