Invariant integral functions for unions of affine hyperplanes