std::shared_ptr<Light> MakeLight(const std::string &name, const ParamSet ¶mSet, const Transform &light2world, const MediumInterface &mediumInterface) { std::shared_ptr<Light> light; if (name == "point") light = CreatePointLight(light2world, mediumInterface.outside, paramSet); else if (name == "spot") light = CreateSpotLight(light2world, mediumInterface.outside, paramSet); else if (name == "goniometric") light = CreateGoniometricLight(light2world, mediumInterface.outside, paramSet); else if (name == "projection") light = CreateProjectionLight(light2world, mediumInterface.outside, paramSet); else if (name == "distant") light = CreateDistantLight(light2world, paramSet); else if (name == "infinite" || name == "exinfinite") light = CreateInfiniteLight(light2world, paramSet); else Warning("Light \"%s\" unknown.", name.c_str()); paramSet.ReportUnused(); return light; }
void LightSample::createScene() { //BaseApplication::createScene(); InitAmbientLight(); //CreateSpotLight(); CreatePointLight(); CreateDirectionalLight(); CreateGround(); CreateNinja(); }