| 42 | } |
| 43 | |
| 44 | void LightTest::AddInstancedLightWithMB( |
| 45 | cpp::Light light, const affine3f &xfm1, const affine3f &xfm2) |
| 46 | { |
| 47 | light.commit(); |
| 48 | cpp::Group group; |
| 49 | group.setParam("light", cpp::CopiedData(light)); |
| 50 | group.commit(); |
| 51 | cpp::Instance instance(group); |
| 52 | const affine3f xfmR = rcp(xfm); |
| 53 | if (motionBlur) { |
| 54 | std::vector<affine3f> xfms; |
| 55 | xfms.push_back(xfmR * xfm1); |
| 56 | xfms.push_back(xfmR * xfm2); |
| 57 | instance.setParam("motion.transform", cpp::CopiedData(xfms)); |
| 58 | camera.setParam("shutter", range1f(0, 1)); |
| 59 | } else |
| 60 | instance.setParam("transform", xfmR); |
| 61 | |
| 62 | AddInstance(instance); |
| 63 | } |
| 64 | |
| 65 | AmbientLight::AmbientLight() |
| 66 | { |