A Geometric Approach to Thermomechanics of Dissipating Continua