diff options
Diffstat (limited to 'assetFactory/faceController.h')
-rw-r--r-- | assetFactory/faceController.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/assetFactory/faceController.h b/assetFactory/faceController.h index 10a226a..0376241 100644 --- a/assetFactory/faceController.h +++ b/assetFactory/faceController.h @@ -1,5 +1,6 @@ #pragma once +#include "geometricPlane.h" #include "modelFactoryMesh_fwd.h" #include "mutation.h" #include "persistence.h" @@ -10,15 +11,29 @@ class FaceController : public Mutation, public Style, public Persistence::Persistable { public: + class Split : public Persistable, public GeometricPlane { + public: + std::string id; + + private: + friend Persistence::SelectionPtrBase<std::unique_ptr<Split>>; + bool persist(Persistence::PersistenceStore & store) override; + std::string + getId() const override + { + return {}; + }; + }; using FaceControllers = std::map<std::string, std::unique_ptr<FaceController>>; + using Splits = std::map<std::string, std::unique_ptr<Split>>; - 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; std::string type; - bool smooth {false}; FaceControllers faceControllers; + Splits splits; private: friend Persistence::SelectionPtrBase<std::unique_ptr<FaceController>>; @@ -28,4 +43,10 @@ private: { return {}; }; + + void applySingle(ModelFactoryMesh & mesh, const Style::StyleStack & parents, const std::string & name, + Shape::CreatedFaces & faces) const; + Shape::CreatedFaces extrude(ModelFactoryMesh & mesh, const std::string & faceName, OpenMesh::FaceHandle) const; + Shape::CreatedFaces split( + ModelFactoryMesh & mesh, const std::string & faceName, OpenMesh::FaceHandle &, const Split &) const; }; |