Example #1
0
 public bool Update(ParameterList pl, SunflowAPI api)
 {
     function = pl.getInt("function", function);
     size = pl.getFloat("size", size);
     scale = pl.getFloat("scale", scale);
     return true;
 }
Example #2
0
 public bool update(ParameterList pl, SunflowAPI api)
 {
     // get parameters
     fov = pl.getFloat("fov", fov);
     aspect = pl.getFloat("aspect", aspect);
     update();
     return true;
 }
Example #3
0
 public bool Update(ParameterList pl, SunflowAPI api)
 {
     // get parameters
     fov = pl.getFloat("fov", fov);
     aspect = pl.getFloat("aspect", aspect);
     shiftX = pl.getFloat("shift.x", shiftX);
     shiftY = pl.getFloat("shift.y", shiftY);
     Update();
     return true;
 }
Example #4
0
 public bool Update(ParameterList pl, SunflowAPI api)
 {
     shutterOpen  = pl.getFloat("shutter.open", shutterOpen);
     shutterClose = pl.getFloat("shutter.close", shutterClose);
     c2w          = pl.getMovingMatrix("transform", c2w);
     w2c          = c2w.inverse();
     if (w2c == null)
     {
         UI.printWarning(UI.Module.CAM, "Unable to compute camera's inverse transform");
         return(false);
     }
     return(lens.Update(pl, api));
 }
Example #5
0
 public bool update(ParameterList pl, SunflowAPI api)
 {
     string filename = pl.getstring("texture", null);
     if (filename != null)
         bumpTexture = TextureCache.getTexture(api.resolveTextureFilename(filename), true);
     scale = pl.getFloat("scale", scale);
     return bumpTexture != null;
 }
Example #6
0
 public virtual bool Update(ParameterList pl, SunflowAPI api)
 {
     bright = pl.getColor("bright", bright);
     dark = pl.getColor("dark", dark);
     samples = pl.getInt("samples", samples);
     maxDist = pl.getFloat("maxdist", maxDist);
     if (maxDist <= 0)
         maxDist = float.PositiveInfinity;
     return true;
 }
Example #7
0
 public bool Update(ParameterList pl, SunflowAPI api)
 {
     diff = pl.getColor("diffuse", diff);
     spec = pl.getColor("specular", spec);
     string filename;
     filename = pl.getstring("diffuse.texture", null);
     if (filename != null)
         diffmap = TextureCache.getTexture(api.resolveTextureFilename(filename), false);
     filename = pl.getstring("specular.texture", null);
     if (filename != null)
         specmap = TextureCache.getTexture(api.resolveTextureFilename(filename), false);
     diffBlend = MathUtils.clamp(pl.getFloat("diffuse.blend", diffBlend), 0, 1);
     specBlend = MathUtils.clamp(pl.getFloat("specular.blend", diffBlend), 0, 1);
     glossyness = MathUtils.clamp(pl.getFloat("glossyness", glossyness), 0, 1);
     numSamples = pl.getInt("samples", numSamples);
     return true;
 }
Example #8
0
 public bool update(ParameterList pl, SunflowAPI api)
 {
     Vector3 up = pl.getVector("up", null);
     Vector3 east = pl.getVector("east", null);
     if (up != null && east != null)
         basis = OrthoNormalBasis.makeFromWV(up, east);
     else if (up != null)
         basis = OrthoNormalBasis.makeFromW(up);
     numSkySamples = pl.getInt("samples", numSkySamples);
     sunDirWorld = pl.getVector("sundir", sunDirWorld);
     turbidity = pl.getFloat("turbidity", turbidity);
     // recompute model
     initSunSky();
     return true;
 }
 public virtual bool update(ParameterList pl, SunflowAPI api)
 {
     rhoD = pl.getColor("diffuse", rhoD);
     rhoS = pl.getColor("specular", rhoS);
     alphaX = pl.getFloat("roughnessX", alphaX);
     alphaY = pl.getFloat("roughnessY", alphaY);
     numRays = pl.getInt("samples", numRays);
     return true;
 }
