// Read in all the dynamic lights for the scene void readDynamicLights(scene_data* scene, const boost::property_tree::ptree& pt) { boost::property_tree::ptree::const_iterator iter = pt.front().second.begin(); for (; iter != pt.front().second.end(); ++iter) { if (iter->first == "point") readPointLight(scene, iter->second); else if (iter->first == "spot") readSpotLight(scene, iter->second); else { std::cerr << "Error - unknown dynamic light encountered: " << iter->second.front().first << std::endl; exit(EXIT_FAILURE); } } scene->dynamic.create(); }