Quantum mechanics of a generalised rigid body