Spin-Dependent Wave Propagation In Waveguides, Metasurfaces And 3D Photonic Crystals