43 #include <QtCore/qmath.h> 44 #include <QtCore/qvariant.h> 45 #include <QtGui/qmatrix.h> 46 #include <QtGui/qtransform.h> 50 #ifndef QT_NO_MATRIX4X4 90 for (
int col = 0; col < 4; ++col)
91 m[col][
row] = values[
row * 4 + col];
177 for (
int col = 0; col < 4; ++col) {
179 if (col < cols &&
row < rows)
180 m[col][
row] = values[col * rows +
row];
203 m[0][0] = matrix.
m11();
204 m[0][1] = matrix.
m12();
207 m[1][0] = matrix.
m21();
208 m[1][1] = matrix.
m22();
215 m[3][0] = matrix.
dx();
216 m[3][1] = matrix.
dy();
235 m[0][0] = transform.
m11();
236 m[0][1] = transform.
m12();
238 m[0][3] = transform.
m13();
239 m[1][0] = transform.
m21();
240 m[1][1] = transform.
m22();
242 m[1][3] = transform.
m23();
247 m[3][0] = transform.
dx();
248 m[3][1] = transform.
dy();
250 m[3][3] = transform.
m33();
363 (
const qreal m[4][4],
int col0,
int col1,
int col2,
364 int row0,
int row1,
int row2)
366 return m[col0][row0] *
367 (m[col1][row1] * m[col2][row2] -
368 m[col1][row2] * m[col2][row1]) -
370 (m[col0][row1] * m[col2][row2] -
371 m[col0][row2] * m[col2][row1]) +
373 (m[col0][row1] * m[col1][row2] -
374 m[col0][row2] * m[col1][row1]);
381 det = m[0][0] *
matrixDet3(m, 1, 2, 3, 1, 2, 3);
382 det -= m[1][0] *
matrixDet3(m, 0, 2, 3, 1, 2, 3);
383 det += m[2][0] *
matrixDet3(m, 0, 1, 3, 1, 2, 3);
384 det -= m[3][0] *
matrixDet3(m, 0, 1, 2, 1, 2, 3);
417 inv.
m[3][0] = -m[3][0];
418 inv.
m[3][1] = -m[3][1];
419 inv.
m[3][2] = -m[3][2];
440 inv.
m[0][0] =
matrixDet3(m, 1, 2, 3, 1, 2, 3) * det;
441 inv.
m[0][1] = -
matrixDet3(m, 0, 2, 3, 1, 2, 3) * det;
442 inv.
m[0][2] =
matrixDet3(m, 0, 1, 3, 1, 2, 3) * det;
443 inv.
m[0][3] = -
matrixDet3(m, 0, 1, 2, 1, 2, 3) * det;
444 inv.
m[1][0] = -
matrixDet3(m, 1, 2, 3, 0, 2, 3) * det;
445 inv.
m[1][1] =
matrixDet3(m, 0, 2, 3, 0, 2, 3) * det;
446 inv.
m[1][2] = -
matrixDet3(m, 0, 1, 3, 0, 2, 3) * det;
447 inv.
m[1][3] =
matrixDet3(m, 0, 1, 2, 0, 2, 3) * det;
448 inv.
m[2][0] =
matrixDet3(m, 1, 2, 3, 0, 1, 3) * det;
449 inv.
m[2][1] = -
matrixDet3(m, 0, 2, 3, 0, 1, 3) * det;
450 inv.
m[2][2] =
matrixDet3(m, 0, 1, 3, 0, 1, 3) * det;
451 inv.
m[2][3] = -
matrixDet3(m, 0, 1, 2, 0, 1, 3) * det;
452 inv.
m[3][0] = -
matrixDet3(m, 1, 2, 3, 0, 1, 2) * det;
453 inv.
m[3][1] =
matrixDet3(m, 0, 2, 3, 0, 1, 2) * det;
454 inv.
m[3][2] = -
matrixDet3(m, 0, 1, 3, 0, 1, 2) * det;
455 inv.
m[3][3] =
matrixDet3(m, 0, 1, 2, 0, 1, 2) * det;
478 if (m[0][0] == 0.0f || m[1][1] == 0.0f || m[2][2] == 0.0f)
480 inv.
data()[0] = 1.0f / m[0][0];
481 inv.
data()[4] = 1.0f / m[1][1];
482 inv.
data()[8] = 1.0f / m[2][2];
494 invm[0 + 0 * 3] = (m[1][1] * m[2][2] - m[2][1] * m[1][2]) * det;
495 invm[1 + 0 * 3] = -(m[1][0] * m[2][2] - m[1][2] * m[2][0]) * det;
496 invm[2 + 0 * 3] = (m[1][0] * m[2][1] - m[1][1] * m[2][0]) * det;
497 invm[0 + 1 * 3] = -(m[0][1] * m[2][2] - m[2][1] * m[0][2]) * det;
498 invm[1 + 1 * 3] = (m[0][0] * m[2][2] - m[0][2] * m[2][0]) * det;
499 invm[2 + 1 * 3] = -(m[0][0] * m[2][1] - m[0][1] * m[2][0]) * det;
500 invm[0 + 2 * 3] = (m[0][1] * m[1][2] - m[0][2] * m[1][1]) * det;
501 invm[1 + 2 * 3] = -(m[0][0] * m[1][2] - m[0][2] * m[1][0]) * det;
502 invm[2 + 2 * 3] = (m[0][0] * m[1][1] - m[1][0] * m[0][1]) * det;
514 for (
int col = 0; col < 4; ++col) {
515 result.
m[col][
row] = m[
row][col];
629 #ifndef QT_NO_VECTOR3D 649 #ifndef QT_NO_VECTOR4D 737 m.
m[0][0] = matrix.
m[0][0] / divisor;
738 m.
m[0][1] = matrix.
m[0][1] / divisor;
739 m.
m[0][2] = matrix.
m[0][2] / divisor;
740 m.
m[0][3] = matrix.
m[0][3] / divisor;
741 m.
m[1][0] = matrix.
m[1][0] / divisor;
742 m.
m[1][1] = matrix.
m[1][1] / divisor;
743 m.
m[1][2] = matrix.
m[1][2] / divisor;
744 m.
m[1][3] = matrix.
m[1][3] / divisor;
745 m.
m[2][0] = matrix.
m[2][0] / divisor;
746 m.
m[2][1] = matrix.
m[2][1] / divisor;
747 m.
m[2][2] = matrix.
m[2][2] / divisor;
748 m.
m[2][3] = matrix.
m[2][3] / divisor;
749 m.
m[3][0] = matrix.
m[3][0] / divisor;
750 m.
m[3][1] = matrix.
m[3][1] / divisor;
751 m.
m[3][2] = matrix.
m[3][2] / divisor;
752 m.
m[3][3] = matrix.
m[3][3] / divisor;
767 #ifndef QT_NO_VECTOR3D 937 #ifndef QT_NO_VECTOR3D 959 m[3][0] = m[0][0] * vx;
960 m[3][1] = m[1][1] * vy;
961 m[3][2] = m[2][2] * vz;
964 m[3][0] += m[0][0] * vx;
965 m[3][1] += m[1][1] * vy;
966 m[3][2] += m[2][2] * vz;
968 m[3][0] += m[0][0] * vx + m[1][0] * vy + m[2][0] * vz;
969 m[3][1] += m[0][1] * vx + m[1][1] * vy + m[2][1] * vz;
970 m[3][2] += m[0][2] * vx + m[1][2] * vy + m[2][2] * vz;
971 m[3][3] += m[0][3] * vx + m[1][3] * vy + m[2][3] * vz;
1002 m[3][0] = m[0][0] * x;
1003 m[3][1] = m[1][1] * y;
1007 m[3][0] += m[0][0] * x;
1008 m[3][1] += m[1][1] * y;
1010 m[3][0] += m[0][0] * x + m[1][0] * y;
1011 m[3][1] += m[0][1] * x + m[1][1] * y;
1012 m[3][2] += m[0][2] * x + m[1][2] * y;
1013 m[3][3] += m[0][3] * x + m[1][3] * y;
1044 m[3][0] = m[0][0] * x;
1045 m[3][1] = m[1][1] * y;
1046 m[3][2] = m[2][2] * z;
1049 m[3][0] += m[0][0] * x;
1050 m[3][1] += m[1][1] * y;
1051 m[3][2] += m[2][2] * z;
1053 m[3][0] += m[0][0] * x + m[1][0] * y + m[2][0] * z;
1054 m[3][1] += m[0][1] * x + m[1][1] * y + m[2][1] * z;
1055 m[3][2] += m[0][2] * x + m[1][2] * y + m[2][2] * z;
1056 m[3][3] += m[0][3] * x + m[1][3] * y + m[2][3] * z;
1064 #ifndef QT_NO_VECTOR3D 1074 rotate(angle, vector.
x(), vector.
y(), vector.
z());
1096 if (angle == 90.0f || angle == -270.0f) {
1099 }
else if (angle == -90.0f || angle == 270.0f) {
1102 }
else if (angle == 180.0f || angle == -180.0f) {
1128 }
else if (z == 0.0f) {
1143 }
else if (y == 0.0f && z == 0.0f) {
1159 qreal len = x * x + y * y + z * z;
1167 m.
m[0][0] = x * x * ic +
c;
1168 m.
m[1][0] = x * y * ic - z * s;
1169 m.
m[2][0] = x * z * ic + y * s;
1171 m.
m[0][1] = y * x * ic + z * s;
1172 m.
m[1][1] = y * y * ic +
c;
1173 m.
m[2][1] = y * z * ic - x * s;
1175 m.
m[0][2] = x * z * ic - y * s;
1176 m.
m[1][2] = y * z * ic + x * s;
1177 m.
m[2][2] = z * z * ic +
c;
1203 if (angle == 90.0f || angle == -270.0f) {
1206 }
else if (angle == -90.0f || angle == 270.0f) {
1209 }
else if (angle == 180.0f || angle == -180.0f) {
1235 }
else if (z == 0.0f) {
1248 }
else if (y == 0.0f && z == 0.0f) {
1262 qreal len = x * x + y * y + z * z;
1270 m.
m[0][0] = x * x * ic +
c;
1271 m.
m[1][0] = x * y * ic - z * s;
1274 m.
m[0][1] = y * x * ic + z * s;
1275 m.
m[1][1] = y * y * ic +
c;
1295 #ifndef QT_NO_QUATERNION 1309 qreal xx = quaternion.
x() * quaternion.
x();
1310 qreal xy = quaternion.
x() * quaternion.
y();
1311 qreal xz = quaternion.
x() * quaternion.
z();
1313 qreal yy = quaternion.
y() * quaternion.
y();
1314 qreal yz = quaternion.
y() * quaternion.
z();
1316 qreal zz = quaternion.
z() * quaternion.
z();
1318 m.
m[0][0] = 1.0f - 2 * (yy + zz);
1319 m.
m[1][0] = 2 * (xy - zw);
1320 m.
m[2][0] = 2 * (xz + yw);
1322 m.
m[0][1] = 2 * (xy + zw);
1323 m.
m[1][1] = 1.0f - 2 * (xx + zz);
1324 m.
m[2][1] = 2 * (yz - xw);
1326 m.
m[0][2] = 2 * (xz - yw);
1327 m.
m[1][2] = 2 * (yz + xw);
1328 m.
m[2][2] = 1.0f - 2 * (xx + yy);
1393 if (left == right || bottom == top || nearPlane == farPlane)
1398 qreal invheight = top - bottom;
1399 qreal clip = farPlane - nearPlane;
1400 #ifndef QT_NO_VECTOR3D 1401 if (clip == 2.0f && (nearPlane + farPlane) == 0.0f) {
1406 (-(left + right) / width,
1407 -(top + bottom) / invheight,
1417 m.
m[0][0] = 2.0f / width;
1420 m.
m[3][0] = -(left +
right) / width;
1422 m.
m[1][1] = 2.0f / invheight;
1424 m.
m[3][1] = -(top + bottom) / invheight;
1427 m.
m[2][2] = -2.0f / clip;
1428 m.
m[3][2] = -(nearPlane + farPlane) / clip;
1450 if (left == right || bottom == top || nearPlane == farPlane)
1456 qreal invheight = top - bottom;
1457 qreal clip = farPlane - nearPlane;
1458 m.
m[0][0] = 2.0f * nearPlane / width;
1460 m.
m[2][0] = (left +
right) / width;
1463 m.
m[1][1] = 2.0f * nearPlane / invheight;
1464 m.
m[2][1] = (top + bottom) / invheight;
1468 m.
m[2][2] = -(nearPlane + farPlane) / clip;
1469 m.
m[3][2] = -2.0f * nearPlane * farPlane / clip;
1490 if (nearPlane == farPlane || aspect == 0.0f)
1495 qreal radians = (angle / 2.0f) *
M_PI / 180.0f;
1500 qreal clip = farPlane - nearPlane;
1501 m.
m[0][0] = cotan / aspect;
1511 m.
m[2][2] = -(nearPlane + farPlane) / clip;
1512 m.
m[3][2] = -(2.0f * nearPlane * farPlane) / clip;
1522 #ifndef QT_NO_VECTOR3D 1532 QVector3D forward = (center - eye).normalized();
1538 m.
m[0][0] = side.
x();
1539 m.
m[1][0] = side.
y();
1540 m.
m[2][0] = side.
z();
1542 m.
m[0][1] = upVector.
x();
1543 m.
m[1][1] = upVector.
y();
1544 m.
m[2][1] = upVector.
z();
1546 m.
m[0][2] = -forward.
x();
1547 m.
m[1][2] = -forward.
y();
1548 m.
m[2][2] = -forward.
z();
1602 for (
int col = 0; col < 4; ++col)
1615 return QMatrix(m[0][0], m[0][1],
1634 m[1][0], m[1][1], m[1][3],
1635 m[3][0], m[3][1], m[3][3]);
1657 if (distanceToPlane == 1024.0f) {
1662 m[1][3] - m[1][2] * inv_dist_to_plane,
1664 m[3][3] - m[3][2] * inv_dist_to_plane);
1665 }
else if (distanceToPlane != 0.0f) {
1673 qreal d = 1.0f / distanceToPlane;
1674 return QTransform(m[0][0], m[0][1], m[0][3] - m[0][2] * d,
1675 m[1][0], m[1][1], m[1][3] - m[1][2] * d,
1676 m[3][0], m[3][1], m[3][3] - m[3][2] * d);
1680 m[1][0], m[1][1], m[1][3],
1681 m[3][0], m[3][1], m[3][3]);
1707 #ifndef QT_NO_VECTOR3D 1735 #ifndef QT_NO_VECTOR4D 1761 qreal x = rect.
x() * m[0][0] + m[3][0];
1762 qreal y = rect.
y() * m[1][1] + m[3][1];
1791 return QRect(xmin, ymin, xmax - xmin, ymax - ymin);
1805 qreal x = rect.
x() * m[0][0] + m[3][0];
1806 qreal y = rect.
y() * m[1][1] + m[3][1];
1817 return QRectF(x, y, w, h);
1863 result.
m[0][0] = m[0][0];
1864 result.
m[1][0] = m[0][1];
1865 result.
m[2][0] = m[0][2];
1867 result.
m[0][1] = m[1][0];
1868 result.
m[1][1] = m[1][1];
1869 result.
m[2][1] = m[1][2];
1871 result.
m[0][2] = m[2][0];
1872 result.
m[1][2] = m[2][1];
1873 result.
m[2][2] = m[2][2];
1875 result.
m[0][3] = 0.0f;
1876 result.
m[1][3] = 0.0f;
1877 result.
m[2][3] = 0.0f;
1879 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]);
1880 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]);
1881 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]);
1882 result.
m[3][3] = 1.0f;
1910 if (m[3][3] != 1.0f) {
1918 if (m[1][0] != 0.0f || m[2][0] != 0.0f || m[2][1] != 0.0f) {
1922 if (m[0][1] != 0.0f || m[0][2] != 0.0f || m[0][3] != 0.0f ||
1923 m[1][2] != 0.0f || m[1][3] != 0.0f || m[2][3] != 0.0f) {
1929 bool identityAlongDiagonal
1930 = (m[0][0] == 1.0f && m[1][1] == 1.0f && m[2][2] == 1.0f);
1931 bool translationPresent
1932 = (m[3][0] != 0.0f || m[3][1] != 0.0f || m[3][2] != 0.0f);
1935 if (translationPresent && identityAlongDiagonal)
1937 else if (translationPresent)
1939 else if (identityAlongDiagonal)
1953 #ifndef QT_NO_DEBUG_STREAM 1960 bits +=
"Identity,";
1964 bits +=
"Translation,";
1968 bits +=
"Rotation,";
1969 if (bits.
size() > 0)
1975 <<
m(0, 0) <<
m(0, 1) <<
m(0, 2) <<
m(0, 3) <<
endl 1976 <<
m(1, 0) <<
m(1, 1) <<
m(1, 2) <<
m(1, 3) <<
endl 1977 <<
m(2, 0) <<
m(2, 1) <<
m(2, 2) <<
m(2, 3) <<
endl 1978 <<
m(3, 0) <<
m(3, 1) <<
m(3, 2) <<
m(3, 3) <<
endl 1985 #ifndef QT_NO_DATASTREAM 2003 for (
int col = 0; col < 4; ++col)
2004 stream <<
double(matrix(
row, col));
2025 for (
int col = 0; col < 4; ++col) {
2034 #endif // QT_NO_DATASTREAM 2036 #endif // QT_NO_MATRIX4X4 The QVariant class acts like a union for the most common Qt data types.
void translate(const QVector3D &vector)
Multiplies this matrix by another that translates coordinates by the components of vector...
The QDebug class provides an output stream for debugging information.
QPointF bottomRight() const
Returns the position of the rectangle's bottom-right corner.
T * data()
Returns a pointer to the raw data of this matrix.
QMatrix toAffine() const
Returns the conventional Qt 2D affine transformation matrix that corresponds to this matrix...
friend Q_GUI_EXPORT QMatrix4x4 operator/(const QMatrix4x4 &matrix, qreal divisor)
Returns the result of dividing all elements of matrix by divisor.
qreal y() const
Returns the y-coordinate of the rectangle's top edge.
qreal right() const
Returns the x-coordinate of the rectangle's right edge.
The QVector3D class represents a vector or vertex in 3D space.
qreal determinant() const
Returns the determinant of this matrix.
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
qreal x() const
Returns the x coordinate of this quaternion's vector.
#define QT_END_NAMESPACE
This macro expands to.
The QGenericMatrix class is a template class that represents a NxM transformation matrix with N colum...
QMatrix4x4 & operator/=(qreal divisor)
Divides all elements of this matrix by divisor.
QMatrix4x4()
Constructs an identity matrix.
The QMatrix class specifies 2D transformations of a coordinate system.
friend Q_GUI_EXPORT QDebug operator<<(QDebug dbg, const QMatrix4x4 &m)
QDebug & nospace()
Clears the stream's internal flag that records whether the last character was a space and returns a r...
The Rotation object provides a way to rotate an Item.
qreal dx() const
Returns the horizontal translation factor.
The QByteArray class provides an array of bytes.
The QPointF class defines a point in the plane using floating point precision.
qreal left() const
Returns the x-coordinate of the rectangle's left edge.
void projectedRotate(qreal angle, qreal x, qreal y, qreal z)
QMatrix4x4 orthonormalInverse() const
QPointF topLeft() const
Returns the position of the rectangle's top-left corner.
int width() const
Returns the width of the rectangle.
long ASN1_INTEGER_get ASN1_INTEGER * a
void optimize()
Optimize the usage of this matrix from its current elements.
QPointF bottomLeft() const
Returns the position of the rectangle's bottom-left corner.
qreal x() const
Returns the x coordinate of this point.
QRect mapRect(const QRect &rect) const
Maps rect by multiplying this matrix by the corners of rect and then forming a new rectangle from the...
int height() const
Returns the height of the rectangle.
qreal m12() const
Returns the vertical shearing factor.
QPoint map(const QPoint &point) const
Maps point by multiplying this matrix by point.
QMatrix4x4 transposed() const
Returns this matrix, transposed about its diagonal.
void lookAt(const QVector3D &eye, const QVector3D ¢er, const QVector3D &up)
Multiplies this matrix by another that applies an eye position transformation.
QDataStream & operator>>(QDataStream &stream, QMatrix4x4 &matrix)
Reads a 4x4 matrix from the given stream into the given matrix and returns a reference to the stream...
Q_CORE_EXPORT QTextStream & right(QTextStream &s)
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
qreal x() const
Returns the x-coordinate of this point.
static qreal matrixDet3(const qreal m[4][4], int col0, int col1, int col2, int row0, int row1, int row2)
qreal m11() const
Returns the horizontal scaling factor.
qreal scalar() const
Returns the scalar component of this quaternion.
qreal m21() const
Returns the horizontal shearing factor.
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QRectF class defines a rectangle in the plane using floating point precision. ...
qreal height() const
Returns the height of the rectangle.
void setToIdentity()
Sets this matrix to the identity.
QVector4D row(int index) const
Returns the elements of row index as a 4D vector.
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
QVector3D normalized() const
Returns the normalized unit vector form of this vector.
qreal width() const
Returns the width of the rectangle.
void flipCoordinates()
Flips between right-handed and left-handed coordinate systems by multiplying the y and z co-ordinates...
QByteArray left(int len) const
Returns a byte array that contains the leftmost len bytes of this byte array.
qreal z() const
Returns the z coordinate of this point.
QTransform toTransform() const
Returns the conventional Qt 2D transformation matrix that corresponds to this matrix.
qreal y() const
Returns the y coordinate of this quaternion's vector.
Q_CORE_EXPORT QTextStream & center(QTextStream &s)
const char * constData() const
Returns a pointer to the data stored in the byte array.
static qreal matrixDet4(const qreal m[4][4])
void copyDataTo(qreal *values) const
Retrieves the 16 items in this matrix and copies them to values in row-major order.
qreal angle(const QPointF &p1, const QPointF &p2)
The Scale element provides a way to scale an Item.
void rotate(qreal angle, const QVector3D &vector)
Multiples this matrix by another that rotates coordinates through angle degrees about vector...
QMatrix4x4 inverted(bool *invertible=0) const
Returns the inverse of this matrix.
int y() const
Returns the y-coordinate of the rectangle's top edge.
qreal x() const
Returns the x-coordinate of the rectangle's left edge.
qreal z() const
Returns the z coordinate of this quaternion's vector.
int x() const
Returns the x-coordinate of the rectangle's left edge.
void ortho(const QRect &rect)
Multiplies this matrix by another that applies an orthographic projection for a window with boundarie...
qreal dy() const
Returns the vertical translation factor.
The QPoint class defines a point in the plane using integer precision.
qreal y() const
Returns the y coordinate of this point.
The QRect class defines a rectangle in the plane using integer precision.
The QQuaternion class represents a quaternion consisting of a vector and scalar.
int size() const
Returns the number of bytes in this byte array.
void scale(const QVector3D &vector)
Multiplies this matrix by another that scales coordinates by the components of vector.
int y() const
Returns the y coordinate of this point.
QMatrix3x3 normalMatrix() const
Returns the normal matrix corresponding to this 4x4 transformation.
qreal y() const
Returns the y-coordinate of this point.
qreal top() const
Returns the y-coordinate of the rectangle's top edge.
static Q_DECL_CONSTEXPR bool qFuzzyIsNull(double d)
The QDataStream class provides serialization of binary data to a QIODevice.
int x() const
Returns the x coordinate of this point.
void perspective(qreal angle, qreal aspect, qreal nearPlane, qreal farPlane)
Multiplies this matrix by another that applies a perspective projection.
qreal bottom() const
Returns the y-coordinate of the rectangle's bottom edge.
QRectF translated(qreal dx, qreal dy) const
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis...
QPointF topRight() const
Returns the position of the rectangle's top-right corner.
QTextStreamManipulator qSetFieldWidth(int width)
QDebug & space()
Writes a space character to the debug stream and returns a reference to the stream.
Q_CORE_EXPORT QTextStream & left(QTextStream &s)
void frustum(qreal left, qreal right, qreal bottom, qreal top, qreal nearPlane, qreal farPlane)
Multiplies this matrix by another that applies a perspective frustum projection for a window with low...
static const qreal inv_dist_to_plane
Q_DECL_CONSTEXPR int qRound(qreal d)
qreal m22() const
Returns the vertical scaling factor.
QPoint topLeft() const
Returns the position of the rectangle's top-left corner.
static QVector3D crossProduct(const QVector3D &v1, const QVector3D &v2)
Returns the cross-product of vectors v1 and v2, which corresponds to the normal vector of a plane def...
Q_CORE_EXPORT QTextStream & endl(QTextStream &s)