void SnapshotCommand::restoreSnapshots(const Model::FaceList& faces) {
     assert(m_faces.size() == faces.size());
     
     if (faces.empty())
         return;
     
     for (unsigned int i = 0; i < faces.size(); i++) {
         Model::Face& face = *faces[i];
         FaceSnapshot& snapshot = *m_faces[face.faceId()];
         snapshot.restore(face);
     }
 }
Пример #2
0
 bool MapParser::parseFaces(const BBox& worldBounds, Model::FaceList& faces) {
     size_t oldSize = faces.size();
     try {
         Model::Face* face = NULL;
         while ((face = parseFace(worldBounds)) != NULL)
             faces.push_back(face);
         return !faces.empty();
     } catch (MapParserException e) {
         Utility::deleteAll(faces, oldSize);
         m_tokenizer.reset();
         return false;
     }
 }