summaryrefslogtreecommitdiff
path: root/assetFactory
diff options
context:
space:
mode:
Diffstat (limited to 'assetFactory')
-rw-r--r--assetFactory/modelFactoryMesh.cpp9
-rw-r--r--assetFactory/modelFactoryMesh.h3
2 files changed, 12 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);
}
diff --git a/assetFactory/modelFactoryMesh.h b/assetFactory/modelFactoryMesh.h
index 7d222f5..b4f5254 100644
--- a/assetFactory/modelFactoryMesh.h
+++ b/assetFactory/modelFactoryMesh.h
@@ -32,4 +32,7 @@ struct ModelFactoryMesh : public OpenMesh::PolyMesh_ArrayKernelT<ModelFactoryTra
ModelFactoryMesh();
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);
};