127 inv.m[1][2] = -matrixDet2(m, 0, 1, 0, 2) * det;
129 inv.m[2][0] = matrixDet2(m, 1, 2, 0, 1) * det;
130 inv.m[2][1] = -matrixDet2(m, 0, 2, 0, 1) * det;
131 inv.m[2][2] = matrixDet2(m, 0, 1, 0, 1) * det;
133 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];
134 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];
135 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];
137 inv.flagBits = flagBits;
144 QDoubleMatrix4x4 inv(1);
146 double det = matrixDet4(m);
150 return QDoubleMatrix4x4();
154 inv.m[0][0] = matrixDet3(m, 1, 2, 3, 1, 2, 3) * det;
155 inv.m[0][1] = -matrixDet3(m, 0, 2, 3, 1, 2, 3) * det;
156 inv.m[0][2] = matrixDet3(m, 0, 1, 3, 1, 2, 3) * det;
157 inv.m[0][3] = -matrixDet3(m, 0, 1, 2, 1, 2, 3) * det;
158 inv.m[1][0] = -matrixDet3(m, 1, 2, 3, 0, 2, 3) * det;
159 inv.m[1][1] = matrixDet3(m, 0, 2, 3, 0, 2, 3) * det;
160 inv.m[1][2] = -matrixDet3(m, 0, 1, 3, 0, 2, 3) * det;
161 inv.m[1][3] = matrixDet3(m, 0, 1, 2, 0, 2, 3) * det;
162 inv.m[2][0] = matrixDet3(m, 1, 2, 3, 0, 1, 3) * det;
163 inv.m[2][1] = -matrixDet3(m, 0, 2, 3, 0, 1, 3) * det;
164 inv.m[2][2] = matrixDet3(m, 0, 1, 3, 0, 1, 3) * det;
165 inv.m[2][3] = -matrixDet3(m, 0, 1, 2, 0, 1, 3) * det;
166 inv.m[3][0] = -matrixDet3(m, 1, 2, 3, 0, 1, 2) * det;
167 inv.m[3][1] = matrixDet3(m, 0, 2, 3, 0, 1, 2) * det;
168 inv.m[3][2] = -matrixDet3(m, 0, 1, 3, 0, 1, 2) * det;
169 inv.m[3][3] = matrixDet3(m, 0, 1, 2, 0, 1, 2) * det;
170 inv.flagBits = flagBits;
177QDoubleMatrix4x4 QDoubleMatrix4x4::transposed()
const
179 QDoubleMatrix4x4 result(1);
180 for (
int row = 0; row < 4; ++row) {
181 for (
int col = 0; col < 4; ++col) {
182 result.m[col][row] = m[row][col];
186 result.flagBits = (flagBits & Translation ? General : flagBits);
190QDoubleMatrix4x4& QDoubleMatrix4x4::operator/=(
double divisor)
215 m.m[0][0] = matrix.m[0][0] / divisor;
216 m.m[0][1] = matrix.m[0][1] / divisor;
217 m.m[0][2] = matrix.m[0][2] / divisor;
218 m.m[0][3] = matrix.m[0][3] / divisor;
219 m.m[1][0] = matrix.m[1][0] / divisor;
220 m.m[1][1] = matrix.m[1][1] / divisor;
221 m.m[1][2] = matrix.m[1][2] / divisor;
222 m.m[1][3] = matrix.m[1][3] / divisor;
223 m.m[2][0] = matrix.m[2][0] / divisor;
224 m.m[2][1] = matrix.m[2][1] / divisor;
225 m.m[2][2] = matrix.m[2][2] / divisor;
226 m.m[2][3] = matrix.m[2][3] / divisor;
227 m.m[3][0] = matrix.m[3][0] / divisor;
228 m.m[3][1] = matrix.m[3][1] / divisor;
229 m.m[3][2] = matrix.m[3][2] / divisor;
230 m.m[3][3] = matrix.m[3][3] / divisor;
231 m.flagBits = QDoubleMatrix4x4::General;
235void QDoubleMatrix4x4::scale(
const QDoubleVector3D& vector)
237 double vx = vector.x();
238 double vy = vector.y();
239 double vz = vector.z();
240 if (flagBits < Scale) {
244 }
else if (flagBits < Rotation2D) {
248 }
else if (flagBits < Rotation) {
271void QDoubleMatrix4x4::scale(
double x,
double y)
273 if (flagBits < Scale) {
276 }
else if (flagBits < Rotation2D) {
279 }
else if (flagBits < Rotation) {
297void QDoubleMatrix4x4::scale(
double x,
double y,
double z)
299 if (flagBits < Scale) {
303 }
else if (flagBits < Rotation2D) {
307 }
else if (flagBits < Rotation) {
330void QDoubleMatrix4x4::scale(
double factor)
332 if (flagBits < Scale) {
336 }
else if (flagBits < Rotation2D) {
340 }
else if (flagBits < Rotation) {
363void QDoubleMatrix4x4::translate(
const QDoubleVector3D& vector)
365 double vx = vector.x();
366 double vy = vector.y();
367 double vz = vector.z();
368 if (flagBits == Identity) {
372 }
else if (flagBits == Translation) {
376 }
else if (flagBits == Scale) {
377 m[3][0] = m[0][0] * vx;
378 m[3][1] = m[1][1] * vy;
379 m[3][2] = m[2][2] * vz;
380 }
else if (flagBits == (Translation | Scale)) {
381 m[3][0] += m[0][0] * vx;
382 m[3][1] += m[1][1] * vy;
383 m[3][2] += m[2][2] * vz;
384 }
else if (flagBits < Rotation) {
385 m[3][0] += m[0][0] * vx + m[1][0] * vy;
386 m[3][1] += m[0][1] * vx + m[1][1] * vy;
387 m[3][2] += m[2][2] * vz;
389 m[3][0] += m[0][0] * vx + m[1][0] * vy + m[2][0] * vz;
390 m[3][1] += m[0][1] * vx + m[1][1] * vy + m[2][1] * vz;
391 m[3][2] += m[0][2] * vx + m[1][2] * vy + m[2][2] * vz;
392 m[3][3] += m[0][3] * vx + m[1][3] * vy + m[2][3] * vz;
394 flagBits |= Translation;
397void QDoubleMatrix4x4::translate(
double x,
double y)
399 if (flagBits == Identity) {
402 }
else if (flagBits == Translation) {
405 }
else if (flagBits == Scale) {
406 m[3][0] = m[0][0] * x;
407 m[3][1] = m[1][1] * y;
408 }
else if (flagBits == (Translation | Scale)) {
409 m[3][0] += m[0][0] * x;
410 m[3][1] += m[1][1] * y;
411 }
else if (flagBits < Rotation) {
412 m[3][0] += m[0][0] * x + m[1][0] * y;
413 m[3][1] += m[0][1] * x + m[1][1] * y;
415 m[3][0] += m[0][0] * x + m[1][0] * y;
416 m[3][1] += m[0][1] * x + m[1][1] * y;
417 m[3][2] += m[0][2] * x + m[1][2] * y;
418 m[3][3] += m[0][3] * x + m[1][3] * y;
420 flagBits |= Translation;
423void QDoubleMatrix4x4::translate(
double x,
double y,
double z)
425 if (flagBits == Identity) {
429 }
else if (flagBits == Translation) {
433 }
else if (flagBits == Scale) {
434 m[3][0] = m[0][0] * x;
435 m[3][1] = m[1][1] * y;
436 m[3][2] = m[2][2] * z;
437 }
else if (flagBits == (Translation | Scale)) {
438 m[3][0] += m[0][0] * x;
439 m[3][1] += m[1][1] * y;
440 m[3][2] += m[2][2] * z;
441 }
else if (flagBits < Rotation) {
442 m[3][0] += m[0][0] * x + m[1][0] * y;
443 m[3][1] += m[0][1] * x + m[1][1] * y;
444 m[3][2] += m[2][2] * z;
446 m[3][0] += m[0][0] * x + m[1][0] * y + m[2][0] * z;
447 m[3][1] += m[0][1] * x + m[1][1] * y + m[2][1] * z;
448 m[3][2] += m[0][2] * x + m[1][2] * y + m[2][2] * z;
449 m[3][3] += m[0][3] * x + m[1][3] * y + m[2][3] * z;
451 flagBits |= Translation;
454void QDoubleMatrix4x4::rotate(
double angle,
const QDoubleVector3D& vector)
456 rotate(angle, vector.x(), vector.y(), vector.z());
459void QDoubleMatrix4x4::rotate(
double angle,
double x,
double y,
double z)
464 if (angle == 90.0 || angle == -270.0) {
467 }
else if (angle == -90.0 || angle == 270.0) {
470 }
else if (angle == 180.0 || angle == -180.0) {
474 double a = qDegreesToRadians(angle);
485 m[0][0] = (tmp = m[0][0]) * c + m[1][0] * s;
486 m[1][0] = m[1][0] * c - tmp * s;
487 m[0][1] = (tmp = m[0][1]) * c + m[1][1] * s;
488 m[1][1] = m[1][1] * c - tmp * s;
489 m[0][2] = (tmp = m[0][2]) * c + m[1][2] * s;
490 m[1][2] = m[1][2] * c - tmp * s;
491 m[0][3] = (tmp = m[0][3]) * c + m[1][3] * s;
492 m[1][3] = m[1][3] * c - tmp * s;
494 flagBits |= Rotation2D;
497 }
else if (z == 0.0) {
502 m[2][0] = (tmp = m[2][0]) * c + m[0][0] * s;
503 m[0][0] = m[0][0] * c - tmp * s;
504 m[2][1] = (tmp = m[2][1]) * c + m[0][1] * s;
505 m[0][1] = m[0][1] * c - tmp * s;
506 m[2][2] = (tmp = m[2][2]) * c + m[0][2] * s;
507 m[0][2] = m[0][2] * c - tmp * s;
508 m[2][3] = (tmp = m[2][3]) * c + m[0][3] * s;
509 m[0][3] = m[0][3] * c - tmp * s;
511 flagBits |= Rotation;
514 }
else if (y == 0.0 && z == 0.0) {
519 m[1][0] = (tmp = m[1][0]) * c + m[2][0] * s;
520 m[2][0] = m[2][0] * c - tmp * s;
521 m[1][1] = (tmp = m[1][1]) * c + m[2][1] * s;
522 m[2][1] = m[2][1] * c - tmp * s;
523 m[1][2] = (tmp = m[1][2]) * c + m[2][2] * s;
524 m[2][2] = m[2][2] * c - tmp * s;
525 m[1][3] = (tmp = m[1][3]) * c + m[2][3] * s;
526 m[2][3] = m[2][3] * c - tmp * s;
528 flagBits |= Rotation;
532 double len =
double(x) *
double(x) +
533 double(y) *
double(y) +
534 double(z) *
double(z);
535 if (!qFuzzyCompare(len, 1.0) && !qFuzzyIsNull(len)) {
536 len = std::sqrt(len);
537 x =
double(
double(x) / len);
538 y =
double(
double(y) / len);
539 z =
double(
double(z) / len);
542 QDoubleMatrix4x4 rot(1);
543 rot.m[0][0] = x * x * ic + c;
544 rot.m[1][0] = x * y * ic - z * s;
545 rot.m[2][0] = x * z * ic + y * s;
547 rot.m[0][1] = y * x * ic + z * s;
548 rot.m[1][1] = y * y * ic + c;
549 rot.m[2][1] = y * z * ic - x * s;
551 rot.m[0][2] = x * z * ic - y * s;
552 rot.m[1][2] = y * z * ic + x * s;
553 rot.m[2][2] = z * z * ic + c;
559 rot.flagBits = Rotation;
563void QDoubleMatrix4x4::projectedRotate(
double angle,
double x,
double y,
double z,
564 double distanceToPlane)
568 if (qIsNull(distanceToPlane))
569 return rotate(angle, x, y, z);
573 if (angle == 90.0 || angle == -270.0) {
576 }
else if (angle == -90.0 || angle == 270.0) {
579 }
else if (angle == 180.0 || angle == -180.0) {
583 double a = qDegreesToRadians(angle);
588 const double d = 1.0 / distanceToPlane;
596 m[0][0] = (tmp = m[0][0]) * c + m[1][0] * s;
597 m[1][0] = m[1][0] * c - tmp * s;
598 m[0][1] = (tmp = m[0][1]) * c + m[1][1] * s;
599 m[1][1] = m[1][1] * c - tmp * s;
600 m[0][2] = (tmp = m[0][2]) * c + m[1][2] * s;
601 m[1][2] = m[1][2] * c - tmp * s;
602 m[0][3] = (tmp = m[0][3]) * c + m[1][3] * s;
603 m[1][3] = m[1][3] * c - tmp * s;
605 flagBits |= Rotation2D;
608 }
else if (z == 0.0) {
613 m[0][0] = m[0][0] * c + m[3][0] * s;
614 m[0][1] = m[0][1] * c + m[3][1] * s;
615 m[0][2] = m[0][2] * c + m[3][2] * s;
616 m[0][3] = m[0][3] * c + m[3][3] * s;
620 }
else if (y == 0.0 && z == 0.0) {
625 m[1][0] = m[1][0] * c - m[3][0] * s;
626 m[1][1] = m[1][1] * c - m[3][1] * s;
627 m[1][2] = m[1][2] * c - m[3][2] * s;
628 m[1][3] = m[1][3] * c - m[3][3] * s;
632 double len =
double(x) *
double(x) +
633 double(y) *
double(y) +
634 double(z) *
double(z);
635 if (!qFuzzyCompare(len, 1.0) && !qFuzzyIsNull(len)) {
636 len = std::sqrt(len);
637 x =
double(
double(x) / len);
638 y =
double(
double(y) / len);
639 z =
double(
double(z) / len);
642 QDoubleMatrix4x4 rot(1);
643 rot.m[0][0] = x * x * ic + c;
644 rot.m[1][0] = x * y * ic - z * s;
647 rot.m[0][1] = y * x * ic + z * s;
648 rot.m[1][1] = y * y * ic + c;
655 rot.m[0][3] = (x * z * ic - y * s) * -d;
656 rot.m[1][3] = (y * z * ic + x * s) * -d;
659 rot.flagBits = General;
663void QDoubleMatrix4x4::ortho(
const QRect& rect)
669 ortho(rect.x(), rect.x() + rect.width(), rect.y() + rect.height(), rect.y(), -1.0, 1.0);
672void QDoubleMatrix4x4::ortho(
const QRectF& rect)
674 ortho(rect.left(), rect.right(), rect.bottom(), rect.top(), -1.0, 1.0);
677void QDoubleMatrix4x4::ortho(
double left,
double right,
double bottom,
double top,
double nearPlane,
double farPlane)
680 if (left == right || bottom == top || nearPlane == farPlane)
684 double width = right - left;
685 double invheight = top - bottom;
686 double clip = farPlane - nearPlane;
687 QDoubleMatrix4x4 m(1);
688 m.m[0][0] = 2.0 / width;
691 m.m[3][0] = -(left + right) / width;
693 m.m[1][1] = 2.0 / invheight;
695 m.m[3][1] = -(top + bottom) / invheight;
698 m.m[2][2] = -2.0 / clip;
699 m.m[3][2] = -(nearPlane + farPlane) / clip;
704 m.flagBits = Translation | Scale;
710void QDoubleMatrix4x4::frustum(
double left,
double right,
double bottom,
double top,
double nearPlane,
double farPlane)
713 if (left == right || bottom == top || nearPlane == farPlane)
717 QDoubleMatrix4x4 m(1);
718 double width = right - left;
719 double invheight = top - bottom;
720 double clip = farPlane - nearPlane;
721 m.m[0][0] = 2.0 * nearPlane / width;
723 m.m[2][0] = (left + right) / width;
726 m.m[1][1] = 2.0 * nearPlane / invheight;
727 m.m[2][1] = (top + bottom) / invheight;
731 m.m[2][2] = -(nearPlane + farPlane) / clip;
732 m.m[3][2] = -2.0 * nearPlane * farPlane / clip;
737 m.flagBits = General;
743void QDoubleMatrix4x4::perspective(
double verticalAngle,
double aspectRatio,
double nearPlane,
double farPlane)
746 if (nearPlane == farPlane || aspectRatio == 0.0)
750 QDoubleMatrix4x4 m(1);
751 double radians = qDegreesToRadians(verticalAngle / 2.0);
752 double sine = std::sin(radians);
755 double cotan = std::cos(radians) / sine;
756 double clip = farPlane - nearPlane;
757 m.m[0][0] = cotan / aspectRatio;
767 m.m[2][2] = -(nearPlane + farPlane) / clip;
768 m.m[3][2] = -(2.0 * nearPlane * farPlane) / clip;
773 m.flagBits = General;
779void QDoubleMatrix4x4::lookAt(
const QDoubleVector3D& eye,
const QDoubleVector3D& center,
const QDoubleVector3D& up)
781 QDoubleVector3D forward = center - eye;
782 if (qFuzzyIsNull(forward.x()) && qFuzzyIsNull(forward.y()) && qFuzzyIsNull(forward.z()))
786 QDoubleVector3D side = QDoubleVector3D::crossProduct(forward, up).normalized();
787 QDoubleVector3D upVector = QDoubleVector3D::crossProduct(side, forward);
789 QDoubleMatrix4x4 m(1);
790 m.m[0][0] = side.x();
791 m.m[1][0] = side.y();
792 m.m[2][0] = side.z();
794 m.m[0][1] = upVector.x();
795 m.m[1][1] = upVector.y();
796 m.m[2][1] = upVector.z();
798 m.m[0][2] = -forward.x();
799 m.m[1][2] = -forward.y();
800 m.m[2][2] = -forward.z();
806 m.flagBits = Rotation;
812void QDoubleMatrix4x4::viewport(
double left,
double bottom,
double width,
double height,
double nearPlane,
double farPlane)
814 const double w2 = width / 2.0;
815 const double h2 = height / 2.0;
817 QDoubleMatrix4x4 m(1);
821 m.m[3][0] = left + w2;
825 m.m[3][1] = bottom + h2;
828 m.m[2][2] = (farPlane - nearPlane) / 2.0;
829 m.m[3][2] = (nearPlane + farPlane) / 2.0;
834 m.flagBits = General;
839void QDoubleMatrix4x4::flipCoordinates()
844 if (flagBits < Rotation2D) {
861void QDoubleMatrix4x4::copyDataTo(
double *values)
const
863 for (
int row = 0; row < 4; ++row)
864 for (
int col = 0; col < 4; ++col)
865 values[row * 4 + col] =
double(m[col][row]);
868QRect QDoubleMatrix4x4::mapRect(
const QRect& rect)
const
870 if (flagBits < Scale) {
872 return QRect(qRound(rect.x() + m[3][0]),
873 qRound(rect.y() + m[3][1]),
874 rect.width(), rect.height());
875 }
else if (flagBits < Rotation2D) {
877 double x = rect.x() * m[0][0] + m[3][0];
878 double y = rect.y() * m[1][1] + m[3][1];
879 double w = rect.width() * m[0][0];
880 double h = rect.height() * m[1][1];
889 return QRect(qRound(x), qRound(y), qRound(w), qRound(h));
892 QPoint tl = map(rect.topLeft());
893 QPoint tr = map(QPoint(rect.x() + rect.width(), rect.y()));
894 QPoint bl = map(QPoint(rect.x(), rect.y() + rect.height()));
895 QPoint br = map(QPoint(rect.x() + rect.width(),
896 rect.y() + rect.height()));
898 int xmin = qMin(qMin(tl.x(), tr.x()), qMin(bl.x(), br.x()));
899 int xmax = qMax(qMax(tl.x(), tr.x()), qMax(bl.x(), br.x()));
900 int ymin = qMin(qMin(tl.y(), tr.y()), qMin(bl.y(), br.y()));
901 int ymax = qMax(qMax(tl.y(), tr.y()), qMax(bl.y(), br.y()));
903 return QRect(xmin, ymin, xmax - xmin, ymax - ymin);
906QRectF QDoubleMatrix4x4::mapRect(
const QRectF& rect)
const
908 if (flagBits < Scale) {
910 return rect.translated(m[3][0], m[3][1]);
911 }
else if (flagBits < Rotation2D) {
913 double x = rect.x() * m[0][0] + m[3][0];
914 double y = rect.y() * m[1][1] + m[3][1];
915 double w = rect.width() * m[0][0];
916 double h = rect.height() * m[1][1];
925 return QRectF(x, y, w, h);
928 QPointF tl = map(rect.topLeft()); QPointF tr = map(rect.topRight());
929 QPointF bl = map(rect.bottomLeft()); QPointF br = map(rect.bottomRight());
931 double xmin = qMin(qMin(tl.x(), tr.x()), qMin(bl.x(), br.x()));
932 double xmax = qMax(qMax(tl.x(), tr.x()), qMax(bl.x(), br.x()));
933 double ymin = qMin(qMin(tl.y(), tr.y()), qMin(bl.y(), br.y()));
934 double ymax = qMax(qMax(tl.y(), tr.y()), qMax(bl.y(), br.y()));
936 return QRectF(QPointF(xmin, ymin), QPointF(xmax, ymax));
939QDoubleMatrix4x4 QDoubleMatrix4x4::orthonormalInverse()
const
941 QDoubleMatrix4x4 result(1);
943 result.m[0][0] = m[0][0];
944 result.m[1][0] = m[0][1];
945 result.m[2][0] = m[0][2];
947 result.m[0][1] = m[1][0];
948 result.m[1][1] = m[1][1];
949 result.m[2][1] = m[1][2];
951 result.m[0][2] = m[2][0];
952 result.m[1][2] = m[2][1];
953 result.m[2][2] = m[2][2];
955 result.m[0][3] = 0.0;
956 result.m[1][3] = 0.0;
957 result.m[2][3] = 0.0;
959 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]);
960 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]);
961 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]);
962 result.m[3][3] = 1.0;
964 result.flagBits = flagBits;
969void QDoubleMatrix4x4::optimize()
973 if (m[0][3] != 0 || m[1][3] != 0 || m[2][3] != 0 || m[3][3] != 1)
976 flagBits &= ~Perspective;
979 if (m[3][0] == 0 && m[3][1] == 0 && m[3][2] == 0)
980 flagBits &= ~Translation;
983 if (!m[0][2] && !m[1][2] && !m[2][0] && !m[2][1]) {
984 flagBits &= ~Rotation;
986 if (!m[0][1] && !m[1][0]) {
987 flagBits &= ~Rotation2D;
989 if (m[0][0] == 1 && m[1][1] == 1 && m[2][2] == 1)
993 double det = matrixDet2(m, 0, 1, 0, 1);
994 double lenX = m[0][0] * m[0][0] + m[0][1] * m[0][1];
995 double lenY = m[1][0] * m[1][0] + m[1][1] * m[1][1];
996 double lenZ = m[2][2];
997 if (qFuzzyCompare(det, 1.0) && qFuzzyCompare(lenX, 1.0)
998 && qFuzzyCompare(lenY, 1.0) && qFuzzyCompare(lenZ, 1.0))
1005 double det = matrixDet3(m, 0, 1, 2, 0, 1, 2);
1006 double lenX = m[0][0] * m[0][0] + m[0][1] * m[0][1] + m[0][2] * m[0][2];
1007 double lenY = m[1][0] * m[1][0] + m[1][1] * m[1][1] + m[1][2] * m[1][2];
1008 double lenZ = m[2][0] * m[2][0] + m[2][1] * m[2][1] + m[2][2] * m[2][2];
1009 if (qFuzzyCompare(det, 1.0) && qFuzzyCompare(lenX, 1.0)
1010 && qFuzzyCompare(lenY, 1.0) && qFuzzyCompare(lenZ, 1.0))
1017#ifndef QT_NO_DEBUG_STREAM
1021 QDebugStateSaver saver(dbg);
1024 if (m.flagBits == QDoubleMatrix4x4::Identity) {
1026 }
else if (m.flagBits == QDoubleMatrix4x4::General) {
1029 if ((m.flagBits & QDoubleMatrix4x4::Translation) != 0)
1030 bits +=
"Translation,";
1031 if ((m.flagBits & QDoubleMatrix4x4::Scale) != 0)
1033 if ((m.flagBits & QDoubleMatrix4x4::Rotation2D) != 0)
1034 bits +=
"Rotation2D,";
1035 if ((m.flagBits & QDoubleMatrix4x4::Rotation) != 0)
1036 bits +=
"Rotation,";
1037 if ((m.flagBits & QDoubleMatrix4x4::Perspective) != 0)
1038 bits +=
"Perspective,";
1039 if (!bits.isEmpty())
1040 bits = bits.left(bits.size() - 1);
1044 dbg.nospace() <<
"QDoubleMatrix4x4(type:" << bits.constData() << Qt::endl
1045 << qSetFieldWidth(10)
1046 << m(0, 0) << m(0, 1) << m(0, 2) << m(0, 3) << Qt::endl
1047 << m(1, 0) << m(1, 1) << m(1, 2) << m(1, 3) << Qt::endl
1048 << m(2, 0) << m(2, 1) << m(2, 2) << m(2, 3) << Qt::endl
1049 << m(3, 0) << m(3, 1) << m(3, 2) << m(3, 3) << Qt::endl
1050 << qSetFieldWidth(0) <<
')';