Moved calculation of intersection distance out of geometry classes and
corrected the calculation to account for transformation stacks