Ejemplo n.º 1
0
  private void updateScreenBorders() {
    xmax = ((Kernel) kernel).getXmax();
    xmin = ((Kernel) kernel).getXmin();
    ymax = ((Kernel) kernel).getYmax();
    ymin = ((Kernel) kernel).getYmin();

    double widthRW = xmax - xmin;
    double heightRW = ymax - ymin;
    maxXdist = MAX_X_PIXEL_DIST / ((Kernel) kernel).getXscale(); // widthRW / 100;
    maxYdist = MAX_Y_PIXEL_DIST / ((Kernel) kernel).getYscale(); // heightRW / 100;

    // we take a bit more than the screen
    // itself so that we don't loose locus
    // lines too often
    // that leave and reenter the screen

    farXmin = xmin - widthRW / 2;
    farXmax = xmax + widthRW / 2;
    farYmin = ymin - heightRW / 2;
    farYmax = ymax + heightRW / 2;

    // near to screen rectangle
    nearToScreenRect.setFrame(farXmin, farYmin, farXmax - farXmin, farYmax - farYmin);
  }
Ejemplo n.º 2
0
 @Override
 public void update() {
   // TODO Auto-generated method stub
   lanePlaceholder.setFrame(this.xPos, this.yPos, this.width, this.height);
 }