File: qgsmatrix4x4.sip.in

package info (click to toggle)
qgis 3.40.11%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,183,800 kB
  • sloc: cpp: 1,595,841; python: 372,637; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,257; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 154
file content (113 lines) | stat: -rw-r--r-- 3,953 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/qgsmatrix4x4.h                                              *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/





class QgsMatrix4x4
{
%Docstring(signature="appended")
A simple 4x4 matrix implementation useful for transformation in 3D
space.

It is similar to QMatrix4x4, but working with double precision values.
Most of the time, doing transform using QMatrix4x4 is fine, however
:py:class:`QgsMatrix4x4` is useful in situations where single precision
floats are not enough. For example, when using transform matrix where
translation component has values in order of millions.

.. warning::

   Non-stable API, exposed to Python for unit testing only.

.. versionadded:: 3.34
%End

%TypeHeaderCode
#include "qgsmatrix4x4.h"
%End
  public:
    QgsMatrix4x4();
%Docstring
Initializes identity matrix
%End
    QgsMatrix4x4( double m11, double m12, double m13, double m14,
                  double m21, double m22, double m23, double m24,
                  double m31, double m32, double m33, double m34,
                  double m41, double m42, double m43, double m44 );
%Docstring
Initializes matrix by setting all values in row-major order
%End

    bool operator==( const QgsMatrix4x4 &other ) const;

    bool operator!=( const QgsMatrix4x4 &other ) const;

    QList< double > dataList() const /PyName=data,HoldGIL/;
%Docstring
Returns matrix data (in column-major order)
%End

    void translate( const QgsVector3D &vector );
%Docstring
Multiplies this matrix by another that translates coordinates by the
components of a ``vector``.
%End

    QgsVector3D map( const QgsVector3D &vector ) const /HoldGIL/;
%Docstring
Matrix-vector multiplication (vector is converted to homogeneous
coordinates [X,Y,Z,1] and back)
%End

    bool isIdentity() const /HoldGIL/;
%Docstring
Returns whether this matrix is an identity matrix
%End
    void setToIdentity() /HoldGIL/;
%Docstring
Sets matrix to be identity matrix
%End

    SIP_PYOBJECT __repr__();
%MethodCode
    QString str = QStringLiteral( "<QgsMatrix4x4(%1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14, %15, %16)>" )
                  .arg( sipCpp->data()[0] )
                  .arg( sipCpp->data()[4] )
                  .arg( sipCpp->data()[8] )
                  .arg( sipCpp->data()[12] )
                  .arg( sipCpp->data()[1] )
                  .arg( sipCpp->data()[5] )
                  .arg( sipCpp->data()[9] )
                  .arg( sipCpp->data()[13] )
                  .arg( sipCpp->data()[2] )
                  .arg( sipCpp->data()[6] )
                  .arg( sipCpp->data()[10] )
                  .arg( sipCpp->data()[14] )
                  .arg( sipCpp->data()[3] )
                  .arg( sipCpp->data()[7] )
                  .arg( sipCpp->data()[11] )
                  .arg( sipCpp->data()[15] );
    sipRes = PyUnicode_FromString( str.toUtf8().constData() );
%End


};

QgsVector3D operator*( const QgsMatrix4x4 &matrix, const QgsVector3D &vector );
QgsMatrix4x4 operator*( const QgsMatrix4x4 &m1, const QgsMatrix4x4 &m2 );


/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/qgsmatrix4x4.h                                              *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/