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/shape.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 assetFactory/shape.h (limited to 'assetFactory/shape.h') diff --git a/assetFactory/shape.h b/assetFactory/shape.h new file mode 100644 index 0000000..9510538 --- /dev/null +++ b/assetFactory/shape.h @@ -0,0 +1,25 @@ +#pragma once + +#include "assetFactoryConfig_fwd.h" +#include "mutation.h" +#include "stdTypeDefs.hpp" +#include +#include +#include +#include + +class Vertex; + +class Shape : public StdTypeDefs { +public: + using CreatedFaces = std::multimap; + + static constexpr float z {}, y {.5}, n {-y}, o {1}; + + virtual ~Shape() = default; + + virtual CreatedFaces createMesh(ModelFactoryMesh &, const Mutation::Matrix & mutation) const = 0; + + static std::vector addMutatedToMesh( + ModelFactoryMesh & mesh, const std::span vertices, const Mutation::Matrix & mutation); +}; -- 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/shape.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'assetFactory/shape.h') diff --git a/assetFactory/shape.h b/assetFactory/shape.h index 9510538..5a2b59c 100644 --- a/assetFactory/shape.h +++ b/assetFactory/shape.h @@ -1,6 +1,6 @@ #pragma once -#include "assetFactoryConfig_fwd.h" +#include "modelFactoryMesh_fwd.h" #include "mutation.h" #include "stdTypeDefs.hpp" #include -- cgit v1.2.3