25using namespace Qt::StringLiterals;
49 double m11,
double m12,
double m13,
double m14,
50 double m21,
double m22,
double m23,
double m24,
51 double m31,
double m32,
double m33,
double m34,
52 double m41,
double m42,
double m43,
double m44
58 const double *
data = *m;
59 const double *otherData = *( other.m );
60 for (
int i = 0; i < 16; ++i,
data++, otherData++ )
87 return *
this * vector;
108 void rotate(
double angle,
double x,
double y,
double z );
116 void rotate(
double angle, const
QgsVector3D &vector );
120 SIP_PYOBJECT __repr__();
122 QString str = u
"<QgsMatrix4x4(%1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14, %15, %16)>"_s
123 .arg( sipCpp->data()[0] )
124 .arg( sipCpp->data()[4] )
125 .arg( sipCpp->data()[8] )
126 .arg( sipCpp->data()[12] )
127 .arg( sipCpp->data()[1] )
128 .arg( sipCpp->data()[5] )
129 .arg( sipCpp->data()[9] )
130 .arg( sipCpp->data()[13] )
131 .arg( sipCpp->data()[2] )
132 .arg( sipCpp->data()[6] )
133 .arg( sipCpp->data()[10] )
134 .arg( sipCpp->data()[14] )
135 .arg( sipCpp->data()[3] )
136 .arg( sipCpp->data()[7] )
137 .arg( sipCpp->data()[11] )
138 .arg( sipCpp->data()[15] );
139 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
A simple 4x4 matrix implementation useful for transformation in 3D space.
bool operator==(const QgsMatrix4x4 &other) const
QgsMatrix4x4()
Initializes identity matrix.
void setToIdentity()
Sets matrix to be identity matrix.
QgsVector3D map(const QgsVector3D &vector) const
Matrix-vector multiplication (vector is converted to homogeneous coordinates [X,Y,...
bool operator!=(const QgsMatrix4x4 &other) const
double * data()
Returns pointer to the matrix data (stored in column-major order).
const double * constData() const
Returns pointer to the matrix data (stored in column-major order).
A 3D vector (similar to QVector3D) with the difference that it uses double precision instead of singl...
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference).
QgsMargins operator*(const QgsMargins &margins, double factor)
Returns a QgsMargins object that is formed by multiplying each component of the given margins by fact...
CORE_EXPORT QgsVector3D operator*(const QgsMatrix4x4 &matrix, const QgsVector3D &vector)
Matrix-vector multiplication (vector is converted to homogeneous coordinates [X,Y,...