add debug for vec4

This commit is contained in:
ZappoMan 2015-01-21 16:56:04 -08:00
parent d3ae9af8ed
commit 02a68096c3
2 changed files with 11 additions and 0 deletions

View file

@ -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 <<

View file

@ -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