Front Fourier - A General Formalism For Fourier Based Wave Front Sensing