Formulation of rigid body impact problems using generalized coefficients