summaryrefslogtreecommitdiff
path: root/thirdparty/openmesh/helpers.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2025-01-05 01:09:01 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2025-01-05 01:09:01 +0000
commit917c081ddc1651381f83d8a9b0e095440419814a (patch)
tree978c5fcc7b79b5ebe1c2abd938124eb8bee52adb /thirdparty/openmesh/helpers.h
parentFix curve walk edge case where the curve legitimately returns to the previous... (diff)
downloadilt-917c081ddc1651381f83d8a9b0e095440419814a.tar.bz2
ilt-917c081ddc1651381f83d8a9b0e095440419814a.tar.xz
ilt-917c081ddc1651381f83d8a9b0e095440419814a.zip
Helper to declare and add OpenMesh property declaratively
Diffstat (limited to 'thirdparty/openmesh/helpers.h')
-rw-r--r--thirdparty/openmesh/helpers.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/thirdparty/openmesh/helpers.h b/thirdparty/openmesh/helpers.h
new file mode 100644
index 0000000..bed885c
--- /dev/null
+++ b/thirdparty/openmesh/helpers.h
@@ -0,0 +1,11 @@
+#pragma once
+#include <OpenMesh/Core/Mesh/BaseKernel.hh>
+
+namespace OpenMesh::Helpers {
+ template<typename Type, template<typename> typename PropertyT> struct Property : public PropertyT<Type> {
+ template<typename... Params> explicit Property(OpenMesh::BaseKernel * kernel, Params &&... params)
+ {
+ kernel->add_property(*this, std::forward<Params>(params)...);
+ }
+ };
+}