summaryrefslogtreecommitdiff
path: root/utility
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-02-05 00:30:13 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-02-05 00:30:13 +0000
commitc1ea14d1c96de18448c0c3779d30b7e1e4451f61 (patch)
treeb97edc04e70495caf49545dc30ed9936d1986d07 /utility
parentCreate terrain as collection of meshes (diff)
downloadilt-c1ea14d1c96de18448c0c3779d30b7e1e4451f61.tar.bz2
ilt-c1ea14d1c96de18448c0c3779d30b7e1e4451f61.tar.xz
ilt-c1ea14d1c96de18448c0c3779d30b7e1e4451f61.zip
Initial commit generating some basic rail network
Diffstat (limited to 'utility')
-rw-r--r--utility/stream_support.hpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/utility/stream_support.hpp b/utility/stream_support.hpp
new file mode 100644
index 0000000..6ab1bd1
--- /dev/null
+++ b/utility/stream_support.hpp
@@ -0,0 +1,20 @@
+#ifndef STREAM_SUPPORT_H
+#define STREAM_SUPPORT_H
+
+#include <iostream>
+
+template<glm::length_t L, glm::length_t R, typename T, glm::qualifier Q>
+std::ostream &
+operator<<(std::ostream & s, glm::mat<L, R, T, Q> & m)
+{
+ for (int y = 0; y < m.length(); y++) {
+ const auto & col = m[y];
+ for (int x = 0; x < col.length(); x++) {
+ s << col[x] << ", ";
+ }
+ s << "\n";
+ }
+ return s;
+}
+
+#endif