Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QQuickMatrix4x4ValueType Class Reference

#include <qquickvaluetypes_p.h>

Inheritance diagram for QQuickMatrix4x4ValueType:
Collaboration diagram for QQuickMatrix4x4ValueType:

Public Member Functions

Q_INVOKABLE QQuickMatrix4x4ValueType ()=default
qreal m11 () const
qreal m12 () const
qreal m13 () const
qreal m14 () const
qreal m21 () const
qreal m22 () const
qreal m23 () const
qreal m24 () const
qreal m31 () const
qreal m32 () const
qreal m33 () const
qreal m34 () const
qreal m41 () const
qreal m42 () const
qreal m43 () const
qreal m44 () const
void setM11 (qreal value)
void setM12 (qreal value)
void setM13 (qreal value)
void setM14 (qreal value)
void setM21 (qreal value)
void setM22 (qreal value)
void setM23 (qreal value)
void setM24 (qreal value)
void setM31 (qreal value)
void setM32 (qreal value)
void setM33 (qreal value)
void setM34 (qreal value)
void setM41 (qreal value)
void setM42 (qreal value)
void setM43 (qreal value)
void setM44 (qreal value)
Q_INVOKABLE void translate (const QVector3D &t)
Q_INVOKABLE void rotate (float angle, const QVector3D &axis)
Q_INVOKABLE void rotate (const QQuaternion &q)
Q_INVOKABLE void scale (float s)
Q_INVOKABLE void scale (float sx, float sy, float sz)
Q_INVOKABLE void scale (const QVector3D &s)
Q_INVOKABLE void lookAt (const QVector3D &eye, const QVector3D &center, const QVector3D &up)
Q_INVOKABLE QMatrix4x4 times (const QMatrix4x4 &m) const
Q_INVOKABLE QVector4D times (const QVector4D &vec) const
Q_INVOKABLE QVector3D times (const QVector3D &vec) const
Q_INVOKABLE QMatrix4x4 times (qreal factor) const
Q_INVOKABLE QMatrix4x4 plus (const QMatrix4x4 &m) const
Q_INVOKABLE QMatrix4x4 minus (const QMatrix4x4 &m) const
Q_INVOKABLE QVector4D row (int n) const
Q_INVOKABLE QVector4D column (int m) const
Q_INVOKABLE qreal determinant () const
Q_INVOKABLE QMatrix4x4 inverted () const
Q_INVOKABLE QMatrix4x4 transposed () const
Q_INVOKABLE QPointF map (const QPointF p) const
Q_INVOKABLE QRectF mapRect (const QRectF r) const
Q_INVOKABLE bool fuzzyEquals (const QMatrix4x4 &m, qreal epsilon) const
Q_INVOKABLE bool fuzzyEquals (const QMatrix4x4 &m) const
Public Member Functions inherited from QMatrix4x4
 QMatrix4x4 ()
 Constructs an identity matrix.
 QMatrix4x4 (Qt::Initialization)
 QMatrix4x4 (const float *values)
 Constructs a matrix from the given 16 floating-point values.
 QMatrix4x4 (float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44)
 Constructs a matrix from the 16 elements m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, and m44.
template<int N, int M>
 QMatrix4x4 (const QGenericMatrix< N, M, float > &matrix)
 Constructs a 4x4 matrix from the left-most 4 columns and top-most 4 rows of matrix.
 QMatrix4x4 (const float *values, int cols, int rows)
 QMatrix4x4 (const QTransform &transform)
 Constructs a 4x4 matrix from the conventional Qt 2D transformation matrix transform.
const float & operator() (int row, int column) const
 Returns a constant reference to the element at position (row, column) in this matrix.
float & operator() (int row, int column)
 Returns a reference to the element at position (row, column) in this matrix so that the element can be assigned to.
QVector4D column (int index) const
 Returns the elements of column index as a 4D vector.
void setColumn (int index, const QVector4D &value)
 Sets the elements of column index to the components of value.
QVector4D row (int index) const
 Returns the elements of row index as a 4D vector.
void setRow (int index, const QVector4D &value)
 Sets the elements of row index to the components of value.
bool isAffine () const
bool isIdentity () const
 Returns true if this matrix is the identity; false otherwise.
void setToIdentity ()
 Sets this matrix to the identity.
void fill (float value)
 Fills all elements of this matrx with value.
double determinant () const
 Returns the determinant of this matrix.
QMatrix4x4 inverted (bool *invertible=nullptr) const
 Returns the inverse of this matrix.
QMatrix4x4 transposed () const
 Returns this matrix, transposed about its diagonal.
