Factors determining crystal orientation of dendritic growth during solidification