4#ifndef QSGTRANSFORM_P_H
5#define QSGTRANSFORM_P_H
18#include <QSharedPointer>
20#include <QtQuick/qtquickexports.h>
33 m_invertedPtr.clear();
38 return m_matrixPtr ? *m_matrixPtr : m_identity;
48 return m_matrixPtr ? (
other == *m_matrixPtr) :
other.isIdentity();
53 return !(*
this ==
other);
58 return (m_matrixPtr ==
other.m_matrixPtr)
59 || (m_matrixPtr &&
other.m_matrixPtr && *m_matrixPtr == *
other.m_matrixPtr);
64 return !(*
this ==
other);
70 if (m_matrixPtr !=
other.m_matrixPtr) {
71 if (m_matrixPtr.isNull()) {
73 }
else if (
other.m_matrixPtr.isNull()) {
76 const float *ptr1 = m_matrixPtr->constData();
77 const float *ptr2 =
other.m_matrixPtr->constData();
78 for (
int i = 0;
i < 16 && !diff;
i++) {
79 float d = ptr1[
i] - ptr2[
i];
81 diff = (
d > 0) ? 1 : -1;
91 return m_identity.constData();
94 return m_invertedPtr->constData();
99 QSharedPointer<QMatrix4x4> m_matrixPtr;
100 mutable QSharedPointer<QMatrix4x4> m_invertedPtr;
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
static QSharedPointer create(Args &&...arguments)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Combined button and popup list for selecting options.