The calculation of semipolar orientations for wurtzitic semiconductor heterostructures: application to nitrides and oxides