diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-02-22 23:40:46 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-02-22 23:40:46 +0000 |
commit | df2a078c51cee464905c6fb1d1c7c4aa7873f6a1 (patch) | |
tree | 209467479c61ab42bf39510f32fd375027115dcd /assetFactory/faceController.h | |
parent | Fixup MapByMember to work with shared or unique ptr (diff) | |
download | ilt-df2a078c51cee464905c6fb1d1c7c4aa7873f6a1.tar.bz2 ilt-df2a078c51cee464905c6fb1d1c7c4aa7873f6a1.tar.xz ilt-df2a078c51cee464905c6fb1d1c7c4aa7873f6a1.zip |
Implement loading asset, mesh and face definitions
Diffstat (limited to 'assetFactory/faceController.h')
-rw-r--r-- | assetFactory/faceController.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/assetFactory/faceController.h b/assetFactory/faceController.h index 9974caf..296210d 100644 --- a/assetFactory/faceController.h +++ b/assetFactory/faceController.h @@ -2,13 +2,14 @@ #include "modelFactoryMesh_fwd.h" #include "mutation.h" +#include "persistence.h" #include "shape.h" #include <map> #include <string> -class FaceController : public Mutation { +class FaceController : public Mutation, public Persistence::Persistable { public: - using FaceControllers = std::map<std::string, FaceController>; + using FaceControllers = std::map<std::string, std::unique_ptr<FaceController>>; void apply(ModelFactoryMesh & mesh, const std::string & name, Shape::CreatedFaces & faces) const; @@ -17,4 +18,13 @@ public: std::string type; bool smooth {false}; FaceControllers faceControllers; + +private: + friend Persistence::SelectionPtrBase<std::unique_ptr<FaceController>, false>; + bool persist(Persistence::PersistenceStore & store) override; + std::string + getId() const override + { + return {}; + }; }; |