A continuum-mechanical approach to the mechanics of rock masses