From 715d4879fdd096ac82367984fdb22117d48737a4 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 15 Feb 2023 02:26:06 +0000 Subject: First cut of the model factory and the hardcoded Brush 47 model Requires temporary change to the fragment shader to hardcode some visible colour to the model --- assetFactory/faceController.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 assetFactory/faceController.h (limited to 'assetFactory/faceController.h') diff --git a/assetFactory/faceController.h b/assetFactory/faceController.h new file mode 100644 index 0000000..64c33f3 --- /dev/null +++ b/assetFactory/faceController.h @@ -0,0 +1,20 @@ +#pragma once + +#include "assetFactoryConfig_fwd.h" +#include "mutation.h" +#include "shape.h" +#include +#include + +class FaceController : public Mutation { +public: + using FaceControllers = std::map; + + void apply(ModelFactoryMesh & mesh, const std::string & name, Shape::CreatedFaces & faces) const; + + std::string id; + std::string colour; + std::string type; + bool smooth {false}; + FaceControllers faceControllers; +}; -- cgit v1.2.3 From c22c676dfee583bd48e1f962378f580f8310838b Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 16 Feb 2023 23:54:22 +0000 Subject: Refactor so ModelFactoryMesh can define the smooth property on faces --- assetFactory/faceController.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'assetFactory/faceController.h') diff --git a/assetFactory/faceController.h b/assetFactory/faceController.h index 64c33f3..9974caf 100644 --- a/assetFactory/faceController.h +++ b/assetFactory/faceController.h @@ -1,6 +1,6 @@ #pragma once -#include "assetFactoryConfig_fwd.h" +#include "modelFactoryMesh_fwd.h" #include "mutation.h" #include "shape.h" #include -- cgit v1.2.3 From df2a078c51cee464905c6fb1d1c7c4aa7873f6a1 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 22 Feb 2023 23:40:46 +0000 Subject: Implement loading asset, mesh and face definitions --- assetFactory/faceController.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'assetFactory/faceController.h') 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 #include -class FaceController : public Mutation { +class FaceController : public Mutation, public Persistence::Persistable { public: - using FaceControllers = std::map; + using FaceControllers = std::map>; 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, false>; + bool persist(Persistence::PersistenceStore & store) override; + std::string + getId() const override + { + return {}; + }; }; -- cgit v1.2.3 From 7d0decccaac3aa564b549d91a36279e7aca0814e Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 24 Feb 2023 19:30:30 +0000 Subject: Support for recursive colouring of asset factory faces Updates colours in sample model. --- assetFactory/faceController.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'assetFactory/faceController.h') diff --git a/assetFactory/faceController.h b/assetFactory/faceController.h index 296210d..0618388 100644 --- a/assetFactory/faceController.h +++ b/assetFactory/faceController.h @@ -4,17 +4,18 @@ #include "mutation.h" #include "persistence.h" #include "shape.h" +#include "style.h" #include #include -class FaceController : public Mutation, public Persistence::Persistable { +class FaceController : public Mutation, public Style, public Persistence::Persistable { public: using FaceControllers = std::map>; - void apply(ModelFactoryMesh & mesh, const std::string & name, Shape::CreatedFaces & faces) const; + void apply(ModelFactoryMesh & mesh, const Style::StyleStack & parents, const std::string & name, + Shape::CreatedFaces & faces) const; std::string id; - std::string colour; std::string type; bool smooth {false}; FaceControllers faceControllers; -- cgit v1.2.3 From 7a70e75656d31428c9bbbd51fbf1ca920e577ed1 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 28 Feb 2023 01:24:18 +0000 Subject: Remove to specify if the Selection pointer type is shared or not Inferred based on whether the pointer is copyable or not. --- assetFactory/faceController.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'assetFactory/faceController.h') diff --git a/assetFactory/faceController.h b/assetFactory/faceController.h index 0618388..10a226a 100644 --- a/assetFactory/faceController.h +++ b/assetFactory/faceController.h @@ -21,7 +21,7 @@ public: FaceControllers faceControllers; private: - friend Persistence::SelectionPtrBase, false>; + friend Persistence::SelectionPtrBase>; bool persist(Persistence::PersistenceStore & store) override; std::string getId() const override -- cgit v1.2.3