Diffraction mechanism for elastic scattering and direct nuclear reactions