public bool Update(ParameterList pl, SunflowAPI api) { function = pl.getInt("function", function); size = pl.getFloat("size", size); scale = pl.getFloat("scale", scale); return true; }
public bool update(ParameterList pl, SunflowAPI api) { // get parameters fov = pl.getFloat("fov", fov); aspect = pl.getFloat("aspect", aspect); update(); return true; }
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; }
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)); }
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; }
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; }
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; }
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; }
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); }
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; }
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; }
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; }
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; }
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; }
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); }
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; }
public virtual bool Update(ParameterList pl, SunflowAPI api) { diff = pl.getColor("diffuse", diff); refl = pl.getFloat("shiny", refl); return true; }
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; }
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; }