diff options
Diffstat (limited to 'thirdparty')
-rw-r--r-- | thirdparty/Jamfile.jam | 12 | ||||
m--------- | thirdparty/ctre | 0 | ||||
m--------- | thirdparty/imgui | 0 | ||||
m--------- | thirdparty/lunasvg | 0 | ||||
-rw-r--r-- | thirdparty/openmesh/helpers.h | 60 |
5 files changed, 72 insertions, 0 deletions
diff --git a/thirdparty/Jamfile.jam b/thirdparty/Jamfile.jam index b6ed163..26497c9 100644 --- a/thirdparty/Jamfile.jam +++ b/thirdparty/Jamfile.jam @@ -28,3 +28,15 @@ lib imguisdl2 : : : <include>imgui ; + +lib lunasvg : + [ glob lunasvg/source/*.cpp lunasvg/plutovg/source/*.c ] + : + <link>static + <include>lunasvg/include + <include>lunasvg/plutovg/include + <warnings>off + <cflags>-fPIC + : : + <include>lunasvg/include + ; diff --git a/thirdparty/ctre b/thirdparty/ctre -Subproject b3d7788b559e34d985c8530c3e0e7260b67505a +Subproject acb2f4de2e24a06280088377e47534137c0bc75 diff --git a/thirdparty/imgui b/thirdparty/imgui -Subproject 2db79d0868f7b02d26f7557a72504a0b6f84493 +Subproject b4c96355c9b51b54c4deb52e7d7cdfc7bf79bc2 diff --git a/thirdparty/lunasvg b/thirdparty/lunasvg new file mode 160000 +Subproject f8aabfb444bb37f69df7290790f57e4a27730a9 diff --git a/thirdparty/openmesh/helpers.h b/thirdparty/openmesh/helpers.h new file mode 100644 index 0000000..0e29261 --- /dev/null +++ b/thirdparty/openmesh/helpers.h @@ -0,0 +1,60 @@ +#pragma once +#include <OpenMesh/Core/Mesh/BaseKernel.hh> +#include <OpenMesh/Core/Mesh/PolyConnectivity.hh> +#include <ranges> + +namespace OpenMesh { + template<typename Iter, typename... IterParams> + using IteratorFunction = Iter (OpenMesh::PolyConnectivity::*)(IterParams...) const; + +#if OM_GET_VER < 8 + template<typename Iter, typename CenterEntityHandle, IteratorFunction<Iter, CenterEntityHandle> BeginFunc, + IteratorFunction<Iter, CenterEntityHandle> EndFunc, typename Adaptor> + auto + operator|(const OpenMesh::PolyConnectivity::CirculatorRange<OpenMesh::PolyConnectivity, Iter, CenterEntityHandle, + BeginFunc, EndFunc> & range, + Adaptor && adaptor) + { + return std::views::iota(range.begin(), range.end()) | std::forward<Adaptor>(adaptor); + } + + template<typename Iter, IteratorFunction<Iter> BeginFunc, IteratorFunction<Iter> EndFunc, typename Adaptor> + auto + operator|( + const OpenMesh::PolyConnectivity::EntityRange<const OpenMesh::PolyConnectivity, Iter, BeginFunc, EndFunc> & + range, + Adaptor && adaptor) + { + return std::views::iota(range.begin(), range.end()) | std::forward<Adaptor>(adaptor); + } +#else + template<typename Iter, typename CenterEntityHandle, typename ToEntityHandle, + IteratorFunction<Iter, CenterEntityHandle> BeginFunc, IteratorFunction<Iter, CenterEntityHandle> EndFunc, + typename Adaptor> + auto + operator|(const CirculatorRange<CirculatorRangeTraitT<OpenMesh::PolyConnectivity, Iter, CenterEntityHandle, + ToEntityHandle, BeginFunc, EndFunc>> & range, + Adaptor && adaptor) + { + return std::views::iota(range.begin(), range.end()) | std::forward<Adaptor>(adaptor); + } + + template<typename Iter, IteratorFunction<Iter> BeginFunc, IteratorFunction<Iter> EndFunc, typename Adaptor> + auto + operator|(const EntityRange<RangeTraitT<const OpenMesh::PolyConnectivity, Iter, BeginFunc, EndFunc>> & range, + Adaptor && adaptor) + { + return std::views::iota(range.begin(), range.end()) | std::forward<Adaptor>(adaptor); + } + +#endif + + namespace 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)...); + } + }; + } +} |