SamplerFactory::SamplerFactory(const Parms& parms) : numSamples1D(0), numSamples2D(0), numLightSamples(0), samplesPerPixel(1), sampleSets(64), samples(NULL) { samplesPerPixel = parms.getInt("sampler.spp",1); sampleSets = parms.getInt("sampler.sets",64); }
PathTraceIntegrator::PathTraceIntegrator(const Parms& parms) : lightSampleID(-1), firstScatterSampleID(-1), firstScatterTypeSampleID(-1), sampleLightForGlossy(false) { maxDepth = parms.getInt ("maxDepth" ,10 ); minContribution = parms.getFloat("minContribution",0.01f ); epsilon = parms.getFloat("epsilon" ,32.0f)*float(ulp); backplate = parms.getImage("backplate"); sampleLightForGlossy = parms.getInt ("sampleLightForGlossy",0); }
lcRenderer::lcRenderer(const Parms& parms) : iteration(0) { /*! create integrator to use */ std::string _integrator = parms.getString("integrator","lcintegrator"); if (_integrator == "lcintegrator") integrator = new lcIntegrator(parms); else throw std::runtime_error("unknown integrator type: "+_integrator); /*! create sampler to use */ std::string _samplers = parms.getString("sampler","multijittered"); if (_samplers == "multijittered" ) samplers = new SamplerFactory(parms); else throw std::runtime_error("unknown sampler type: "+_samplers); /*! create pixel filter to use */ std::string _filter = parms.getString("filter","none"); if (_filter == "none" ) filter = NULL; else if (_filter == "box" ) filter = new BoxFilter; else if (_filter == "bspline") filter = new BSplineFilter; else throw std::runtime_error("unknown filter type: "+_filter); /*! get framebuffer configuration */ gamma = parms.getFloat("gamma",1.0f); /*! show progress to the user */ showProgress = parms.getInt("showprogress",0); }
vplIntegrator::vplIntegrator(const Parms& parms) : lightSampleID(-1), firstScatterSampleID(-1), firstScatterTypeSampleID(-1) { maxDepth = parms.getInt ("maxDepth" ,10 ); minContribution = parms.getFloat("minContribution",0.01f ); epsilon = parms.getFloat("epsilon" ,32.0f)*float(ulp); backplate = parms.getImage("backplate"); }
MaterialRenderer::MaterialRenderer(const Parms& parms) { maxDepth = parms.getInt("maxDepth",1); // NOT USED FOR THE MOMENT... }
OpenGLRenderer::OpenGLRenderer(const Parms& parms) { OpenGLRenderer::fb_size_w = parms.getInt("width",128); OpenGLRenderer::fb_size_h = parms.getInt("height",128); linedrawing = parms.getBool("linedraw",true); }
DebugRenderer::DebugRenderer(const Parms& parms) { maxDepth = parms.getInt("maxDepth",1); spp = parms.getInt("sampler.spp",1); }
DebugRenderer::DebugRenderer(const Parms& parms) : accumulate(false) { maxDepth = parms.getInt("maxDepth",1); spp = parms.getInt("sampler.spp",1); }