summaryrefslogtreecommitdiff
path: root/thirdparty
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-11-26 13:51:33 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-11-26 14:14:13 +0000
commit7fba471728f2216d7e3b7900297fc3b3531e286c (patch)
tree5caef3b2efc23aefccb215ec9005cd8e7d2e91b8 /thirdparty
parentFix todo for handling a terrain walk from outside the mesh (diff)
parentModel positions as integers (diff)
downloadilt-7fba471728f2216d7e3b7900297fc3b3531e286c.tar.bz2
ilt-7fba471728f2216d7e3b7900297fc3b3531e286c.tar.xz
ilt-7fba471728f2216d7e3b7900297fc3b3531e286c.zip
Merge branch 'ints' into terrain
Conflicts fix, compiles, some test failures remain. Trees not added, possibility of OM invalid handle assertion failures, normals broken due to integer overflow in Newell's method.
Diffstat (limited to 'thirdparty')
-rw-r--r--thirdparty/openmesh/glmcompat.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/thirdparty/openmesh/glmcompat.h b/thirdparty/openmesh/glmcompat.h
index 708b1a6..dc5a96e 100644
--- a/thirdparty/openmesh/glmcompat.h
+++ b/thirdparty/openmesh/glmcompat.h
@@ -1,6 +1,7 @@
#pragma once
#include <OpenMesh/Core/Mesh/Traits.hh>
+#include <OpenMesh/Core/Utils/vector_cast.hh>
#include <glm/geometric.hpp>
#include <glm/vec3.hpp>
@@ -21,6 +22,18 @@ namespace glm {
}
namespace OpenMesh {
+ template<typename dst_t, typename src_t, glm::length_t n, glm::qualifier Q>
+ struct vector_caster<glm::vec<n, dst_t, Q>, glm::vec<n, src_t, Q>> {
+ using source_type = glm::vec<n, src_t, Q>;
+ using return_type = glm::vec<n, dst_t, Q>;
+
+ inline static return_type
+ cast(const source_type & _src)
+ {
+ return return_type {_src};
+ }
+ };
+
template<glm::length_t L, typename T, glm::qualifier Q> struct vector_traits<glm::vec<L, T, Q>> {
using vector_type = glm::vec<L, T, Q>;
using value_type = T;