From 09b5fd4523246deace5f52eed03623d150b76913 Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Sun, 8 Mar 2015 23:04:11 +0100 Subject: [PATCH] added glm IO functions (not actually used, just for convenient debug printing) --- src/glmio.hpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/glmio.hpp diff --git a/src/glmio.hpp b/src/glmio.hpp new file mode 100644 index 0000000..f96d5fd --- /dev/null +++ b/src/glmio.hpp @@ -0,0 +1,27 @@ +#ifndef BLANKL_GLMIO_HPP_ +#define BLANKL_GLMIO_HPP_ + +#include +#include + + +namespace blank { + +template +std::ostream &operator <<(std::ostream &out, const glm::tvec3 &v) { + return out << '<' << v.x << ", " << v.y << ", " << v.z << '>'; +} + +template +std::ostream &operator <<(std::ostream &out, const glm::tvec4 &v) { + return out << '<' << v.x << ", " << v.y << ", " << v.z << ", " << v.w << '>'; +} + +template +std::ostream &operator <<(std::ostream &out, const glm::tmat4x4 &m) { + return out << '[' << m[0] << ", " << m[1] << ", " << m[2] << ", " << m[3] << ']'; +} + +} + +#endif -- 2.39.2