summaryrefslogtreecommitdiff
path: root/assetFactory/modelFactoryMesh.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-02-25 03:05:24 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-02-25 03:05:24 +0000
commitb76d161a968ff4a2817e9cfe5c02d3538ef6029f (patch)
tree6f6ea06c40eef97f651083bea291db042c8bbbba /assetFactory/modelFactoryMesh.cpp
parentSupport for recursive colouring of asset factory faces (diff)
downloadilt-b76d161a968ff4a2817e9cfe5c02d3538ef6029f.tar.bz2
ilt-b76d161a968ff4a2817e9cfe5c02d3538ef6029f.tar.xz
ilt-b76d161a968ff4a2817e9cfe5c02d3538ef6029f.zip
Add face name property and wrapper to add a named face
Diffstat (limited to 'assetFactory/modelFactoryMesh.cpp')
-rw-r--r--assetFactory/modelFactoryMesh.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/assetFactory/modelFactoryMesh.cpp b/assetFactory/modelFactoryMesh.cpp
index 6c772ad..f9ee6a0 100644
--- a/assetFactory/modelFactoryMesh.cpp
+++ b/assetFactory/modelFactoryMesh.cpp
@@ -3,4 +3,13 @@
ModelFactoryMesh::ModelFactoryMesh()
{
add_property(smoothFaceProperty);
+ add_property(nameFaceProperty);
+}
+
+std::pair<std::string, OpenMesh::FaceHandle>
+ModelFactoryMesh::add_namedFace(std::string name, std::vector<OpenMesh::VertexHandle> p)
+{
+ const auto handle = add_face(std::move(p));
+ property(nameFaceProperty, handle) = name;
+ return std::make_pair(name, handle);
}