A covariant approach to the quantization of a rigid body