Examples of emission()


Examples of ca.eandb.jmist.framework.Material.emission()

   */
  public Color scatter(Vector3 v) {
    PathInfo path = getPathInfo();
    WavelengthPacket lambda = path.getWavelengthPacket();
    Material material = surf.getMaterial();
    return material.emission(surf, v, lambda);
  }

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.path.PathNode#getPDF(ca.eandb.jmist.math.Vector3)
   */
 
View Full Code Here

Examples of ca.eandb.jmist.framework.Material.emission()

  public Color getSourceRadiance() {
    PathInfo path = getPathInfo();
    Material material = surf.getMaterial();
    WavelengthPacket lambda = path.getWavelengthPacket();
    Vector3 out = PathUtil.getDirection(this, getParent());
    return material.emission(surf, out, lambda);
  }

  /* (non-Javadoc)
   * @see ca.eandb.jmist.framework.path.ScatteringNode#isOnLightSource()
   */
 
View Full Code Here

Examples of ca.eandb.jmist.framework.Material.emission()

        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

Examples of ca.eandb.jmist.framework.Material.emission()

   */
  public Color shade(ShadingContext sc) {
    WavelengthPacket lambda = sc.getWavelengthPacket();
    Material mat = sc.getMaterial();
    if (mat.isEmissive()) {
      return mat.emission(sc, sc.getIncident().opposite(), lambda);
    } else {
      return sc.getColorModel().getBlack(lambda);
    }
  }

View Full Code Here

Examples of ca.eandb.jmist.framework.Material.emission()

    WavelengthPacket lambda = sc.getWavelengthPacket();

    if (sc.getPathDepth() == sc.getPathDepthByType(ScatteredRay.Type.SPECULAR)) {
      Material mat = sc.getMaterial();
      if (mat.isEmissive()) {
        return mat.emission(sc, sc.getIncident().opposite(), lambda);
      }
    }

    return sc.getColorModel().getBlack(lambda);
View Full Code Here

Examples of ca.eandb.jmist.framework.Material.emission()

        Material mat = material;//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) * surfaceArea / (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

Examples of ca.eandb.jmist.framework.Material.emission()

        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
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.