Towards from indirect to direct band gap and optical properties of XYP2 (X=Zn, Cd; Y=Si, Ge, Sn)