diff options
Diffstat (limited to 'src/obj_parser.cpp')
| -rw-r--r-- | src/obj_parser.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/obj_parser.cpp b/src/obj_parser.cpp index b30eff1..d83d75f 100644 --- a/src/obj_parser.cpp +++ b/src/obj_parser.cpp @@ -104,14 +104,10 @@ o3d::Mesh parse_object(const std::string& obj_path) { // std::cout << "Object: " << line.substr(2) << std::endl; } else if (line.rfind("v ", 0) == 0) { auto s_coords = split(line.substr(2), ' '); - math::Vector4 v{parse_float(s_coords[0]), parse_float(s_coords[1]), parse_float(s_coords[2]), 1.f}; - // std::cout << "Vertex x: " << v.x << " y: " << v.y << " z: " << v.z << std::endl; - mesh.vertices.push_back(v); + mesh.vertices.emplace_back(parse_float(s_coords[0]), parse_float(s_coords[1]), parse_float(s_coords[2])); } else if (line.rfind("vn ", 0) == 0) { auto s_coords = split(line.substr(3), ' '); - math::Vector3 vn{parse_float(s_coords[0]), parse_float(s_coords[1]), parse_float(s_coords[2])}; - // std::cout << "Vertex normal x: " << vn.x << " y: " << vn.y << " z: " << vn.z << std::endl; - mesh.normals.push_back(vn); + mesh.normals.emplace_back(parse_float(s_coords[0]), parse_float(s_coords[1]), parse_float(s_coords[2])); } else if (line.rfind("s ", 0) == 0) { // auto smooth = false; // auto s_smooth = line.substr(2); |
