Electronic Structure of Twin Boundaries in 3C-SiC, Si and Diamond