Package ca.eandb.jmist.framework

Examples of ca.eandb.jmist.framework.SceneElement


    if (sr == null) {
      return null;
    }
    Scene scene = pathInfo.getScene();
    Ray3 ray = sr.getRay();
    SceneElement root = scene.getRoot();
    Intersection x = NearestIntersectionRecorder
        .computeNearestIntersection(ray, root);
    if (x != null) {
      ShadingContext context = new MinimalShadingContext(Random.DEFAULT);
      x.prepareShadingContext(context);
View Full Code Here


    Material matteWhite = new LambertianMaterial(colorModel.getContinuous(white));
    Material matteGreen = new LambertianMaterial(colorModel.getContinuous(green));
    Material matteRed = new LambertianMaterial(colorModel.getContinuous(red));
    Material matteEmissive = new LambertianMaterial(colorModel.getGray(0.78), colorModel.getContinuous(emission));

    SceneElement materialMap = new MaterialMapSceneElement(geometry)
        .addMaterial("white", matteWhite)
        .addMaterial("red", matteRed)
        .addMaterial("green", matteGreen)
        .addMaterial("emissive", matteEmissive)
        .setMaterialRange(0, 4, "white")    // ceiling
View Full Code Here

    Material matteWhite = new LambertianMaterial(colorModel.getContinuous(white));
    Material matteGreen = new LambertianMaterial(colorModel.getContinuous(green));
    Material matteRed = new LambertianMaterial(colorModel.getContinuous(red));
    Material matteEmissive = new LambertianMaterial(colorModel.getGray(0.78), colorModel.getContinuous(emission));

    SceneElement materialMap = new MaterialMapSceneElement(geometry)
        .addMaterial("white", matteWhite)
        .addMaterial("red", matteRed)
        .addMaterial("green", matteGreen)
        .addMaterial("emissive", matteEmissive)
        .setMaterialRange(0, 4, "white")    // ceiling
View Full Code Here

    matteWhite = new ScatteringAdapterMaterial(matteWhite, strategy, weight);
    matteGreen = new ScatteringAdapterMaterial(matteGreen, strategy, weight);
    matteRed = new ScatteringAdapterMaterial(matteRed, strategy, weight);
    matteEmissive = new ScatteringAdapterMaterial(matteEmissive, strategy, weight);

    SceneElement materialMap = new MaterialMapSceneElement(geometry)
        .addMaterial("white", matteWhite)
        .addMaterial("red", matteRed)
        .addMaterial("green", matteGreen)
        .addMaterial("emissive", matteEmissive)
        .setMaterialRange(0, 4, "white")    // ceiling
View Full Code Here

      return;
    }
    DxfReader dxf = new AsciiDxfReader(fr);
    DxfSceneBuilder builder = new DxfSceneBuilder();
    ColorModel cm = RGBColorModel.getInstance();
    SceneElement elem = builder.createScene(cm, dxf);
    System.out.println(elem.toString());
  }
View Full Code Here

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.SceneElement#intersects(int, ca.eandb.jmist.math.Box3)
   */
  public boolean intersects(int index, Box3 box) {
    SceneElement child = children.get(index);
    int n = child.getNumPrimitives();
    for (int i = 0; i < n; i++) {
      if (child.intersects(i, box)) {
        return true;
      }
    }
    return false;
  }
View Full Code Here

   * @see ca.eandb.jmist.framework.SceneElement#getBoundingBox(int)
   */
  public Box3 getBoundingBox(int index) {
    int childIndex = getChildIndex(index);
    int offset = offsets.get(childIndex);
    SceneElement child = children.get(childIndex);
    return child.getBoundingBox(index - offset);
  }
View Full Code Here

   * @see ca.eandb.jmist.framework.SceneElement#getBoundingSphere(int)
   */
  public Sphere getBoundingSphere(int index) {
    int childIndex = getChildIndex(index);
    int offset = offsets.get(childIndex);
    SceneElement child = children.get(childIndex);
    return child.getBoundingSphere(index - offset);
  }
View Full Code Here

   * @see ca.eandb.jmist.framework.SceneElement#intersect(int, ca.eandb.jmist.math.Ray3, ca.eandb.jmist.framework.IntersectionRecorder)
   */
  public void intersect(int index, Ray3 ray, IntersectionRecorder recorder) {
    int childIndex = getChildIndex(index);
    int offset = offsets.get(childIndex);
    SceneElement child = children.get(childIndex);
    child.intersect(index - offset, ray, recorder);
  }
View Full Code Here

TOP

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

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.