|
|
|
@ -424,9 +424,9 @@ std::optional<MeshData3D> ObjImporter::doMesh3D(UnsignedInt id) { |
|
|
|
if(!normalIndices.empty() || !textureCoordinateIndices.empty()) { |
|
|
|
if(!normalIndices.empty() || !textureCoordinateIndices.empty()) { |
|
|
|
std::vector<std::reference_wrapper<std::vector<UnsignedInt>>> arrays; |
|
|
|
std::vector<std::reference_wrapper<std::vector<UnsignedInt>>> arrays; |
|
|
|
arrays.reserve(3); |
|
|
|
arrays.reserve(3); |
|
|
|
arrays.push_back(positionIndices); |
|
|
|
arrays.push_back(std::ref(positionIndices)); |
|
|
|
if(!normalIndices.empty()) arrays.push_back(normalIndices); |
|
|
|
if(!normalIndices.empty()) arrays.push_back(std::ref(normalIndices)); |
|
|
|
if(!textureCoordinateIndices.empty()) arrays.push_back(textureCoordinateIndices); |
|
|
|
if(!textureCoordinateIndices.empty()) arrays.push_back(std::ref(textureCoordinateIndices)); |
|
|
|
indices = MeshTools::combineIndexArrays(arrays); |
|
|
|
indices = MeshTools::combineIndexArrays(arrays); |
|
|
|
|
|
|
|
|
|
|
|
/* Reindex data arrays */ |
|
|
|
/* Reindex data arrays */ |
|
|
|
|