add some vec2 debugging

This commit is contained in:
ZappoMan 2014-12-19 13:46:42 -08:00
parent 1db1914a2e
commit 22e2fcf746
2 changed files with 9 additions and 0 deletions

View file

@ -98,6 +98,14 @@ std::ostream& operator<<(std::ostream& s, const CapsuleShape& capsule) {
#ifndef QT_NO_DEBUG_STREAM
#include <QDebug>
QDebug& operator<<(QDebug& dbg, const glm::vec2& v) {
dbg.nospace() << "{type='glm::vec2'"
", x=" << v.x <<
", y=" << v.y <<
"}";
return dbg;
}
QDebug& operator<<(QDebug& dbg, const glm::vec3& v) {
dbg.nospace() << "{type='glm::vec3'"
", x=" << v.x <<

View file

@ -49,6 +49,7 @@ std::ostream& operator<<(std::ostream& s, const CapsuleShape& capsule);
#ifndef QT_NO_DEBUG_STREAM
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::quat& q);
QDebug& operator<<(QDebug& s, const glm::mat4& m);