The lattice discrepancy of certain three-dimensional bodies