summaryrefslogtreecommitdiff
path: root/assetFactory/cylinder.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-03-09 18:18:43 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-03-09 18:18:43 +0000
commit92c1aed7a471f34e18eb8d0077aad90fd8b7344b (patch)
treebf78c2ec29a06e22c7cd8c695b22de83694cc5a4 /assetFactory/cylinder.cpp
parentRefactor of asset factory to address mutation/face controller logic (diff)
downloadilt-92c1aed7a471f34e18eb8d0077aad90fd8b7344b.tar.bz2
ilt-92c1aed7a471f34e18eb8d0077aad90fd8b7344b.tar.xz
ilt-92c1aed7a471f34e18eb8d0077aad90fd8b7344b.zip
Make add_namedFace a thin template wrapper
Diffstat (limited to 'assetFactory/cylinder.cpp')
-rw-r--r--assetFactory/cylinder.cpp10
1 files changed, 3 insertions, 7 deletions
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;