Nonsmooth dynamics of a 3D rigid body on a vibrating plate