From 02a68096c364575d82e7bcad50c5be8f9f9bda83 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Wed, 21 Jan 2015 16:56:04 -0800 Subject: [PATCH] add debug for vec4 --- libraries/shared/src/StreamUtils.cpp | 10 ++++++++++ libraries/shared/src/StreamUtils.h | 1 + 2 files changed, 11 insertions(+) diff --git a/libraries/shared/src/StreamUtils.cpp b/libraries/shared/src/StreamUtils.cpp index 47bb8dd4e4..96967648ed 100644 --- a/libraries/shared/src/StreamUtils.cpp +++ b/libraries/shared/src/StreamUtils.cpp @@ -115,6 +115,16 @@ QDebug& operator<<(QDebug& dbg, const glm::vec3& v) { return dbg; } +QDebug& operator<<(QDebug& dbg, const glm::vec4& v) { + dbg.nospace() << "{type='glm::vec4'" + ", x=" << v.x << + ", y=" << v.y << + ", z=" << v.z << + ", w=" << v.w << + "}"; + return dbg; +} + QDebug& operator<<(QDebug& dbg, const glm::quat& q) { dbg.nospace() << "{type='glm::quat'" ", x=" << q.x << diff --git a/libraries/shared/src/StreamUtils.h b/libraries/shared/src/StreamUtils.h index d176d68e45..b9823a6743 100644 --- a/libraries/shared/src/StreamUtils.h +++ b/libraries/shared/src/StreamUtils.h @@ -51,6 +51,7 @@ class QDebug; // Add support for writing these to qDebug(). QDebug& operator<<(QDebug& s, const glm::vec2& v); QDebug& operator<<(QDebug& s, const glm::vec3& v); +QDebug& operator<<(QDebug& s, const glm::vec4& v); QDebug& operator<<(QDebug& s, const glm::quat& q); QDebug& operator<<(QDebug& s, const glm::mat4& m); #endif // QT_NO_DEBUG_STREAM