Fix the fixme
- Based on the implementation in top of the last one I guess I know how to fix that. - Replacing push_back by emplace_backpull/4701/head
parent
0d8723a3eb
commit
659195d852
|
@ -2,8 +2,7 @@
|
||||||
Open Asset Import Library (assimp)
|
Open Asset Import Library (assimp)
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
|
||||||
Copyright (c) 2006-2019, assimp team
|
Copyright (c) 2006-2022, assimp team
|
||||||
|
|
||||||
|
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
|
@ -262,23 +261,25 @@ void X3DImporter::readDisk2D(XmlNode &node) {
|
||||||
//
|
//
|
||||||
// create quad list from two point lists
|
// create quad list from two point lists
|
||||||
//
|
//
|
||||||
if (tlist_i.size() < 2) throw DeadlyImportError("Disk2D. Not enough points for creating quad list."); // tlist_i and tlist_o has equal size.
|
if (tlist_i.size() < 2) {
|
||||||
|
// tlist_i and tlist_o has equal size.
|
||||||
|
throw DeadlyImportError("Disk2D. Not enough points for creating quad list.");
|
||||||
|
}
|
||||||
|
|
||||||
// add all quads except last
|
// add all quads except last
|
||||||
for (std::list<aiVector3D>::iterator it_i = tlist_i.begin(), it_o = tlist_o.begin(); it_i != tlist_i.end();) {
|
for (std::list<aiVector3D>::iterator it_i = tlist_i.begin(), it_o = tlist_o.begin(); it_i != tlist_i.end();) {
|
||||||
// do not forget - CCW direction
|
// do not forget - CCW direction
|
||||||
vlist.push_back(*it_i++); // 1st point
|
vlist.emplace_back(*it_i++); // 1st point
|
||||||
vlist.push_back(*it_o++); // 2nd point
|
vlist.emplace_back(*it_o++); // 2nd point
|
||||||
vlist.push_back(*it_o); // 3rd point
|
vlist.emplace_back(*it_o); // 3rd point
|
||||||
vlist.push_back(*it_i); // 4th point
|
vlist.emplace_back(*it_i); // 4th point
|
||||||
}
|
}
|
||||||
|
|
||||||
// add last quad
|
// add last quad
|
||||||
vlist.push_back(tlist_i.back()); // 1st point
|
vlist.emplace_back(tlist_i.back()); // 1st point
|
||||||
vlist.push_back(tlist_o.back()); // 2nd point
|
vlist.emplace_back(tlist_o.back()); // 2nd point
|
||||||
// FIXME: one of these should probably be tlist_i.front()
|
vlist.emplace_back(tlist_o.front()); // 3rd point
|
||||||
vlist.push_back(tlist_o.front()); // 3rd point
|
vlist.emplace_back(tlist_i.front()); // 4th point
|
||||||
vlist.push_back(tlist_o.front()); // 4th point
|
|
||||||
|
|
||||||
((X3DNodeElementGeometry2D *)ne)->NumIndices = 4;
|
((X3DNodeElementGeometry2D *)ne)->NumIndices = 4;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue