From: Daniel Karbach Date: Sun, 8 Mar 2015 22:04:11 +0000 (+0100) Subject: added glm IO functions X-Git-Url: http://git.localhorst.tv/?a=commitdiff_plain;h=09b5fd4523246deace5f52eed03623d150b76913;p=blank.git added glm IO functions (not actually used, just for convenient debug printing) --- 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