Generalization of the classical xyz-polarization analysis technique to out-of-plane and inelastic scattering.