diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-04-08 11:42:43 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-04-08 11:42:43 +0100 |
commit | 7f9e28e4e91ac757680fef56e771122cde14c9db (patch) | |
tree | 7b660bf5af3b2d03f7f1a864bc8357457778bfea /assetFactory/modelFactoryMesh.h | |
parent | Extend face controller to support splitting a face along a plane (diff) | |
download | ilt-7f9e28e4e91ac757680fef56e771122cde14c9db.tar.bz2 ilt-7f9e28e4e91ac757680fef56e771122cde14c9db.tar.xz ilt-7f9e28e4e91ac757680fef56e771122cde14c9db.zip |
Remember the name of the adjacent face of each halfedge of each named face
Used when extruding to remember what the new face name will be, even after the adjacent face has
been removed/replaced/split/etc
Diffstat (limited to 'assetFactory/modelFactoryMesh.h')
-rw-r--r-- | assetFactory/modelFactoryMesh.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/assetFactory/modelFactoryMesh.h b/assetFactory/modelFactoryMesh.h index a862dc1..8ac2edd 100644 --- a/assetFactory/modelFactoryMesh.h +++ b/assetFactory/modelFactoryMesh.h @@ -48,13 +48,17 @@ struct ModelFactoryMesh : public OpenMesh::PolyMesh_ArrayKernelT<ModelFactoryTra OpenMesh::FPropHandleT<bool> smoothFaceProperty; OpenMesh::FPropHandleT<std::string> nameFaceProperty; + OpenMesh::HPropHandleT<std::string> nameAdjFaceProperty; 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); + configNamedFace(name, handle); + return {std::move(name), handle}; } + +private: + void configNamedFace(const std::string & name, OpenMesh::FaceHandle); }; |