As far as I understand, when calculating the partition function we are summing over all of phase space. So, for ideal gas for example we have
$$H =\sum\limits_i\frac{p^2_i}{2m}$$
and so
$$Z=\int\limits_{-\infty}^\infty e^{\sum\limits_i \beta p^2_i/2m}d^{3N}qd^{3N}p = \int\limits_{-\infty}^\infty d^{3N}q \cdot \int\limits_{-\infty}^\infty e^{\sum\limits_i \beta p^2_i/2m}d^{3N}p$$
at this point the textbook makes the claim that $$ \int\limits_{-\infty}^\infty d^{3N}q = V^N$$
I would understand this claim if the integrand had some indicator function that zeroes all states outside our "box", but I don't see any, so how does that make sense? If this is some "approximation" we do to compensate for the approximated hamiltonian (no interactions between particles), is there a general rule for when I can just ignore a region in phase space?