summaryrefslogtreecommitdiff
path: root/assetFactory/cylinder.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-02-25 03:10:25 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-02-25 03:10:25 +0000
commitf6f085d3744990a6e80927aa17f4c5d77456d4f9 (patch)
tree4fabf3145e619311457676c10bb255f0828cb0a4 /assetFactory/cylinder.cpp
parentAdd face name property and wrapper to add a named face (diff)
downloadilt-f6f085d3744990a6e80927aa17f4c5d77456d4f9.tar.bz2
ilt-f6f085d3744990a6e80927aa17f4c5d77456d4f9.tar.xz
ilt-f6f085d3744990a6e80927aa17f4c5d77456d4f9.zip
Primitives add named faces
Diffstat (limited to 'assetFactory/cylinder.cpp')
-rw-r--r--assetFactory/cylinder.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/assetFactory/cylinder.cpp b/assetFactory/cylinder.cpp
index d51dc37..cf0dbfb 100644
--- a/assetFactory/cylinder.cpp
+++ b/assetFactory/cylinder.cpp
@@ -28,19 +28,19 @@ Cylinder::createMesh(ModelFactoryMesh & mesh, const Mutation::Matrix & mutation)
const auto xyz2b = (xy2 ^ 0) % mutation;
const auto xyz1t = (xy1 ^ 1) % mutation;
const auto xyz2t = (xy2 ^ 1) % mutation;
- return std::make_pair(std::string {"edge"},
- mesh.add_face({
+ 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;
}
- surface.emplace("bottom", mesh.add_face(bottom));
- surface.emplace("top", mesh.add_face(top));
+ surface.insert(mesh.add_namedFace("bottom", bottom));
+ surface.insert(mesh.add_namedFace("top", top));
return surface;
}