A framework for large strain elastic–plastic damage mechanics based on metric transformations