public static AreaLight CreateAreaLight(Transform lightToWorld, ParameterSet paramSet, IShape shape) { Spectrum L = paramSet.FindOneSpectrum ("L", new Spectrum (1.0)); Spectrum sc = paramSet.FindOneSpectrum ("scale", new Spectrum (1.0)); int nSamples = paramSet.FindOneInt ("nsamples", 1); return new DiffuseAreaLight (lightToWorld, L * sc, nSamples, shape); }
public static ILight CreateLight(Transform light2world, ParameterSet paramSet) { Spectrum L = paramSet.FindOneSpectrum ("L", new Spectrum (1.0)); Spectrum sc = paramSet.FindOneSpectrum ("scale", new Spectrum (1.0)); Point @from = paramSet.FindOnePoint ("from", new Point (0, 0, 0)); Point to = paramSet.FindOnePoint ("to", new Point (0, 0, 1)); Vector dir = @from - to; return new Distant (light2world, L * sc, dir); }