Dust and gas in triaxial galaxies