QMatrix3x3 normalMatrix () const
 Returns the normal matrix corresponding to this 4x4 transformation.
QMatrix4x4operator+= (const QMatrix4x4 &other)
 Adds the contents of other to this matrix.
QMatrix4x4operator-= (const QMatrix4x4 &other)
 Subtracts the contents of other from this matrix.
QMatrix4x4operator*= (const QMatrix4x4 &other)
 Multiplies the contents of other by this matrix.
QMatrix4x4operator*= (float factor)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Multiplies all elements of this matrix by factor.
QMatrix4x4operator/= (float divisor)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Divides all elements of this matrix by divisor.
bool operator== (const QMatrix4x4 &other) const
 Returns true if this matrix is identical to other; false otherwise.
bool operator!= (const QMatrix4x4 &other) const
 Returns true if this matrix is not identical to other; false otherwise.
void scale (const QVector3D &vector)
 Multiplies this matrix by another that scales coordinates by the components of vector.
void translate (const QVector3D &vector)
 Multiplies this matrix by another that translates coordinates by the components of vector.
void rotate (float angle, const QVector3D &vector)
 Multiples this matrix by another that rotates coordinates through angle degrees about vector.
void scale (float x, float y)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Multiplies this matrix by another that scales coordinates by the components x, and y.
void scale (float x, float y, float z)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Multiplies this matrix by another that scales coordinates by the components x, y, and z.
void scale (float factor)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Multiplies this matrix by another that scales coordinates by the given factor.
void translate (float x, float y)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Multiplies this matrix by another that translates coordinates by the components x, and y.
void translate (float x, float y, float z)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Multiplies this matrix by another that translates coordinates by the components x, y, and z.
void rotate (float angle, float x, float y, float z=0.0f)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Multiplies this matrix by another that rotates coordinates through angle degrees about the vector (x, y, z).
void rotate (const QQuaternion &quaternion)
 Multiples this matrix by another that rotates coordinates according to a specified quaternion.
void ortho (const QRect &rect)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Multiplies this matrix by another that applies an orthographic projection for a window with boundaries specified by rect.
void ortho (const QRectF &rect)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Multiplies this matrix by another that applies an orthographic projection for a window with boundaries specified by rect.
void ortho (float left, float right, float bottom, float top, float nearPlane, float farPlane)
 Multiplies this matrix by another that applies an orthographic projection for a window with lower-left corner (left, bottom), upper-right corner (right, top), and the specified nearPlane and farPlane clipping planes.
void frustum (float left, float right, float bottom, float top, float nearPlane, float farPlane)
 Multiplies this matrix by another that applies a perspective frustum projection for a window with lower-left corner (left, bottom), upper-right corner (right, top), and the specified nearPlane and farPlane clipping planes.
void perspective (float verticalAngle, float aspectRatio, float nearPlane, float farPlane)
 Multiplies this matrix by another that applies a perspective projection.
void lookAt (const QVector3D &eye, const QVector3D &center, const QVector3D &up)
 Multiplies this matrix by a viewing matrix derived from an eye point.
void viewport (const QRectF &rect)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Sets up viewport transform for viewport bounded by rect and with near and far set to 0 and 1 respectively.
void viewport (float left, float bottom, float width, float height, float nearPlane=0.0f, float farPlane=1.0f)
 Multiplies this matrix by another that performs the scale and bias transformation used by OpenGL to transform from normalized device coordinates (NDC) to viewport (window) coordinates.
void flipCoordinates ()
void copyDataTo (float *values) const
 Retrieves the 16 items in this matrix and copies them to values in row-major order.
QTransform toTransform () const
 Returns the conventional Qt 2D transformation matrix that corresponds to this matrix.
QTransform toTransform (float distanceToPlane) const
 Returns the conventional Qt 2D transformation matrix that corresponds to this matrix.
QPoint map (const QPoint &point) const
 Maps point by multiplying this matrix by point.
QPointF map (const QPointF &point) const
 Maps point by post-multiplying this matrix by point.
QVector3D map (const QVector3D &point) const
 Maps point by multiplying this matrix by point extended to a 4D vector by assuming 1.0 for the w coordinate.
QVector3D mapVector (const QVector3D &vector) const
 Maps vector by multiplying the top 3x3 portion of this matrix by vector.
QVector4D map (const QVector4D &point) const
 Maps point by multiplying this matrix by 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 results.
QRectF mapRect (const QRectF &rect) const
 Maps rect by multiplying this matrix by the corners of rect and then forming a new rectangle from the results.
