Recent demonstrations of magnetization switching induced by in-plane current injection in heavy metal/ferromagnetic heterostructures have drawn increasing attention to spin torques based on orbital-to-spin momentum transfer. The symmetry, magnitude and origin of spin-orbit torques (SOTs), however, remain a matter of debate. Here we report on the three-dimensional vector measurement of SOTs in AlOx/Co/Pt and MgO/CoFeB/Ta trilayers using harmonic analysis of the anomalous and planar Hall effects. We provide a general scheme to measure the amplitude and direction of SOTs as a function of the magnetization direction. Based on space and time inversion symmetry arguments, we demonstrate that heavy metal/ferromagnetic layers allow for two different SOTs having odd and even behaviour with respect to magnetization reversal. Such torques include strongly anisotropic field-like and spin transfer-like components, which depend on the type of heavy metal layer and annealing treatment. These results call for SOT models that go beyond the spin Hall and Rashba effects investigated thus far.