The Fourier transform for triples of quadratic spaces