128 inv.m[1][2] = -matrixDet2(m, 0, 1, 0, 2) * det;
130 inv.m[2][0] = matrixDet2(m, 1, 2, 0, 1) * det;
131 inv.m[2][1] = -matrixDet2(m, 0, 2, 0, 1) * det;
132 inv.m[2][2] = matrixDet2(m, 0, 1, 0, 1) * det;
134 inv.m[3][0] = -inv.m[0][0] * m[3][0] - inv.m[1][0] * m[3][1] - inv.m[2][0] * m[3][2];
135 inv.m[3][1] = -inv.m[0][1] * m[3][0] - inv.m[1][1] * m[3][1] - inv.m[2][1] * m[3][2];
136 inv.m[3][2] = -inv.m[0][2] * m[3][0] - inv.m[1][2] * m[3][1] - inv.m[2][2] * m[3][2];
138 inv.flagBits = flagBits;
145 QDoubleMatrix4x4 inv(1);
147 double det = matrixDet4(m);
151 return QDoubleMatrix4x4();
155 inv.m[0][0] = matrixDet3(m, 1, 2, 3, 1, 2, 3) * det;
156 inv.m[0][1] = -matrixDet3(m, 0, 2, 3, 1, 2, 3) * det;
157 inv.m[0][2] = matrixDet3(m, 0, 1, 3, 1, 2, 3) * det;
158 inv.m[0][3] = -matrixDet3(m, 0, 1, 2, 1, 2, 3) * det;
159 inv.m[1][0] = -matrixDet3(m, 1, 2, 3, 0, 2, 3) * det;
160 inv.m[1][1] = matrixDet3(m, 0, 2, 3, 0, 2, 3) * det;
161 inv.m[1][2] = -matrixDet3(m, 0, 1, 3, 0, 2, 3) * det;
162 inv.m[1][3] = matrixDet3(m, 0, 1, 2, 0, 2, 3) * det;
163 inv.m[2][0] = matrixDet3(m, 1, 2, 3, 0, 1, 3) * det;
164 inv.m[2][1] = -matrixDet3(m, 0, 2, 3, 0, 1, 3) * det;
165 inv.m[2][2] = matrixDet3(m, 0, 1, 3, 0, 1, 3) * det;
166 inv.m[2][3] = -matrixDet3(m, 0, 1, 2, 0, 1, 3) * det;
167 inv.m[3][0] = -matrixDet3(m, 1, 2, 3, 0, 1, 2) * det;
168 inv.m[3][1] = matrixDet3(m, 0, 2, 3, 0, 1, 2) * det;
169 inv.m[3][2] = -matrixDet3(m, 0, 1, 3, 0, 1, 2) * det;
170 inv.m[3][3] = matrixDet3(m, 0, 1, 2, 0, 1, 2) * det;
171 inv.flagBits = flagBits;
178QDoubleMatrix4x4 QDoubleMatrix4x4::transposed()
const
180 QDoubleMatrix4x4 result(1);
181 for (
int row = 0; row < 4; ++row) {
182 for (
int col = 0; col < 4; ++col) {
183 result.m[col][row] = m[row][col];
187 result.flagBits = (flagBits & Translation ? General : flagBits);
191QDoubleMatrix4x4& QDoubleMatrix4x4::operator/=(
double divisor)
216 m.m[0][0] = matrix.m[0][0] / divisor;
217 m.m[0][1] = matrix.m[0][1] / divisor;
218 m.m[0][2] = matrix.m[0][2] / divisor;
219 m.m[0][3] = matrix.m[0][3] / divisor;
220 m.m[1][0] = matrix.m[1][0] / divisor;
221 m.m[1][1] = matrix.m[1][1] / divisor;
222 m.m[1][2] = matrix.m[1][2] / divisor;
223 m.m[1][3] = matrix.m[1][3] / divisor;
224 m.m[2][0] = matrix.m[2][0] / divisor;
225 m.m[2][1] = matrix.m[2][1] / divisor;
226 m.m[2][2] = matrix.m[2][2] / divisor;
227 m.m[2][3] = matrix.m[2][3] / divisor;
228 m.m[3][0] = matrix.m[3][0] / divisor;
229 m.m[3][1] = matrix.m[3][1] / divisor;
230 m.m[3][2] = matrix.m[3][2] / divisor;
231 m.m[3][3] = matrix.m[3][3] / divisor;
232 m.flagBits = QDoubleMatrix4x4::General;
236void QDoubleMatrix4x4::scale(
const QDoubleVector3D& vector)
238 double vx = vector.x();
239 double vy = vector.y();
240 double vz = vector.z();
241 if (flagBits < Scale) {
245 }
else if (flagBits < Rotation2D) {
249 }
else if (flagBits < Rotation) {
272void QDoubleMatrix4x4::scale(
double x,
double y)
274 if (flagBits < Scale) {
277 }
else if (flagBits < Rotation2D) {
280 }
else if (flagBits < Rotation) {
298void QDoubleMatrix4x4::scale(
double x,
double y,
double z)
300 if (flagBits < Scale) {
304 }
else if (flagBits < Rotation2D) {
308 }
else if (flagBits < Rotation) {
331void QDoubleMatrix4x4::scale(
double factor)
333 if (flagBits < Scale) {
337 }
else if (flagBits < Rotation2D) {
341 }
else if (flagBits < Rotation) {
364void QDoubleMatrix4x4::translate(
const QDoubleVector3D& vector)
366 double vx = vector.x();
367 double vy = vector.y();
368 double vz = vector.z();
369 if (flagBits == Identity) {
373 }
else if (flagBits == Translation) {
377 }
else if (flagBits == Scale) {
378 m[3][0] = m[0][0] * vx;
379 m[3][1] = m[1][1] * vy;
380 m[3][2] = m[2][2] * vz;
381 }
else if (flagBits == (Translation | Scale)) {
382 m[3][0] += m[0][0] * vx;
383 m[3][1] += m[1][1] * vy;
384 m[3][2] += m[2][2] * vz;
385 }
else if (flagBits < Rotation) {
386 m[3][0] += m[0][0] * vx + m[1][0] * vy;
387 m[3][1] += m[0][1] * vx + m[1][1] * vy;
388 m[3][2] += m[2][2] * vz;
390 m[3][0] += m[0][0] * vx + m[1][0] * vy + m[2][0] * vz;
391 m[3][1] += m[0][1] * vx + m[1][1] * vy + m[2][1] * vz;
392 m[3][2] += m[0][2] * vx + m[1][2] * vy + m[2][2] * vz;
393 m[3][3] += m[0][3] * vx + m[1][3] * vy + m[2][3] * vz;
395 flagBits |= Translation;
398void QDoubleMatrix4x4::translate(
double x,
double y)
400 if (flagBits == Identity) {
403 }
else if (flagBits == Translation) {
406 }
else if (flagBits == Scale) {
407 m[3][0] = m[0][0] * x;
408 m[3][1] = m[1][1] * y;
409 }
else if (flagBits == (Translation | Scale)) {
410 m[3][0] += m[0][0] * x;
411 m[3][1] += m[1][1] * y;
412 }
else if (flagBits < Rotation) {
413 m[3][0] += m[0][0] * x + m[1][0] * y;
414 m[3][1] += m[0][1] * x + m[1][1] * y;
416 m[3][0] += m[0][0] * x + m[1][0] * y;
417 m[3][1] += m[0][1] * x + m[1][1] * y;
418 m[3][2] += m[0][2] * x + m[1][2] * y;
419 m[3][3] += m[0][3] * x + m[1][3] * y;
421 flagBits |= Translation;
424void QDoubleMatrix4x4::translate(
double x,
double y,
double z)
426 if (flagBits == Identity) {
430 }
else if (flagBits == Translation) {
434 }
else if (flagBits == Scale) {
435 m[3][0] = m[0][0] * x;
436 m[3][1] = m[1][1] * y;
437 m[3][2] = m[2][2] * z;
438 }
else if (flagBits == (Translation | Scale)) {
439 m[3][0] += m[0][0] * x;
440 m[3][1] += m[1][1] * y;
441 m[3][2] += m[2][2] * z;
442 }
else if (flagBits < Rotation) {
443 m[3][0] += m[0][0] * x + m[1][0] * y;
444 m[3][1] += m[0][1] * x + m[1][1] * y;
445 m[3][2] += m[2][2] * z;
447 m[3][0] += m[0][0] * x + m[1][0] * y + m[2][0] * z;
448 m[3][1] += m[0][1] * x + m[1][1] * y + m[2][1] * z;
449 m[3][2] += m[0][2] * x + m[1][2] * y + m[2][2] * z;
450 m[3][3] += m[0][3] * x + m[1][3] * y + m[2][3] * z;
452 flagBits |= Translation;
455void QDoubleMatrix4x4::rotate(
double angle,
const QDoubleVector3D& vector)
457 rotate(angle, vector.x(), vector.y(), vector.z());
460void QDoubleMatrix4x4::rotate(
double angle,
double x,
double y,
double z)
465 if (angle == 90.0 || angle == -270.0) {
468 }
else if (angle == -90.0 || angle == 270.0) {
471 }
else if (angle == 180.0 || angle == -180.0) {
475 double a = qDegreesToRadians(angle);
486 m[0][0] = (tmp = m[0][0]) * c + m[1][0] * s;
487 m[1][0] = m[1][0] * c - tmp * s;
488 m[0][1] = (tmp = m[0][1]) * c + m[1][1] * s;
489 m[1][1] = m[1][1] * c - tmp * s;
490 m[0][2] = (tmp = m[0][2]) * c + m[1][2] * s;
491 m[1][2] = m[1][2] * c - tmp * s;
492 m[0][3] = (tmp = m[0][3]) * c + m[1][3] * s;
493 m[1][3] = m[1][3] * c - tmp * s;
495 flagBits |= Rotation2D;
498 }
else if (z == 0.0) {
503 m[2][0] = (tmp = m[2][0]) * c + m[0][0] * s;
504 m[0][0] = m[0][0] * c - tmp * s;
505 m[2][1] = (tmp = m[2][1]) * c + m[0][1] * s;
506 m[0][1] = m[0][1] * c - tmp * s;
507 m[2][2] = (tmp = m[2][2]) * c + m[0][2] * s;
508 m[0][2] = m[0][2] * c - tmp * s;
509 m[2][3] = (tmp = m[2][3]) * c + m[0][3] * s;
510 m[0][3] = m[0][3] * c - tmp * s;
512 flagBits |= Rotation;
515 }
else if (y == 0.0 && z == 0.0) {
520 m[1][0] = (tmp = m[1][0]) * c + m[2][0] * s;
521 m[2][0] = m[2][0] * c - tmp * s;
522 m[1][1] = (tmp = m[1][1]) * c + m[2][1] * s;
523 m[2][1] = m[2][1] * c - tmp * s;
524 m[1][2] = (tmp = m[1][2]) * c + m[2][2] * s;
525 m[2][2] = m[2][2] * c - tmp * s;
526 m[1][3] = (tmp = m[1][3]) * c + m[2][3] * s;
527 m[2][3] = m[2][3] * c - tmp * s;
529 flagBits |= Rotation;
533 if (
double len = qHypot(x, y, z);
534 !qFuzzyIsNull(len) && !qFuzzyCompare(len, 1.0)) {
540 QDoubleMatrix4x4 rot(1);
541 rot.m[0][0] = x * x * ic + c;
542 rot.m[1][0] = x * y * ic - z * s;
543 rot.m[2][0] = x * z * ic + y * s;
545 rot.m[0][1] = y * x * ic + z * s;
546 rot.m[1][1] = y * y * ic + c;
547 rot.m[2][1] = y * z * ic - x * s;
549 rot.m[0][2] = x * z * ic - y * s;
550 rot.m[1][2] = y * z * ic + x * s;
551 rot.m[2][2] = z * z * ic + c;
557 rot.flagBits = Rotation;
561void QDoubleMatrix4x4::projectedRotate(
double angle,
double x,
double y,
double z,
562 double distanceToPlane)
566 if (qIsNull(distanceToPlane))
567 return rotate(angle, x, y, z);
571 if (angle == 90.0 || angle == -270.0) {
574 }
else if (angle == -90.0 || angle == 270.0) {
577 }
else if (angle == 180.0 || angle == -180.0) {
581 double a = qDegreesToRadians(angle);
586 const double d = 1.0 / distanceToPlane;
594 m[0][0] = (tmp = m[0][0]) * c + m[1][0] * s;
595 m[1][0] = m[1][0] * c - tmp * s;
596 m[0][1] = (tmp = m[0][1]) * c + m[1][1] * s;
597 m[1][1] = m[1][1] * c - tmp * s;
598 m[0][2] = (tmp = m[0][2]) * c + m[1][2] * s;
599 m[1][2] = m[1][2] * c - tmp * s;
600 m[0][3] = (tmp = m[0][3]) * c + m[1][3] * s;
601 m[1][3] = m[1][3] * c - tmp * s;
603 flagBits |= Rotation2D;
606 }
else if (z == 0.0) {
611 m[0][0] = m[0][0] * c + m[3][0] * s;
612 m[0][1] = m[0][1] * c + m[3][1] * s;
613 m[0][2] = m[0][2] * c + m[3][2] * s;
614 m[0][3] = m[0][3] * c + m[3][3] * s;
618 }
else if (y == 0.0 && z == 0.0) {
623 m[1][0] = m[1][0] * c - m[3][0] * s;
624 m[1][1] = m[1][1] * c - m[3][1] * s;
625 m[1][2] = m[1][2] * c - m[3][2] * s;
626 m[1][3] = m[1][3] * c - m[3][3] * s;
631 if (
const double len = qHypot(x, y, z);
632 !qFuzzyIsNull(len) && !qFuzzyCompare(len, 1.0)) {
638 QDoubleMatrix4x4 rot(1);
639 rot.m[0][0] = x * x * ic + c;
640 rot.m[1][0] = x * y * ic - z * s;
643 rot.m[0][1] = y * x * ic + z * s;
644 rot.m[1][1] = y * y * ic + c;
651 rot.m[0][3] = (x * z * ic - y * s) * -d;
652 rot.m[1][3] = (y * z * ic + x * s) * -d;
655 rot.flagBits = General;
659void QDoubleMatrix4x4::ortho(
const QRect& rect)
665 ortho(rect.x(), rect.x() + rect.width(), rect.y() + rect.height(), rect.y(), -1.0, 1.0);
668void QDoubleMatrix4x4::ortho(
const QRectF& rect)
670 ortho(rect.left(), rect.right(), rect.bottom(), rect.top(), -1.0, 1.0);
673void QDoubleMatrix4x4::ortho(
double left,
double right,
double bottom,
double top,
double nearPlane,
double farPlane)
676 if (left == right || bottom == top || nearPlane == farPlane)
680 double width = right - left;
681 double invheight = top - bottom;
682 double clip = farPlane - nearPlane;
683 QDoubleMatrix4x4 m(1);
684 m.m[0][0] = 2.0 / width;
687 m.m[3][0] = -(left + right) / width;
689 m.m[1][1] = 2.0 / invheight;
691 m.m[3][1] = -(top + bottom) / invheight;
694 m.m[2][2] = -2.0 / clip;
695 m.m[3][2] = -(nearPlane + farPlane) / clip;
700 m.flagBits = Translation | Scale;
706void QDoubleMatrix4x4::frustum(
double left,
double right,
double bottom,
double top,
double nearPlane,
double farPlane)
709 if (left == right || bottom == top || nearPlane == farPlane)
713 QDoubleMatrix4x4 m(1);
714 double width = right - left;
715 double invheight = top - bottom;
716 double clip = farPlane - nearPlane;
717 m.m[0][0] = 2.0 * nearPlane / width;
719 m.m[2][0] = (left + right) / width;
722 m.m[1][1] = 2.0 * nearPlane / invheight;
723 m.m[2][1] = (top + bottom) / invheight;
727 m.m[2][2] = -(nearPlane + farPlane) / clip;
728 m.m[3][2] = -2.0 * nearPlane * farPlane / clip;
733 m.flagBits = General;
739void QDoubleMatrix4x4::perspective(
double verticalAngle,
double aspectRatio,
double nearPlane,
double farPlane)
742 if (nearPlane == farPlane || aspectRatio == 0.0)
746 QDoubleMatrix4x4 m(1);
747 double radians = qDegreesToRadians(verticalAngle / 2.0);
748 double sine = std::sin(radians);
751 double cotan = std::cos(radians) / sine;
752 double clip = farPlane - nearPlane;
753 m.m[0][0] = cotan / aspectRatio;
763 m.m[2][2] = -(nearPlane + farPlane) / clip;
764 m.m[3][2] = -(2.0 * nearPlane * farPlane) / clip;
769 m.flagBits = General;
775void QDoubleMatrix4x4::lookAt(
const QDoubleVector3D& eye,
const QDoubleVector3D& center,
const QDoubleVector3D& up)
777 QDoubleVector3D forward = center - eye;
778 if (qFuzzyIsNull(forward.x()) && qFuzzyIsNull(forward.y()) && qFuzzyIsNull(forward.z()))
782 QDoubleVector3D side = QDoubleVector3D::crossProduct(forward, up).normalized();
783 QDoubleVector3D upVector = QDoubleVector3D::crossProduct(side, forward);
785 QDoubleMatrix4x4 m(1);
786 m.m[0][0] = side.x();
787 m.m[1][0] = side.y();
788 m.m[2][0] = side.z();
790 m.m[0][1] = upVector.x();
791 m.m[1][1] = upVector.y();
792 m.m[2][1] = upVector.z();
794 m.m[0][2] = -forward.x();
795 m.m[1][2] = -forward.y();
796 m.m[2][2] = -forward.z();
802 m.flagBits = Rotation;
808void QDoubleMatrix4x4::viewport(
double left,
double bottom,
double width,
double height,
double nearPlane,
double farPlane)
810 const double w2 = width / 2.0;
811 const double h2 = height / 2.0;
813 QDoubleMatrix4x4 m(1);
817 m.m[3][0] = left + w2;
821 m.m[3][1] = bottom + h2;
824 m.m[2][2] = (farPlane - nearPlane) / 2.0;
825 m.m[3][2] = (nearPlane + farPlane) / 2.0;
830 m.flagBits = General;
835void QDoubleMatrix4x4::flipCoordinates()
840 if (flagBits < Rotation2D) {
857void QDoubleMatrix4x4::copyDataTo(
double *values)
const
859 for (
int row = 0; row < 4; ++row)
860 for (
int col = 0; col < 4; ++col)
861 values[row * 4 + col] =
double(m[col][row]);
864QRect QDoubleMatrix4x4::mapRect(
const QRect& rect)
const
866 if (flagBits < Scale) {
868 return QRect(qRound(rect.x() + m[3][0]),
869 qRound(rect.y() + m[3][1]),
870 rect.width(), rect.height());
871 }
else if (flagBits < Rotation2D) {
873 double x = rect.x() * m[0][0] + m[3][0];
874 double y = rect.y() * m[1][1] + m[3][1];
875 double w = rect.width() * m[0][0];
876 double h = rect.height() * m[1][1];
885 return QRect(qRound(x), qRound(y), qRound(w), qRound(h));
888 QPoint tl = map(rect.topLeft());
889 QPoint tr = map(QPoint(rect.x() + rect.width(), rect.y()));
890 QPoint bl = map(QPoint(rect.x(), rect.y() + rect.height()));
891 QPoint br = map(QPoint(rect.x() + rect.width(),
892 rect.y() + rect.height()));
894 int xmin = qMin(qMin(tl.x(), tr.x()), qMin(bl.x(), br.x()));
895 int xmax = qMax(qMax(tl.x(), tr.x()), qMax(bl.x(), br.x()));
896 int ymin = qMin(qMin(tl.y(), tr.y()), qMin(bl.y(), br.y()));
897 int ymax = qMax(qMax(tl.y(), tr.y()), qMax(bl.y(), br.y()));
899 return QRect(xmin, ymin, xmax - xmin, ymax - ymin);
902QRectF QDoubleMatrix4x4::mapRect(
const QRectF& rect)
const
904 if (flagBits < Scale) {
906 return rect.translated(m[3][0], m[3][1]);
907 }
else if (flagBits < Rotation2D) {
909 double x = rect.x() * m[0][0] + m[3][0];
910 double y = rect.y() * m[1][1] + m[3][1];
911 double w = rect.width() * m[0][0];
912 double h = rect.height() * m[1][1];
921 return QRectF(x, y, w, h);
924 QPointF tl = map(rect.topLeft()); QPointF tr = map(rect.topRight());
925 QPointF bl = map(rect.bottomLeft()); QPointF br = map(rect.bottomRight());
927 double xmin = qMin(qMin(tl.x(), tr.x()), qMin(bl.x(), br.x()));
928 double xmax = qMax(qMax(tl.x(), tr.x()), qMax(bl.x(), br.x()));
929 double ymin = qMin(qMin(tl.y(), tr.y()), qMin(bl.y(), br.y()));
930 double ymax = qMax(qMax(tl.y(), tr.y()), qMax(bl.y(), br.y()));
932 return QRectF(QPointF(xmin, ymin), QPointF(xmax, ymax));
935QDoubleMatrix4x4 QDoubleMatrix4x4::orthonormalInverse()
const
937 QDoubleMatrix4x4 result(1);
939 result.m[0][0] = m[0][0];
940 result.m[1][0] = m[0][1];
941 result.m[2][0] = m[0][2];
943 result.m[0][1] = m[1][0];
944 result.m[1][1] = m[1][1];
945 result.m[2][1] = m[1][2];
947 result.m[0][2] = m[2][0];
948 result.m[1][2] = m[2][1];
949 result.m[2][2] = m[2][2];
951 result.m[0][3] = 0.0;
952 result.m[1][3] = 0.0;
953 result.m[2][3] = 0.0;
955 result.m[3][0] = -(result.m[0][0] * m[3][0] + result.m[1][0] * m[3][1] + result.m[2][0] * m[3][2]);
956 result.m[3][1] = -(result.m[0][1] * m[3][0] + result.m[1][1] * m[3][1] + result.m[2][1] * m[3][2]);
957 result.m[3][2] = -(result.m[0][2] * m[3][0] + result.m[1][2] * m[3][1] + result.m[2][2] * m[3][2]);
958 result.m[3][3] = 1.0;
960 result.flagBits = flagBits;
965void QDoubleMatrix4x4::optimize()
969 if (m[0][3] != 0 || m[1][3] != 0 || m[2][3] != 0 || m[3][3] != 1)
972 flagBits &= ~Perspective;
975 if (m[3][0] == 0 && m[3][1] == 0 && m[3][2] == 0)
976 flagBits &= ~Translation;
979 if (!m[0][2] && !m[1][2] && !m[2][0] && !m[2][1]) {
980 flagBits &= ~Rotation;
982 if (!m[0][1] && !m[1][0]) {
983 flagBits &= ~Rotation2D;
985 if (m[0][0] == 1 && m[1][1] == 1 && m[2][2] == 1)
989 double det = matrixDet2(m, 0, 1, 0, 1);
990 double lenX = m[0][0] * m[0][0] + m[0][1] * m[0][1];
991 double lenY = m[1][0] * m[1][0] + m[1][1] * m[1][1];
992 double lenZ = m[2][2];
993 if (qFuzzyCompare(det, 1.0) && qFuzzyCompare(lenX, 1.0)
994 && qFuzzyCompare(lenY, 1.0) && qFuzzyCompare(lenZ, 1.0))
1001 double det = matrixDet3(m, 0, 1, 2, 0, 1, 2);
1002 double lenX = m[0][0] * m[0][0] + m[0][1] * m[0][1] + m[0][2] * m[0][2];
1003 double lenY = m[1][0] * m[1][0] + m[1][1] * m[1][1] + m[1][2] * m[1][2];
1004 double lenZ = m[2][0] * m[2][0] + m[2][1] * m[2][1] + m[2][2] * m[2][2];
1005 if (qFuzzyCompare(det, 1.0) && qFuzzyCompare(lenX, 1.0)
1006 && qFuzzyCompare(lenY, 1.0) && qFuzzyCompare(lenZ, 1.0))
1013#ifndef QT_NO_DEBUG_STREAM
1017 QDebugStateSaver saver(dbg);
1020 if (m.flagBits == QDoubleMatrix4x4::Identity) {
1022 }
else if (m.flagBits == QDoubleMatrix4x4::General) {
1025 if ((m.flagBits & QDoubleMatrix4x4::Translation) != 0)
1026 bits +=
"Translation,";
1027 if ((m.flagBits & QDoubleMatrix4x4::Scale) != 0)
1029 if ((m.flagBits & QDoubleMatrix4x4::Rotation2D) != 0)
1030 bits +=
"Rotation2D,";
1031 if ((m.flagBits & QDoubleMatrix4x4::Rotation) != 0)
1032 bits +=
"Rotation,";
1033 if ((m.flagBits & QDoubleMatrix4x4::Perspective) != 0)
1034 bits +=
"Perspective,";
1035 if (!bits.isEmpty())
1036 bits = bits.left(bits.size() - 1);
1040 dbg.nospace() <<
"QDoubleMatrix4x4(type:" << bits.constData() << Qt::endl
1041 << qSetFieldWidth(10)
1042 << m(0, 0) << m(0, 1) << m(0, 2) << m(0, 3) << Qt::endl
1043 << m(1, 0) << m(1, 1) << m(1, 2) << m(1, 3) << Qt::endl
1044 << m(2, 0) << m(2, 1) << m(2, 2) << m(2, 3) << Qt::endl
1045 << m(3, 0) << m(3, 1) << m(3, 2) << m(3, 3) << Qt::endl
1046 << qSetFieldWidth(0) <<
')';