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); } }
void MapWriter::writeFacesToStream(const Model::FaceList& faces, std::ostream& stream) { assert(stream.good()); stream.unsetf(std::ios::floatfield); for (unsigned int i = 0; i < faces.size(); i++) writeFace(*faces[i], stream); }
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; } }
void SnapshotCommand::makeSnapshots(const Model::FaceList& faces) { for (unsigned int i = 0; i < faces.size(); i++) { Model::Face& face = *faces[i]; m_faces[face.faceId()] = new FaceSnapshot(face); } }