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/use.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 assetFactory/use.h (limited to 'assetFactory/use.h') diff --git a/assetFactory/use.h b/assetFactory/use.h new file mode 100644 index 0000000..4bfce97 --- /dev/null +++ b/assetFactory/use.h @@ -0,0 +1,17 @@ +#pragma once + +#include "assetFactoryConfig_fwd.h" +#include "faceController.h" +#include "shape.h" +#include "stdTypeDefs.hpp" + +class Use : public StdTypeDefs, public Mutation { +public: + using FaceControllers = std::map; + + Shape::CreatedFaces createMesh(ModelFactoryMesh & mesh, const Mutation::Matrix & mutation) const; + + Shape::CPtr type; + std::string colour; + 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/use.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'assetFactory/use.h') diff --git a/assetFactory/use.h b/assetFactory/use.h index 4bfce97..28f5459 100644 --- a/assetFactory/use.h +++ b/assetFactory/use.h @@ -1,7 +1,7 @@ #pragma once -#include "assetFactoryConfig_fwd.h" #include "faceController.h" +#include "modelFactoryMesh_fwd.h" #include "shape.h" #include "stdTypeDefs.hpp" -- cgit v1.2.3 From ed7c2a6a73f24f97a0f04c2e6be6862ffe54b585 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 21 Feb 2023 01:25:34 +0000 Subject: Support for loading objects, uses and model factories from an XML resource --- assetFactory/use.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'assetFactory/use.h') diff --git a/assetFactory/use.h b/assetFactory/use.h index 28f5459..96f07f6 100644 --- a/assetFactory/use.h +++ b/assetFactory/use.h @@ -2,10 +2,11 @@ #include "faceController.h" #include "modelFactoryMesh_fwd.h" +#include "persistence.h" #include "shape.h" #include "stdTypeDefs.hpp" -class Use : public StdTypeDefs, public Mutation { +class Use : public StdTypeDefs, public Mutation, public Persistence::Persistable { public: using FaceControllers = std::map; @@ -14,4 +15,13 @@ public: Shape::CPtr type; std::string colour; FaceControllers faceControllers; + +private: + friend Persistence::SelectionPtrBase, true>; + bool persist(Persistence::PersistenceStore & store) override; + std::string + getId() const override + { + return {}; + }; }; -- 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/use.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'assetFactory/use.h') diff --git a/assetFactory/use.h b/assetFactory/use.h index 96f07f6..853af23 100644 --- a/assetFactory/use.h +++ b/assetFactory/use.h @@ -8,7 +8,7 @@ class Use : public StdTypeDefs, public Mutation, public Persistence::Persistable { public: - using FaceControllers = std::map; + using FaceControllers = std::map>; Shape::CreatedFaces createMesh(ModelFactoryMesh & mesh, const Mutation::Matrix & mutation) const; -- 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/use.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'assetFactory/use.h') diff --git a/assetFactory/use.h b/assetFactory/use.h index 853af23..5b61eca 100644 --- a/assetFactory/use.h +++ b/assetFactory/use.h @@ -5,15 +5,15 @@ #include "persistence.h" #include "shape.h" #include "stdTypeDefs.hpp" +#include "style.h" -class Use : public StdTypeDefs, public Mutation, public Persistence::Persistable { +class Use : public StdTypeDefs, public Mutation, public Style, public Persistence::Persistable { public: using FaceControllers = std::map>; Shape::CreatedFaces createMesh(ModelFactoryMesh & mesh, const Mutation::Matrix & mutation) const; Shape::CPtr type; - std::string colour; FaceControllers faceControllers; private: -- 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/use.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'assetFactory/use.h') diff --git a/assetFactory/use.h b/assetFactory/use.h index 5b61eca..5e4c35f 100644 --- a/assetFactory/use.h +++ b/assetFactory/use.h @@ -17,7 +17,7 @@ public: FaceControllers faceControllers; private: - friend Persistence::SelectionPtrBase, true>; + friend Persistence::SelectionPtrBase>; bool persist(Persistence::PersistenceStore & store) override; std::string getId() const override -- cgit v1.2.3