GetMedium returns (-1) if outside geometry.