summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-05-23 22:30:24 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-05-24 10:48:43 +0200
commit66120256587c88d8746095485ab0d12aea9232a6 (patch)
tree33d4fb1dc95e226d0f319596ea41b1fff83167a6
parent53fb2cd4539aedd4b647d01eb0421c14d3da4f23 (diff)
add ostream operator<< for glm::vec3
Change-Id: Ic3ce4a647936f3f1c62c2dc3cf37f687d8fbccc1
-rw-r--r--include/vcl/opengl/OpenGLHelper.hxx1
-rw-r--r--vcl/source/opengl/OpenGLHelper.cxx6
2 files changed, 7 insertions, 0 deletions
diff --git a/include/vcl/opengl/OpenGLHelper.hxx b/include/vcl/opengl/OpenGLHelper.hxx
index 475bd720c082..9cc485b03646 100644
--- a/include/vcl/opengl/OpenGLHelper.hxx
+++ b/include/vcl/opengl/OpenGLHelper.hxx
@@ -40,6 +40,7 @@ public:
VCLOPENGL_DLLPUBLIC std::ostream& operator<<(std::ostream& rStrm, const glm::mat4& rMatrix);
VCLOPENGL_DLLPUBLIC std::ostream& operator<<(std::ostream& rStrm, const glm::vec4& rPos);
+VCLOPENGL_DLLPUBLIC std::ostream& operator<<(std::ostream& rStrm, const glm::vec3& rPos);
#endif
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index bace47b7bc33..a2d9b83aae61 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -253,6 +253,12 @@ std::ostream& operator<<(std::ostream& rStrm, const glm::vec4& rPos)
return rStrm;
}
+std::ostream& operator<<(std::ostream& rStrm, const glm::vec3& rPos)
+{
+ rStrm << "( " << rPos[0] << ", " << rPos[1] << ", " << rPos[2] << ")";
+ return rStrm;
+}
+
std::ostream& operator<<(std::ostream& rStrm, const glm::mat4& rMatrix)
{
for(int i = 0; i < 4; ++i)