From 917c081ddc1651381f83d8a9b0e095440419814a Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 5 Jan 2025 01:09:01 +0000 Subject: Helper to declare and add OpenMesh property declaratively --- assetFactory/modelFactoryMesh.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'assetFactory/modelFactoryMesh.h') diff --git a/assetFactory/modelFactoryMesh.h b/assetFactory/modelFactoryMesh.h index 299986e..6a18155 100644 --- a/assetFactory/modelFactoryMesh.h +++ b/assetFactory/modelFactoryMesh.h @@ -8,6 +8,7 @@ #include #include #include +#include struct ModelFactoryTraits : public OpenMesh::DefaultTraits { FaceAttributes(OpenMesh::Attributes::Normal | OpenMesh::Attributes::Status | OpenMesh::Attributes::Color); @@ -21,13 +22,11 @@ struct ModelFactoryTraits : public OpenMesh::DefaultTraits { }; struct ModelFactoryMesh : public OpenMesh::PolyMesh_ArrayKernelT { - ModelFactoryMesh(); - bool normalsProvidedProperty {}; - OpenMesh::FPropHandleT smoothFaceProperty; - OpenMesh::FPropHandleT materialFaceProperty; - OpenMesh::FPropHandleT nameFaceProperty; - OpenMesh::HPropHandleT nameAdjFaceProperty; + const OpenMesh::Helpers::Property smoothFaceProperty {this}; + const OpenMesh::Helpers::Property materialFaceProperty {this}; + const OpenMesh::Helpers::Property nameFaceProperty {this}; + const OpenMesh::Helpers::Property nameAdjFaceProperty {this}; template std::pair -- cgit v1.2.3