A modelling methodology for multi-body systems with application to wave-energy devices