template<int N, int M>
QGenericMatrix< N, M, float > toGenericMatrix () const
 Constructs a NxM generic matrix from the left-most N columns and top-most M rows of this 4x4 matrix.
float * data ()
 Returns a pointer to the raw data of this matrix.
const float * data () const
 Returns a constant pointer to the raw data of this matrix.
const float * constData () const
 Returns a constant pointer to the raw data of this matrix.
void optimize ()
 Optimize the usage of this matrix from its current elements.
 operator QVariant () const
 Returns the matrix as a QVariant.
void projectedRotate (float angle, float x, float y, float z, float distanceToPlane=1024.0)
Flags flags () const
template<int N, int M>
Q_INLINE_TEMPLATE QMatrix4x4 (const QGenericMatrix< N, M, float > &matrix)

Static Public Member Functions

static QVariant create (const QJSValue &params)

Properties

qreal m11
qreal m12
qreal m13
qreal m14
qreal m21
qreal m22
qreal m23
qreal m24
qreal m31
qreal m32
qreal m33
qreal m34
qreal m41
qreal m42
qreal m43
qreal m44

Additional Inherited Members

Public Types inherited from QMatrix4x4
enum  Flag {
  Identity = 0x0000 , Translation = 0x0001 , Scale = 0x0002 , Rotation2D = 0x0004 ,
  Rotation = 0x0008 , Perspective = 0x0010 , General = 0x001f
}

Detailed Description

Definition at line 258 of file qquickvaluetypes_p.h.

Constructor & Destructor Documentation

◆ QQuickMatrix4x4ValueType()

Q_INVOKABLE QQuickMatrix4x4ValueType::QQuickMatrix4x4ValueType ( )
default

Member Function Documentation

◆ column()

QVector4D QQuickMatrix4x4ValueType::column ( int m) const

Definition at line 742 of file qquickvaluetypes.cpp.

◆ create()

QVariant QQuickMatrix4x4ValueType::create ( const QJSValue & params)
static

Definition at line 673 of file qquickvaluetypes.cpp.

◆ determinant()

qreal QQuickMatrix4x4ValueType::determinant ( ) const

Definition at line 747 of file qquickvaluetypes.cpp.

◆ fuzzyEquals() [1/2]

bool QQuickMatrix4x4ValueType::fuzzyEquals ( const QMatrix4x4 & m) const

Definition at line 785 of file qquickvaluetypes.cpp.

◆ fuzzyEquals() [2/2]

bool QQuickMatrix4x4ValueType::fuzzyEquals ( const QMatrix4x4 & m,
qreal epsilon ) const

Definition at line 772 of file qquickvaluetypes.cpp.

◆ inverted()

QMatrix4x4 QQuickMatrix4x4ValueType::inverted ( ) const

Definition at line 752 of file qquickvaluetypes.cpp.

◆ lookAt()

Q_INVOKABLE void QQuickMatrix4x4ValueType::lookAt ( const QVector3D & eye,
const QVector3D & center,
const QVector3D & up )
inline

Definition at line 328 of file qquickvaluetypes_p.h.

◆ m11()

qreal QQuickMatrix4x4ValueType::m11 ( ) const
inline

Definition at line 288 of file qquickvaluetypes_p.h.

◆ m12()

qreal QQuickMatrix4x4ValueType::m12 ( ) const
inline

Definition at line 289 of file qquickvaluetypes_p.h.

◆ m13()

qreal QQuickMatrix4x4ValueType::m13 ( ) const
inline

Definition at line 290 of file qquickvaluetypes_p.h.

◆ m14()

qreal QQuickMatrix4x4ValueType::m14 ( ) const
inline

Definition at line 291 of file qquickvaluetypes_p.h.

◆ m21()

qreal QQuickMatrix4x4ValueType::m21 ( ) const
inline

Definition at line 292 of file qquickvaluetypes_p.h.

◆ m22()

qreal QQuickMatrix4x4ValueType::m22 ( ) const
inline

Definition at line 293 of file qquickvaluetypes_p.h.

◆ m23()

qreal QQuickMatrix4x4ValueType::m23 ( ) const
inline

Definition at line 294 of file qquickvaluetypes_p.h.

◆ m24()

qreal QQuickMatrix4x4ValueType::m24 ( ) const
inline

Definition at line 295 of file qquickvaluetypes_p.h.

◆ m31()

qreal QQuickMatrix4x4ValueType::m31 ( ) const
inline

Definition at line 296 of file qquickvaluetypes_p.h.

◆ m32()

