/** Adds an object to the track object manager. The type to add is specified * in the xml_node. * \note If you add add any objects with LOD, don't forget to call * TrackObjectManager::assingLodNodes after everything is loaded * to finalize their creation. * * FIXME: all of this is horrible, just make the exporter write LOD definitions * in a separate section that's read before everything and remove all this * crap */ void TrackObjectManager::add(const XMLNode &xml_node, scene::ISceneNode* parent, ModelDefinitionLoader& model_def_loader) { try { TrackObject *obj = new TrackObject(xml_node, parent, model_def_loader); m_all_objects.push_back(obj); if(obj->isDriveable()) m_driveable_objects.push_back(obj); } catch (std::exception& e) { Log::warn("TrackObjectManager", "Could not load track object. Reason : %s", e.what()); } } // add