Added an exception to check if points in same world.

Checks to be sure that all points in polygonPrism and Cuboid are in the
same World.