issue #3716: refactor PhysicsContact

continue PR #5057