+void Object::Loader::level_of_detail(unsigned i)
+{
+ LodLoader ldr(obj, i, coll);
+ load_sub_with(ldr);
+}
+
+
+Object::LodLoader::LodLoader(Object &o, unsigned i, Collection *c):
+ DataFile::CollectionObjectLoader<Object>(o, c),
+ index(i),
+ lod(obj.get_lod(index, "Object::LodLoader::LodLoader"))
+{
+ add("mesh", &LodLoader::mesh_inline);
+ add("mesh", &LodLoader::mesh);
+ add("technique", &LodLoader::technique_inline);
+ add("technique", &LodLoader::technique);
+}
+
+void Object::LodLoader::mesh(const string &n)
+{
+ obj.set_mesh(index, &get_collection().get<Mesh>(n));
+}
+
+void Object::LodLoader::mesh_inline()
+{
+ RefPtr<Mesh> msh = new Mesh;
+ load_sub(*msh);
+ lod.mesh = msh;
+}
+
+void Object::LodLoader::technique(const std::string &n)
+{
+ obj.set_technique(index, &get_collection().get<Technique>(n));
+}
+
+void Object::LodLoader::technique_inline()
+{
+ RefPtr<Technique> tech = new Technique;
+ if(coll)
+ load_sub(*tech, get_collection());
+ else
+ load_sub(*tech);
+ lod.technique = tech;