Modelling of Multibody Marine Systems with Application to Wave-Energy Devices