qreal QQuickMatrix4x4ValueType::m32 ( ) const
inline

Definition at line 297 of file qquickvaluetypes_p.h.

◆ m33()

qreal QQuickMatrix4x4ValueType::m33 ( ) const
inline

Definition at line 298 of file qquickvaluetypes_p.h.

◆ m34()

qreal QQuickMatrix4x4ValueType::m34 ( ) const
inline

Definition at line 299 of file qquickvaluetypes_p.h.

◆ m41()

qreal QQuickMatrix4x4ValueType::m41 ( ) const
inline

Definition at line 300 of file qquickvaluetypes_p.h.

◆ m42()

qreal QQuickMatrix4x4ValueType::m42 ( ) const
inline

Definition at line 301 of file qquickvaluetypes_p.h.

◆ m43()

qreal QQuickMatrix4x4ValueType::m43 ( ) const
inline

Definition at line 302 of file qquickvaluetypes_p.h.

◆ m44()

qreal QQuickMatrix4x4ValueType::m44 ( ) const
inline

Definition at line 303 of file qquickvaluetypes_p.h.

◆ map()

QPointF QQuickMatrix4x4ValueType::map ( const QPointF p) const

Definition at line 762 of file qquickvaluetypes.cpp.

◆ mapRect()

QRectF QQuickMatrix4x4ValueType::mapRect ( const QRectF r) const

Definition at line 767 of file qquickvaluetypes.cpp.

◆ minus()

QMatrix4x4 QQuickMatrix4x4ValueType::minus ( const QMatrix4x4 & m) const

Definition at line 732 of file qquickvaluetypes.cpp.

◆ plus()

QMatrix4x4 QQuickMatrix4x4ValueType::plus ( const QMatrix4x4 & m) const

Definition at line 727 of file qquickvaluetypes.cpp.

◆ rotate() [1/2]

Q_INVOKABLE void QQuickMatrix4x4ValueType::rotate ( const QQuaternion & q)
inline

Definition at line 324 of file qquickvaluetypes_p.h.

◆ rotate() [2/2]

Q_INVOKABLE void QQuickMatrix4x4ValueType::rotate ( float angle,
const QVector3D & axis )
inline

Definition at line 323 of file qquickvaluetypes_p.h.

◆ row()

QVector4D QQuickMatrix4x4ValueType::row ( int n) const

Definition at line 737 of file qquickvaluetypes.cpp.

◆ scale() [1/3]

Q_INVOKABLE void QQuickMatrix4x4ValueType::scale ( const QVector3D & s)
inline

Definition at line 327 of file qquickvaluetypes_p.h.

◆ scale() [2/3]

Q_INVOKABLE void QQuickMatrix4x4ValueType::scale ( float s)
inline

Definition at line 325 of file qquickvaluetypes_p.h.

◆ scale() [3/3]

Q_INVOKABLE void QQuickMatrix4x4ValueType::scale ( float sx,
float sy,
float sz )
inline

Definition at line 326 of file qquickvaluetypes_p.h.

◆ setM11()

void QQuickMatrix4x4ValueType::setM11 ( qreal value)
inline

Definition at line 305 of file qquickvaluetypes_p.h.

◆ setM12()

void QQuickMatrix4x4ValueType::setM12 ( qreal value)
inline

Definition at line 306 of file qquickvaluetypes_p.h.

◆ setM13()

void QQuickMatrix4x4ValueType::setM13 ( qreal value)
inline

Definition at line 307 of file qquickvaluetypes_p.h.

◆ setM14()

void QQuickMatrix4x4ValueType::setM14 ( qreal value)
inline

Definition at line 308 of file qquickvaluetypes_p.h.

◆ setM21()

void QQuickMatrix4x4ValueType::setM21 ( qreal value)
inline

Definition at line 309 of file qquickvaluetypes_p.h.

◆ setM22()

void QQuickMatrix4x4ValueType::setM22 ( qreal value)
inline

Definition at line 310 of file qquickvaluetypes_p.h.

◆ setM23()

void QQuickMatrix4x4ValueType::setM23 ( qreal value)
inline

Definition at line 311 of file qquickvaluetypes_p.h.

◆ setM24()

void QQuickMatrix4x4ValueType::setM24 ( qreal value)
inline

Definition at line 312 of file qquickvaluetypes_p.h.

◆ setM31()

void QQuickMatrix4x4ValueType::setM31 ( qreal value)
inline

Definition at line 313 of file qquickvaluetypes_p.h.

◆ setM32()

void QQuickMatrix4x4ValueType::setM32 ( qreal value)
inline

