// Find intersection of screen coord ref-point with globe.
double x = screenRefPoint.x + dx;
double y = dragEvent.getMouseEvent().getComponent().getSize().height - screenRefPoint.y + dy - 1;
Line ray = view.computeRayFromScreenPoint(x, y);
Intersection inters[] = globe.intersect(ray, refPos.getElevation());
if (inters != null)
{
// Intersection with globe. Move reference point to the intersection point.
Position p = globe.computePositionFromPoint(inters[0].getIntersectionPoint());