void handleFilm() { var filmData = new JsonData(); var param = new JsonData(); filmData["param"] = param; var res = new JsonData(); res.Add((double)resolution.x); res.Add((double)resolution.y); param["resolution"] = res; var cw = new JsonData(); cw.Add((double)cropWindow.x); cw.Add((double)cropWindow.y); cw.Add((double)cropWindow.width); cw.Add((double)cropWindow.height); param["cropWindow"] = cw; var fn = imageName + "." + PaladinEnum.getName(fileFormat); param["fileName"] = fn; param["scale"] = scale; param["diagonal"] = diagonal; _output["film"] = filmData; }
void handleFilter() { var filterData = new JsonData(); var param = new JsonData(); filterData["param"] = param; var radius = new JsonData(); radius.Add((double)filterRadius.x); radius.Add((double)filterRadius.y); param["radius"] = radius; filterData["type"] = PaladinEnum.getName(filterName); switch (filterName) { case Filter.gaussian: param["alpha"] = alpha; break; case Filter.mitchell: param["B"] = B; param["C"] = C; break; case Filter.sinc: param["tau"] = tau; break; } _output["filter"] = filterData; }
void handleAccelerator() { var aclrtData = new JsonData(); var param = new JsonData(); aclrtData["param"] = param; switch (acceleratorName) { case Accelerator.bvh: aclrtData["type"] = "bvh"; param["maxPrimsInNode"] = maxPrimsInNode; param["splitMethod"] = PaladinEnum.getName(splitMethod); break; case Accelerator.kdTree: //暂时不支持kdtree Assert.IsFalse(false); break; } _output["accelerator"] = aclrtData; }
void handleIntegrator() { var integratorData = new JsonData(); var param = new JsonData(); integratorData["param"] = param; switch (integratorName) { case Integrator.path: integratorData["type"] = "pt"; param["maxBounce"] = maxBounce; param["rrThreshold"] = rrThreshold; param["lightSampleStrategy"] = PaladinEnum.getName(lightSampleStrategy); break; case Integrator.bdpt: integratorData["type"] = "bdpt"; param["maxBounce"] = maxBounce; param["rrThreshold"] = rrThreshold; param["lightSampleStrategy"] = PaladinEnum.getName(lightSampleStrategy); break; case Integrator.volpt: integratorData["type"] = "volpt"; param["maxBounce"] = maxBounce; param["rrThreshold"] = rrThreshold; param["lightSampleStrategy"] = PaladinEnum.getName(lightSampleStrategy); break; case Integrator.Geometry: integratorData["type"] = "Geometry"; param["type"] = "normal"; break; } _output["integrator"] = integratorData; }