Ejemplo n.º 1
0
 public void getOverviewShut() {
   updatePixels();
   int[] buffer = new int[pixels.length];
   System.arraycopy(pixels, 0, buffer, 0, pixels.length);
   overviewImage = new PImage(width, height);
   overviewImage.format = RGB;
   overviewImage.pixels = buffer;
   // overviewImage.save("image.tif");
   buffer = null;
   System.out.println("shut for overview");
 }
Ejemplo n.º 2
0
  public void preIntroSetup() {
    try {

      int bgWidth = env.bgImg.getWidth(env);
      int bgHeight = env.bgImg.getHeight(env);
      int[] bgPixels = new int[bgWidth * bgHeight];
      for (int i = 0; i < bgPixels.length; i++) if (bgPixels[i] != 0) System.out.print(bgPixels[i]);
      overlay = new PImage(bgWidth, bgHeight);
      overlay.format = ARGB;
      overlay.pixels = bgPixels;
      runNum = 0;
      controls.setEnabled(false);

      /** * get into looping */
      afterFirstStreaming = true;
      /** overview shut */
      draw();
      /*theCamera.moveToNow(new FVector(0.0f, 0.0f, 1000));
      theCamera.lookAtNow(new FVector(0.0f, 1.0f, 0));
      */
      draw();
      ortho(-1500, 800, -800, 800, 1000, 2000);
      loadPixels();
      noStroke();
      getOverviewShut();
      afterOverviewShot = true;
      draw();
      loop();

      /** give the environment the hint to swop the surfaces */
      env.addThem();
      /** * intro */
      theCamera.moveToNow(new FVector(-200.0f, 950.0f, 1000));
      theCamera.lookAtNow(new FVector(-200.51917f, 851.8057f, 0));
      theCamera.lookAtInter(
          new FVector(1341.8213f, 757.865f, 0), new Integer(4000), new Integer(3));
      Object[] actionObjects = {new FVector(0, 0, -88), new Integer(2000), new Integer(0)};
      theCamera.queueAction("lookAtInter", 4000, actionObjects);
      theCamera.moveToNow(new FVector(-500.51917f, 951.8057f, 200));
      theCamera.moveToInter(
          new FVector(1341.8213f, 857.865f, 200), new Integer(4000), new Integer(3));
      Object[] actionObjects2 = {
        new FVector(0, 800, Camera.maxCameraHeight), new Integer(2000), new Integer(1)
      };
      theCamera.queueAction("moveToInter", 0, actionObjects2);
      Object[] actionObjects3 = {Boolean.valueOf(true)};
      theCamera.queueAction("setControlsEnabled", 3500, actionObjects3);
    } catch (Exception e) {
      e.printStackTrace();
      env.setErrorDisplay(
          "Das Applet konnte nicht gestartet werden. Eventuell ist dies ein Speicherproblem. Bitte stoppen sie alle anderen Java-Anwendungen. GGf. muss der Browser neu gestartet werden um den Cache zu leeren.");
    }
  }