summaryrefslogtreecommitdiff
path: root/assetFactory/cylinder.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-02-16 23:56:10 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-02-16 23:56:10 +0000
commit88d5b474f3ab1c021612b0730f1b8d327a7a32db (patch)
tree9d7178f03f130f7107ef4d278a1e34a0cc0dae06 /assetFactory/cylinder.cpp
parentRefactor so ModelFactoryMesh can define the smooth property on faces (diff)
downloadilt-88d5b474f3ab1c021612b0730f1b8d327a7a32db.tar.bz2
ilt-88d5b474f3ab1c021612b0730f1b8d327a7a32db.tar.xz
ilt-88d5b474f3ab1c021612b0730f1b8d327a7a32db.zip
Add support for smooth faces
Diffstat (limited to 'assetFactory/cylinder.cpp')
-rw-r--r--assetFactory/cylinder.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/assetFactory/cylinder.cpp b/assetFactory/cylinder.cpp
index 83cf035..d51dc37 100644
--- a/assetFactory/cylinder.cpp
+++ b/assetFactory/cylinder.cpp
@@ -36,6 +36,9 @@ Cylinder::createMesh(ModelFactoryMesh & mesh, const Mutation::Matrix & mutation)
mesh.add_vertex({xyz1t.x, xyz1t.y, xyz1t.z}),
}));
});
+ for (const auto & [name, face] : surface) {
+ mesh.property(mesh.smoothFaceProperty, face) = true;
+ }
surface.emplace("bottom", mesh.add_face(bottom));
surface.emplace("top", mesh.add_face(top));