Continuum theory for mechanical metamaterials with a cubic lattice substructure