From 92c1aed7a471f34e18eb8d0077aad90fd8b7344b Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 9 Mar 2023 18:18:43 +0000 Subject: Make add_namedFace a thin template wrapper --- assetFactory/cylinder.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'assetFactory/cylinder.cpp') diff --git a/assetFactory/cylinder.cpp b/assetFactory/cylinder.cpp index e32ebcb..ca08bf8 100644 --- a/assetFactory/cylinder.cpp +++ b/assetFactory/cylinder.cpp @@ -25,13 +25,9 @@ Cylinder::createMesh(ModelFactoryMesh & mesh, float lodf) const const auto xyz2b = (xy2 ^ 0); const auto xyz1t = (xy1 ^ 1); const auto xyz2t = (xy2 ^ 1); - return mesh.add_namedFace("edge", - { - mesh.add_vertex({xyz1b.x, xyz1b.y, xyz1b.z}), - mesh.add_vertex({xyz2b.x, xyz2b.y, xyz2b.z}), - mesh.add_vertex({xyz2t.x, xyz2t.y, xyz2t.z}), - mesh.add_vertex({xyz1t.x, xyz1t.y, xyz1t.z}), - }); + return mesh.add_namedFace("edge", mesh.add_vertex({xyz1b.x, xyz1b.y, xyz1b.z}), + mesh.add_vertex({xyz2b.x, xyz2b.y, xyz2b.z}), mesh.add_vertex({xyz2t.x, xyz2t.y, xyz2t.z}), + mesh.add_vertex({xyz1t.x, xyz1t.y, xyz1t.z})); }); for (const auto & [name, face] : surface) { mesh.property(mesh.smoothFaceProperty, face) = true; -- cgit v1.2.3