Examples of SeedReference


Examples of ca.eandb.jmist.framework.random.SeedReference

  public double generateImportanceSampledSurfacePoint(SurfacePoint x,
      ShadingContext context, double ru, double rv, double rj) {
    if (rnd == null) {
      buildChildSelector();
    }
    SeedReference ref = new SeedReference(rj);
    int index = rnd.next(ref);
    return generateImportanceSampledSurfacePoint(index, x, context, ru, rv, ref.seed);
  }
View Full Code Here

Examples of ca.eandb.jmist.framework.random.SeedReference

   */
  public void generateRandomSurfacePoint(ShadingContext context, double ru, double rv, double rj) {
    if (rnd == null) {
      buildChildSelector();
    }
    SeedReference ref = new SeedReference(rj);
    int index = rnd.next(ref);
    generateRandomSurfacePoint(index, context, ru, rv, ref.seed);
  }
View Full Code Here

Examples of ca.eandb.jmist.framework.random.SeedReference

  public void generateRandomSurfacePoint(ShadingContext context, double ru, double rv, double rj) {
    double xyArea = box.lengthX() * box.lengthY();
    double xzArea = box.lengthX() * box.lengthZ();
    double yzArea = box.lengthY() * box.lengthZ();

    SeedReference ref = new SeedReference(rj);
    double total = xyArea + xzArea + yzArea;
    boolean dir = RandomUtil.coin(ref);
    int id;
    Point3 p;

View Full Code Here

Examples of ca.eandb.jmist.framework.random.SeedReference

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.Light#sample(ca.eandb.jmist.framework.path.PathInfo, ca.eandb.jmist.framework.Random)
   */
  public LightNode sample(PathInfo pathInfo, double ru, double rv, double rj) {
    SeedReference ref = new SeedReference(rj);
    int index = RandomUtil.discrete(0, children().size() - 1, ref);
    return ScaledLightNode.create(1.0 / children().size(),
        children().get(index).sample(pathInfo, ru, rv, ref.seed), rj);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.