Package ca.eandb.jmist.framework

Examples of ca.eandb.jmist.framework.Animator


      int      numPixels      = width * height;
      int      samplesPerPixel    = passes * lightPathsPerEyePath;
      double    lightImageWeight  = 1.0 / (double) samplesPerPixel;
      Light    light        = scene.getLight();
      Lens    lens        = scene.getLens();
      Animator  animator      = scene.getAnimator();

      initialize();
      raster.get().clear();

      for (int n = 0, y = 0; y < height; y++) {

        if (!monitor.notifyProgress(n, numPixels))
          return null;

        y0      = (double) y / h;
        y1      = (double) (y + 1) / h;

        for (int x = 0; x < width; x++, n++) {

          x0      = (double) x / w;
          x1      = (double) (x + 1) / w;

          bounds    = new Box2(x0, y0, x1, y1);

          for (int i = 0; i < passes; i++) {

            if (shutter != null) {
              double time    = RandomUtil.uniform(shutter, random);
              animator.setTime(time);
            }

            Point2 p      = RandomUtil.uniform(bounds, random);
            Color sample    = colorModel.sample(random);
            PathInfo path    = new PathInfo(scene, sample.getWavelengthPacket());
View Full Code Here

TOP

Related Classes of ca.eandb.jmist.framework.Animator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.