Optical switching technology for glazings