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/plane.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 assetFactory/plane.cpp (limited to 'assetFactory/plane.cpp') diff --git a/assetFactory/plane.cpp b/assetFactory/plane.cpp new file mode 100644 index 0000000..1e522ad --- /dev/null +++ b/assetFactory/plane.cpp @@ -0,0 +1,15 @@ +#include "plane.h" +#include "assetFactoryConfig.h" + +Plane::CreatedFaces +Plane::createMesh(ModelFactoryMesh & mesh, const Mutation::Matrix & mutation) const +{ + static constexpr std::array VERTICES {{ + {n, n, z}, + {y, n, z}, + {y, y, z}, + {n, y, z}, + }}; + + return {{"plane", mesh.add_face(addMutatedToMesh(mesh, VERTICES, 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/plane.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'assetFactory/plane.cpp') diff --git a/assetFactory/plane.cpp b/assetFactory/plane.cpp index 1e522ad..37c8194 100644 --- a/assetFactory/plane.cpp +++ b/assetFactory/plane.cpp @@ -1,5 +1,5 @@ #include "plane.h" -#include "assetFactoryConfig.h" +#include "modelFactoryMesh.h" Plane::CreatedFaces Plane::createMesh(ModelFactoryMesh & mesh, const Mutation::Matrix & mutation) const -- cgit v1.2.3 From f6f085d3744990a6e80927aa17f4c5d77456d4f9 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 25 Feb 2023 03:10:25 +0000 Subject: Primitives add named faces --- assetFactory/plane.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'assetFactory/plane.cpp') diff --git a/assetFactory/plane.cpp b/assetFactory/plane.cpp index 37c8194..563c4e9 100644 --- a/assetFactory/plane.cpp +++ b/assetFactory/plane.cpp @@ -11,5 +11,5 @@ Plane::createMesh(ModelFactoryMesh & mesh, const Mutation::Matrix & mutation) co {n, y, z}, }}; - return {{"plane", mesh.add_face(addMutatedToMesh(mesh, VERTICES, mutation))}}; + return {mesh.add_namedFace("plane", addMutatedToMesh(mesh, VERTICES, mutation))}; } -- cgit v1.2.3