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/factoryMesh.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 assetFactory/factoryMesh.h (limited to 'assetFactory/factoryMesh.h') diff --git a/assetFactory/factoryMesh.h b/assetFactory/factoryMesh.h new file mode 100644 index 0000000..f850893 --- /dev/null +++ b/assetFactory/factoryMesh.h @@ -0,0 +1,14 @@ +#pragma once + +#include "gfx/models/mesh.h" +#include "stdTypeDefs.hpp" +#include "use.h" + +class FactoryMesh : public StdTypeDefs { +public: + Mesh::Ptr createMesh() const; + + std::string id; + glm::vec3 size; + Use::Collection uses; +}; -- 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/factoryMesh.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'assetFactory/factoryMesh.h') diff --git a/assetFactory/factoryMesh.h b/assetFactory/factoryMesh.h index f850893..4b6d3e5 100644 --- a/assetFactory/factoryMesh.h +++ b/assetFactory/factoryMesh.h @@ -4,11 +4,15 @@ #include "stdTypeDefs.hpp" #include "use.h" -class FactoryMesh : public StdTypeDefs { +class FactoryMesh : public Persistence::Persistable, public StdTypeDefs { public: Mesh::Ptr createMesh() const; std::string id; glm::vec3 size; Use::Collection uses; + +private: + friend Persistence::SelectionPtrBase, true>; + bool persist(Persistence::PersistenceStore & store) override; }; -- 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/factoryMesh.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'assetFactory/factoryMesh.h') diff --git a/assetFactory/factoryMesh.h b/assetFactory/factoryMesh.h index 4b6d3e5..bbeb870 100644 --- a/assetFactory/factoryMesh.h +++ b/assetFactory/factoryMesh.h @@ -13,6 +13,6 @@ public: Use::Collection uses; private: - friend Persistence::SelectionPtrBase, true>; + friend Persistence::SelectionPtrBase>; bool persist(Persistence::PersistenceStore & store) override; }; -- cgit v1.2.3