RoomObject* XmlWorldBuilder::parseRoomFan(TiXmlElement* e) { float r, s; e->QueryFloatAttribute("radius", &r); e->QueryFloatAttribute("speed", &s); Fan* f = new Fan( parseVector(e->FirstChildElement("x")), parseVector(e->FirstChildElement("v")), r, s); const char* material = e->Attribute("material"); if (material != NULL) { f->setMaterial(*materials_[material]); } return f; }