diff options
Diffstat (limited to 'assetFactory')
-rw-r--r-- | assetFactory/faceController.cpp | 13 | ||||
-rw-r--r-- | assetFactory/faceController.h | 5 |
2 files changed, 16 insertions, 2 deletions
diff --git a/assetFactory/faceController.cpp b/assetFactory/faceController.cpp index 1e563b2..6493300 100644 --- a/assetFactory/faceController.cpp +++ b/assetFactory/faceController.cpp @@ -4,7 +4,18 @@ #include "modelFactoryMesh.h" void -FaceController::apply(ModelFactoryMesh & mesh, const StyleStack & parents, const std::string & name, +FaceController::apply(ModelFactoryMesh & mesh, const StyleStack & parents, const std::string & names, + Shape::CreatedFaces & faces) const +{ + std::stringstream nameStream {names}; + std::for_each(std::istream_iterator<std::string>(nameStream), std::istream_iterator<std::string> {}, + [&](const auto & name) { + applySingle(mesh, parents, name, faces); + }); +} + +void +FaceController::applySingle(ModelFactoryMesh & mesh, const StyleStack & parents, const std::string & name, Shape::CreatedFaces & faces) const { const auto getAdjacentFaceName = [&mesh](const auto & ofrange, OpenMesh::FaceHandle nf) -> std::string { diff --git a/assetFactory/faceController.h b/assetFactory/faceController.h index 10a226a..890aafa 100644 --- a/assetFactory/faceController.h +++ b/assetFactory/faceController.h @@ -12,7 +12,7 @@ class FaceController : public Mutation, public Style, public Persistence::Persis public: using FaceControllers = std::map<std::string, std::unique_ptr<FaceController>>; - void apply(ModelFactoryMesh & mesh, const Style::StyleStack & parents, const std::string & name, + void apply(ModelFactoryMesh & mesh, const Style::StyleStack & parents, const std::string & names, Shape::CreatedFaces & faces) const; std::string id; @@ -28,4 +28,7 @@ private: { return {}; }; + + void applySingle(ModelFactoryMesh & mesh, const Style::StyleStack & parents, const std::string & name, + Shape::CreatedFaces & faces) const; }; |