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/assetFactoryConfig.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 assetFactory/assetFactoryConfig.h (limited to 'assetFactory/assetFactoryConfig.h') diff --git a/assetFactory/assetFactoryConfig.h b/assetFactory/assetFactoryConfig.h new file mode 100644 index 0000000..171b81a --- /dev/null +++ b/assetFactory/assetFactoryConfig.h @@ -0,0 +1,28 @@ +#pragma once + +#include "assetFactoryConfig_fwd.h" +#include +#include +#include +#include + +namespace OpenMesh { + template struct glmvec : public VectorT { + using VectorT::VectorT; + glmvec(const VectorT & v) : VectorT {v} { } + operator glm::vec() const + { + glm::vec out; + std::copy(this->begin(), this->end(), &out[0]); + return out; + } + }; +} + +struct ModelFactoryTraits : public OpenMesh::DefaultTraits { + FaceAttributes(OpenMesh::Attributes::Normal | OpenMesh::Attributes::Status); + EdgeAttributes(OpenMesh::Attributes::Status); + VertexAttributes(OpenMesh::Attributes::Normal | OpenMesh::Attributes::Status); + using Point = OpenMesh::glmvec; + using Normal = OpenMesh::glmvec; +}; -- cgit v1.2.3