| 458 | } |
| 459 | |
| 460 | void parseFaces(FaceVec &faces, const IndexedFaceSet *ifs) |
| 461 | { |
| 462 | face f; |
| 463 | for (IntVec::const_iterator i=ifs->coordIndex.begin(), e=ifs->coordIndex.end(); i!=e; ++i) { |
| 464 | if (*i == -1) { |
| 465 | faces.resize(faces.size()+1); |
| 466 | faces.back().indices.swap(f.indices); |
| 467 | } else |
| 468 | f.indices.push_back(i - ifs->coordIndex.begin()); |
| 469 | } |
| 470 | if (!f.indices.empty()) { |
| 471 | faces.resize(faces.size()+1); |
| 472 | faces.back().indices.swap(f.indices); |
| 473 | } |
| 474 | } |
| 475 | |
| 476 | Ogre::MaterialPtr parseMaterial(const Appearance *app, const String &name) |
| 477 | { |