]> git.localhorst.tv Git - blank.git/blobdiff - src/geometry/Location.hpp
glm backwards compatibility
[blank.git] / src / geometry / Location.hpp
index 7dbff69a55bf9e3bceabbb827102868627708272..d475b3bc4c63e78b4e3347522a57c563b4f0ca5c 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef BLANK_GEOMETRY_LOCATION_HPP_
 #define BLANK_GEOMETRY_LOCATION_HPP_
 
-#include <glm/glm.hpp>
+#include "../graphics/glm.hpp"
 
 
 namespace blank {
@@ -11,7 +11,7 @@ struct Location {
 
        using Coarse = glm::ivec3;
        using CoarseScalar = int;
-       using Fine = glm::tvec3<T>;
+       using Fine = TVEC3<T, glm::precision(0)>;
        using FineScalar = T;
        using Self = Location<T>;
 
@@ -60,6 +60,9 @@ struct Location {
 
 };
 
+template<class T> constexpr typename Location<T>::CoarseScalar Location<T>::scale;
+template<class T> constexpr typename Location<T>::FineScalar Location<T>::fscale;
+
 template<class T>
 inline Location<T> &Location<T>::Correct() noexcept {
        while (block.x >= fscale) {