Definition at line 314 of file qquickvaluetypes_p.h.

◆ setM33()

void QQuickMatrix4x4ValueType::setM33 ( qreal value)
inline

Definition at line 315 of file qquickvaluetypes_p.h.

◆ setM34()

void QQuickMatrix4x4ValueType::setM34 ( qreal value)
inline

Definition at line 316 of file qquickvaluetypes_p.h.

◆ setM41()

void QQuickMatrix4x4ValueType::setM41 ( qreal value)
inline

Definition at line 317 of file qquickvaluetypes_p.h.

◆ setM42()

void QQuickMatrix4x4ValueType::setM42 ( qreal value)
inline

Definition at line 318 of file qquickvaluetypes_p.h.

◆ setM43()

void QQuickMatrix4x4ValueType::setM43 ( qreal value)
inline

Definition at line 319 of file qquickvaluetypes_p.h.

◆ setM44()

void QQuickMatrix4x4ValueType::setM44 ( qreal value)
inline

Definition at line 320 of file qquickvaluetypes_p.h.

◆ times() [1/4]

QMatrix4x4 QQuickMatrix4x4ValueType::times ( const QMatrix4x4 & m) const

Definition at line 707 of file qquickvaluetypes.cpp.

◆ times() [2/4]

QVector3D QQuickMatrix4x4ValueType::times ( const QVector3D & vec) const

Definition at line 717 of file qquickvaluetypes.cpp.

◆ times() [3/4]

QVector4D QQuickMatrix4x4ValueType::times ( const QVector4D & vec) const

Definition at line 712 of file qquickvaluetypes.cpp.

◆ times() [4/4]

QMatrix4x4 QQuickMatrix4x4ValueType::times ( qreal factor) const

Definition at line 722 of file qquickvaluetypes.cpp.

◆ translate()

Q_INVOKABLE void QQuickMatrix4x4ValueType::translate ( const QVector3D & t)
inline

Definition at line 322 of file qquickvaluetypes_p.h.

◆ transposed()

QMatrix4x4 QQuickMatrix4x4ValueType::transposed ( ) const

Definition at line 757 of file qquickvaluetypes.cpp.

Property Documentation

◆ m11

qreal QQuickMatrix4x4ValueType::m11
readwrite

Definition at line 260 of file qquickvaluetypes_p.h.

◆ m12

qreal QQuickMatrix4x4ValueType::m12
readwrite

Definition at line 261 of file qquickvaluetypes_p.h.

◆ m13

qreal QQuickMatrix4x4ValueType::m13
readwrite

Definition at line 262 of file qquickvaluetypes_p.h.

◆ m14

qreal QQuickMatrix4x4ValueType::m14
readwrite

Definition at line 263 of file qquickvaluetypes_p.h.

◆ m21

qreal QQuickMatrix4x4ValueType::m21
readwrite

Definition at line 264 of file qquickvaluetypes_p.h.

◆ m22

qreal QQuickMatrix4x4ValueType::m22
readwrite

Definition at line 265 of file qquickvaluetypes_p.h.

◆ m23

qreal QQuickMatrix4x4ValueType::m23
readwrite

Definition at line 266 of file qquickvaluetypes_p.h.

◆ m24

qreal QQuickMatrix4x4ValueType::m24
readwrite

Definition at line 267 of file qquickvaluetypes_p.h.

◆ m31

qreal QQuickMatrix4x4ValueType::m31
readwrite

Definition at line 268 of file qquickvaluetypes_p.h.

◆ m32

qreal QQuickMatrix4x4ValueType::m32
readwrite

Definition at line 269 of file qquickvaluetypes_p.h.

◆ m33

qreal QQuickMatrix4x4ValueType::m33
readwrite

Definition at line 270 of file qquickvaluetypes_p.h.

◆ m34

qreal QQuickMatrix4x4ValueType::m34
readwrite

Definition at line 271 of file qquickvaluetypes_p.h.

◆ m41

qreal QQuickMatrix4x4ValueType::m41
readwrite

Definition at line 272 of file qquickvaluetypes_p.h.

◆ m42

qreal QQuickMatrix4x4ValueType::m42
readwrite

Definition at line 273 of file qquickvaluetypes_p.h.

◆ m43

qreal QQuickMatrix4x4ValueType::m43
readwrite

Definition at line 274 of file qquickvaluetypes_p.h.

◆ m44

qreal QQuickMatrix4x4ValueType::m44
readwrite

Definition at line 275 of file qquickvaluetypes_p.h.


The documentation for this class was generated from the following files: