summaryrefslogtreecommitdiff
path: root/assetFactory/modelFactoryMesh.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-03-09 18:25:39 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-03-09 18:25:39 +0000
commit001be698401ef488cb3d30fb71c1a13c809407c8 (patch)
tree25f2f2634fcd7432092aa07f644dd00d1293f8d9 /assetFactory/modelFactoryMesh.h
parentAdd a generic persistence perf test (diff)
parentRewrite asset factory cylinder generator (diff)
downloadilt-001be698401ef488cb3d30fb71c1a13c809407c8.tar.bz2
ilt-001be698401ef488cb3d30fb71c1a13c809407c8.tar.xz
ilt-001be698401ef488cb3d30fb71c1a13c809407c8.zip
Merge branch 'model-factory-fixup'
Diffstat (limited to 'assetFactory/modelFactoryMesh.h')
-rw-r--r--assetFactory/modelFactoryMesh.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/assetFactory/modelFactoryMesh.h b/assetFactory/modelFactoryMesh.h
index 258913b..ea5f011 100644
--- a/assetFactory/modelFactoryMesh.h
+++ b/assetFactory/modelFactoryMesh.h
@@ -35,5 +35,12 @@ struct ModelFactoryMesh : public OpenMesh::PolyMesh_ArrayKernelT<ModelFactoryTra
OpenMesh::FPropHandleT<bool> smoothFaceProperty;
OpenMesh::FPropHandleT<std::string> nameFaceProperty;
- std::pair<std::string, OpenMesh::FaceHandle> add_namedFace(std::string name, std::vector<OpenMesh::VertexHandle> p);
+ template<typename... Vs>
+ std::pair<std::string, OpenMesh::FaceHandle>
+ add_namedFace(std::string name, Vs &&... vs)
+ {
+ const auto handle = add_face(std::forward<Vs>(vs)...);
+ property(nameFaceProperty, handle) = name;
+ return std::make_pair(name, handle);
+ }
};