Exemple #1
0
QDebug operator<<(QDebug d, const QSGTransformNode *n)
{
    if (!n) {
        d << "TransformNode(null)";
        return d;
    }
    const QMatrix4x4 m = n->matrix();
    d << "TransformNode(";
    d << hex << (const void *) n << dec;
    if (m.isIdentity())
        d << "identity";
    else if (m.determinant() == 1 && m(0, 0) == 1 && m(1, 1) == 1 && m(2, 2) == 1)
        d << "translate" << m(0, 3) << m(1, 3) << m(2, 3);
    else
        d << "det=" << n->matrix().determinant();
#ifdef QSG_RUNTIME_DESCRIPTION
    d << QSGNodePrivate::description(n);
#endif
    d << (n->isSubtreeBlocked() ? "*BLOCKED*" : "");
    d << ')';
    return d;
}