Package ca.eandb.jmist.framework

Examples of ca.eandb.jmist.framework.Material


        generateImportanceSampledSurfacePoint(primitive, x, context, rng.next(), rng.next(), rng.next());
        context.getModifier().modify(context);

        Point3 p = context.getPosition();
        Material mat = context.getMaterial();
        Vector3 v = x.getPosition().unitVectorFrom(p);
        Vector3 n = context.getShadingNormal();
        double d2 = x.getPosition().squaredDistanceTo(p);
        double atten = Math.max(n.dot(v), 0.0) * totalWeight / (4.0 * Math.PI * d2);
        Color ri = mat.emission(context, v, lambda).times(atten);
        LightSample sample = new PointLightSample(x, p, ri);

        target.addLightSample(sample);
      }

View Full Code Here


  private static final TransformableLens lens;

  private final SceneElement root;

  public EmissionTestScene(ColorModel colorModel) {
    Material diffuse50 = new LambertianMaterial(colorModel.getGray(0.5));
    Material diffuseLuminaire1 = new LambertianMaterial(null, colorModel.getGray(2e5));

    this.root = new MaterialMapSceneElement(geometry)
        .addMaterial("diffuse50", diffuse50)
        .addMaterial("diffuseLuminaire1", diffuseLuminaire1)
        .setMaterial(0, "diffuseLuminaire1")        // large light source
View Full Code Here

TOP

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

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.