From 605db8cd3778bd2f58a956a0776c1001d7286def Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 21 Feb 2021 16:43:56 +0000 Subject: Named model parts, fix bogie spelling, new brush47 model --- gfx/models/obj.impl.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gfx/models/obj.impl.cpp') diff --git a/gfx/models/obj.impl.cpp b/gfx/models/obj.impl.cpp index 5ac15ac..330e851 100644 --- a/gfx/models/obj.impl.cpp +++ b/gfx/models/obj.impl.cpp @@ -4,27 +4,27 @@ #include #include #include +#include #include #include #include -std::vector +ObjParser::NamedMeshes ObjParser::createMeshes() const { - std::vector out; + NamedMeshes out; const auto data {createMeshData()}; - std::transform(data.begin(), data.end(), std::back_inserter(out), [](auto && obj) { + std::transform(data.begin(), data.end(), std::inserter(out, out.end()), [](auto && obj) { return std::make_pair(obj.first, std::make_shared(obj.second.first, obj.second.second)); }); return out; } -std::vector +ObjParser::NamedMeshesData ObjParser::createMeshData() const { - std::vector out; - out.reserve(objects.size()); - std::transform(objects.begin(), objects.end(), std::back_inserter(out), [this](auto && obj) { + NamedMeshesData out; + std::transform(objects.begin(), objects.end(), std::inserter(out, out.end()), [this](auto && obj) { std::vector overtices; std::vector vertexOrder; std::vector indices; -- cgit v1.2.3