Stellar and gaseous dynamics of triaxial galaxies