Example #10
0
 public bool Update(ParameterList pl, SunflowAPI api)
 {
     ParameterList.FloatParameter p = pl.getPointArray("particles");
     if (p != null)
         particles = p.data;
     r = pl.getFloat("radius", r);
     r2 = r * r;
     n = pl.getInt("num", n);
     return particles != null && n <= (particles.Length / 3);
 }
Example #11
0
 public bool Update(ParameterList pl, SunflowAPI api)
 {
     // get parameters
     fov = pl.getFloat("fov", fov);
     aspect = pl.getFloat("aspect", aspect);
     shiftX = pl.getFloat("shift.x", shiftX);
     shiftY = pl.getFloat("shift.y", shiftY);
     focusDistance = pl.getFloat("focus.distance", focusDistance);
     lensRadius = pl.getFloat("lens.radius", lensRadius);
     lensSides = pl.getInt("lens.sides", lensSides);
     lensRotation = pl.getFloat("lens.rotation", lensRotation);
     Update();
     return true;
 }
Example #12
0
 public bool Update(ParameterList pl, SunflowAPI api)
 {
     color = pl.getColor("color", color);
     eta = pl.getFloat("eta", eta);
     f0 = (1 - eta) / (1 + eta);
     f0 = f0 * f0;
     absorptionDistance = pl.getFloat("absorption.distance", absorptionDistance);
     absorptionColor = pl.getColor("absorption.color", absorptionColor);
     return true;
 }
Example #13
0
 public bool update(ParameterList pl, SunflowAPI api)
 {
     maxIterations = pl.getInt("iterations", maxIterations);
     epsilon = pl.getFloat("epsilon", epsilon);
     cw = pl.getFloat("cw", cw);
     cx = pl.getFloat("cx", cx);
     cy = pl.getFloat("cy", cy);
     cz = pl.getFloat("cz", cz);
     return true;
 }
Example #14
0
 public virtual bool update(ParameterList pl, SunflowAPI api)
 {
     diff = pl.getColor("diffuse", diff);
     spec = pl.getColor("specular", spec);
     power = pl.getFloat("power", power);
     numRays = pl.getInt("samples", numRays);
     return true;
 }
Example #15
0
 public bool update(ParameterList pl, SunflowAPI api)
 {
     ri = pl.getFloat("radiusInner", ri);
     ro = pl.getFloat("radiusOuter", ro);
     ri2 = ri * ri;
     ro2 = ro * ro;
     return true;
 }
Example #16
0
 public bool Update(ParameterList pl, SunflowAPI api)
 {
     shutterOpen = pl.getFloat("shutter.open", shutterOpen);
     shutterClose = pl.getFloat("shutter.close", shutterClose);
     c2w = pl.getMovingMatrix("transform", c2w);
     w2c = c2w.inverse();
     if (w2c == null) {
         UI.printWarning(UI.Module.CAM, "Unable to compute camera's inverse transform");
         return false;
     }
     return lens.Update(pl, api);
 }
Example #17
0
 public bool update(ParameterList pl, SunflowAPI api)
 {
     src = pl.getPoint("source", src);
     dir = pl.getVector("dir", dir);
     dir.normalize();
     r = pl.getFloat("radius", r);
     basis = OrthoNormalBasis.makeFromW(dir);
     r2 = r * r;
     radiance = pl.getColor("radiance", radiance);
     return true;
 }
Example #18
0
 public virtual bool Update(ParameterList pl, SunflowAPI api)
 {
     diff = pl.getColor("diffuse", diff);
     refl = pl.getFloat("shiny", refl);
     return true;
 }
Example #19
0
 public bool update(ParameterList pl, SunflowAPI api)
 {
     lineColor = pl.getColor("line", lineColor);
     fillColor = pl.getColor("fill", fillColor);
     width = pl.getFloat("width", width);
     cosWidth = (float)Math.Cos(width);
     return true;
 }
Example #20
0
 public bool update(ParameterList pl, SunflowAPI api)
 {
     radiance = pl.getColor("radiance", radiance);
     numSamples = pl.getInt("samples", numSamples);
     radius = pl.getFloat("radius", radius);
     r2 = radius * radius;
     center = pl.getPoint("center", center);
     return true;
 }