private void updateSelectionRectKoordinates(double x1,double x2,double y1,double y2,ModifiableHyperBoundingBox ranges){
  final int dims=proj.getVisibleDimensions();
  int minaxis=dims + 1;
  int maxaxis=-1;
{
    int i=0;
    while (i < dims) {
      double axx=getVisibleAxisX(i);
      if (x1 < axx || x2 < axx) {
        minaxis=i;
        break;
      }
      i++;
    }
    while (i <= dims) {
      double axx=getVisibleAxisX(i);
      if (x2 < axx && x1 < axx) {
        maxaxis=i;
        break;
      }
      i++;
    }
  }
  double z1=Math.max(Math.min(y1,y2),0);
  double z2=Math.min(Math.max(y1,y2),getSizeY());
  for (int i=minaxis; i < maxaxis; i++) {
    double v1=proj.fastProjectRenderToDataSpace(z1,i);
    double v2=proj.fastProjectRenderToDataSpace(z2,i);
    final int ddim=proj.getDimForVisibleAxis(i);
    if (LOG.isDebugging()) {
      LOG.debug("Axis " + i + " dimension "+ ddim+ " "+ v1+ " to "+ v2);
    }
    ranges.setMin(ddim,Math.min(v1,v2));
    ranges.setMax(ddim,Math.max(v1,v2));
  }
}

private void updateSelectionRectKoordinates ( double x1 , double x2 , double y1 , double y2 , ModifiableHyperBoundingBox ranges ) { final int dims = proj . getVisibleDimensions ( ) ; int minaxis = dims + 1 ; int maxaxis = - 1 ; { int i = 0 ; while ( i < dims ) { double axx = getVisibleAxisX ( i ) ; if ( x1 < axx || x2 < axx ) { minaxis = i ; break ; } i ++ ; } while ( i <= dims ) { double axx = getVisibleAxisX ( i ) ; if ( x2 < axx && x1 < axx ) { maxaxis = i ; break ; } i ++ ; } } double z1 = Math . max ( Math . min ( y1 , y2 ) , 0 ) ; double z2 = Math . min ( Math . max ( y1 , y2 ) , getSizeY ( ) ) ; for ( int i = minaxis ; i < maxaxis ; i ++ ) { double v1 = proj . fastProjectRenderToDataSpace ( z1 , i ) ; double v2 = proj . fastProjectRenderToDataSpace ( z2 , i ) ; final int ddim = proj . getDimForVisibleAxis ( i ) ; if ( LOG . isDebugging ( ) ) { LOG . debug ( "Axis " + i + " dimension " + ddim + " " + v1 + " to " + v2 ) ; } ranges . setMin ( ddim , Math . min ( v1 , v2 ) ) ; ranges . setMax ( ddim , Math . max ( v1 , v2 ) ) ; } }
set the selected ranges and the mask for the actual dimensions in the context
