KLayout 0.29.8 (2024-11-26 926dac96c) [master]

API reference - Class QMatrix4x4

Notation used in Ruby API documentation

Module: QtGui

Description: Binding of QMatrix4x4

Public constructors

new QMatrix4x4newConstructor QMatrix4x4::QMatrix4x4()
new QMatrix4x4new(float ptr values)Constructor QMatrix4x4::QMatrix4x4(const float *values)
new QMatrix4x4new(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)
Constructor QMatrix4x4::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)
new QMatrix4x4new(float ptr values,
int cols,
int rows)
Constructor QMatrix4x4::QMatrix4x4(const float *values, int cols, int rows)
new QMatrix4x4new(const QTransform transform)Constructor QMatrix4x4::QMatrix4x4(const QTransform &transform)
new QMatrix4x4new(const QMatrix matrix)Constructor QMatrix4x4::QMatrix4x4(const QMatrix &matrix)

Public methods

[const]bool!=(const QMatrix4x4 other)Method bool QMatrix4x4::operator!=(const QMatrix4x4 &other)
[const]float()(int row,
int column)
Method const float &QMatrix4x4::operator()(int row, int column)
float()(int row,
int column)
Method float &QMatrix4x4::operator()(int row, int column)
[const]QMatrix4x4*(const QMatrix4x4 m2)Operator QMatrix4x4 ::operator*(const QMatrix4x4 &m1, const QMatrix4x4 &m2)
[const]QVector3D*(const QVector3D vector)Operator QVector3D ::operator*(const QMatrix4x4 &matrix, const QVector3D &vector)
[const]QVector4D*(const QVector4D vector)Operator QVector4D ::operator*(const QMatrix4x4 &matrix, const QVector4D &vector)
[const]QPoint*(const QPoint point)Operator QPoint ::operator*(const QMatrix4x4 &matrix, const QPoint &point)
[const]QPointF*(const QPointF point)Operator QPointF ::operator*(const QMatrix4x4 &matrix, const QPointF &point)
[const]QMatrix4x4*(float factor)Operator QMatrix4x4 ::operator*(const QMatrix4x4 &matrix, float factor)
QMatrix4x4*=(const QMatrix4x4 other)Method QMatrix4x4 &QMatrix4x4::operator*=(const QMatrix4x4 &other)
QMatrix4x4*=(float factor)Method QMatrix4x4 &QMatrix4x4::operator*=(float factor)
[const]QMatrix4x4+(const QMatrix4x4 m2)Operator QMatrix4x4 ::operator+(const QMatrix4x4 &m1, const QMatrix4x4 &m2)
QMatrix4x4+=(const QMatrix4x4 other)Method QMatrix4x4 &QMatrix4x4::operator+=(const QMatrix4x4 &other)
[const]QMatrix4x4-(const QMatrix4x4 m2)Operator QMatrix4x4 ::operator-(const QMatrix4x4 &m1, const QMatrix4x4 &m2)
[const]QMatrix4x4-Operator QMatrix4x4 ::operator-(const QMatrix4x4 &matrix)
QMatrix4x4-=(const QMatrix4x4 other)Method QMatrix4x4 &QMatrix4x4::operator-=(const QMatrix4x4 &other)
[const]QMatrix4x4/(float divisor)Operator QMatrix4x4 ::operator/(const QMatrix4x4 &matrix, float divisor)
QMatrix4x4/=(float divisor)Method QMatrix4x4 &QMatrix4x4::operator/=(float divisor)
[const]bool==(const QMatrix4x4 other)Method bool QMatrix4x4::operator==(const QMatrix4x4 &other)
[const]QMatrix4x4 ptr_const_castReturns a non-const reference to self.
void_createEnsures the C++ object is created
void_destroyExplicitly destroys the object
[const]bool_destroyed?Returns a value indicating whether the object was already destroyed
[const]bool_is_const_object?Returns a value indicating whether the reference is a const reference
void_manageMarks the object as managed by the script side.
void_unmanageMarks the object as no longer owned by the script side.
voidassign(const QMatrix4x4 other)Assigns another object to self
[const]QVector4Dcolumn(int index)Method QVector4D QMatrix4x4::column(int index)
[const]float ptrconstDataMethod const float *QMatrix4x4::constData()
[const]voidcopyDataTo(float ptr values)Method void QMatrix4x4::copyDataTo(float *values)
float ptrdataMethod float *QMatrix4x4::data()
[const]float ptrdataMethod const float *QMatrix4x4::data()
[const]doubledeterminantMethod double QMatrix4x4::determinant()
[const]new QMatrix4x4 ptrdupCreates a copy of self
voidfill(float value)Method void QMatrix4x4::fill(float value)
voidflipCoordinatesMethod void QMatrix4x4::flipCoordinates()
voidfrustum(float left,
float right,
float bottom,
float top,
float nearPlane,
float farPlane)
Method void QMatrix4x4::frustum(float left, float right, float bottom, float top, float nearPlane, float farPlane)
[const]QMatrix4x4inverted(bool ptr invertible = nullptr)Method QMatrix4x4 QMatrix4x4::inverted(bool *invertible)
[const]boolisAffine?Method bool QMatrix4x4::isAffine()
[const]boolisIdentity?Method bool QMatrix4x4::isIdentity()
voidlookAt(const QVector3D eye,
const QVector3D center,
const QVector3D up)
Method void QMatrix4x4::lookAt(const QVector3D &eye, const QVector3D &center, const QVector3D &up)
[const]QPointmap(const QPoint point)Method QPoint QMatrix4x4::map(const QPoint &point)
[const]QPointFmap(const QPointF point)Method QPointF QMatrix4x4::map(const QPointF &point)
[const]QVector3Dmap(const QVector3D point)Method QVector3D QMatrix4x4::map(const QVector3D &point)
[const]QVector4Dmap(const QVector4D point)Method QVector4D QMatrix4x4::map(const QVector4D &point)
[const]QRectmapRect(const QRect rect)Method QRect QMatrix4x4::mapRect(const QRect &rect)
[const]QRectFmapRect(const QRectF rect)Method QRectF QMatrix4x4::mapRect(const QRectF &rect)
[const]QVector3DmapVector(const QVector3D vector)Method QVector3D QMatrix4x4::mapVector(const QVector3D &vector)
voidoptimizeMethod void QMatrix4x4::optimize()
voidortho(const QRect rect)Method void QMatrix4x4::ortho(const QRect &rect)
voidortho(const QRectF rect)Method void QMatrix4x4::ortho(const QRectF &rect)
voidortho(float left,
float right,
float bottom,
float top,
float nearPlane,
float farPlane)
Method void QMatrix4x4::ortho(float left, float right, float bottom, float top, float nearPlane, float farPlane)
voidperspective(float verticalAngle,
float aspectRatio,
float nearPlane,
float farPlane)
Method void QMatrix4x4::perspective(float verticalAngle, float aspectRatio, float nearPlane, float farPlane)
voidrotate(float angle,
const QVector3D vector)
Method void QMatrix4x4::rotate(float angle, const QVector3D &vector)
voidrotate(float angle,
float x,
float y,
float z = 0.0f)
Method void QMatrix4x4::rotate(float angle, float x, float y, float z)
voidrotate(const QQuaternion quaternion)Method void QMatrix4x4::rotate(const QQuaternion &quaternion)
[const]QVector4Drow(int index)Method QVector4D QMatrix4x4::row(int index)
voidscale(const QVector3D vector)Method void QMatrix4x4::scale(const QVector3D &vector)
voidscale(float x,
float y)
Method void QMatrix4x4::scale(float x, float y)
voidscale(float x,
float y,
float z)
Method void QMatrix4x4::scale(float x, float y, float z)
voidscale(float factor)Method void QMatrix4x4::scale(float factor)
voidsetColumn(int index,
const QVector4D value)
Method void QMatrix4x4::setColumn(int index, const QVector4D &value)
voidsetRow(int index,
const QVector4D value)
Method void QMatrix4x4::setRow(int index, const QVector4D &value)
voidsetToIdentityMethod void QMatrix4x4::setToIdentity()
[const]QMatrixtoAffineMethod QMatrix QMatrix4x4::toAffine()
[const]QTransformtoTransformMethod QTransform QMatrix4x4::toTransform()
[const]QTransformtoTransform(float distanceToPlane)Method QTransform QMatrix4x4::toTransform(float distanceToPlane)
voidtranslate(const QVector3D vector)Method void QMatrix4x4::translate(const QVector3D &vector)
voidtranslate(float x,
float y)
Method void QMatrix4x4::translate(float x, float y)
voidtranslate(float x,
float y,
float z)
Method void QMatrix4x4::translate(float x, float y, float z)
[const]QMatrix4x4transposedMethod QMatrix4x4 QMatrix4x4::transposed()
voidviewport(const QRectF rect)Method void QMatrix4x4::viewport(const QRectF &rect)
voidviewport(float left,
float bottom,
float width,
float height,
float nearPlane = 0.0f,
float farPlane = 1.0f)
Method void QMatrix4x4::viewport(float left, float bottom, float width, float height, float nearPlane, float farPlane)

Deprecated methods (protected, public, static, non-static and constructors)

voidcreateUse of this method is deprecated. Use _create instead
voiddestroyUse of this method is deprecated. Use _destroy instead
[const]booldestroyed?Use of this method is deprecated. Use _destroyed? instead
[const]boolis_const_object?Use of this method is deprecated. Use _is_const_object? instead

Detailed description

!=

Signature: [const] bool != (const QMatrix4x4 other)

Description: Method bool QMatrix4x4::operator!=(const QMatrix4x4 &other)

()

(1) Signature: [const] float () (int row, int column)

Description: Method const float &QMatrix4x4::operator()(int row, int column)

(2) Signature: float () (int row, int column)

Description: Method float &QMatrix4x4::operator()(int row, int column)

*

(1) Signature: [const] QMatrix4x4 * (const QMatrix4x4 m2)

Description: Operator QMatrix4x4 ::operator*(const QMatrix4x4 &m1, const QMatrix4x4 &m2)

This is the mapping of the global operator to the instance method.

Python specific notes:
This method also implements '__rmul__'.

(2) Signature: [const] QVector3D * (const QVector3D vector)

Description: Operator QVector3D ::operator*(const QMatrix4x4 &matrix, const QVector3D &vector)

This is the mapping of the global operator to the instance method.

Python specific notes:
This method also implements '__rmul__'.

(3) Signature: [const] QVector4D * (const QVector4D vector)

Description: Operator QVector4D ::operator*(const QMatrix4x4 &matrix, const QVector4D &vector)

This is the mapping of the global operator to the instance method.

Python specific notes:
This method also implements '__rmul__'.

(4) Signature: [const] QPoint * (const QPoint point)

Description: Operator QPoint ::operator*(const QMatrix4x4 &matrix, const QPoint &point)

This is the mapping of the global operator to the instance method.

Python specific notes:
This method also implements '__rmul__'.

(5) Signature: [const] QPointF * (const QPointF point)

Description: Operator QPointF ::operator*(const QMatrix4x4 &matrix, const QPointF &point)

This is the mapping of the global operator to the instance method.

Python specific notes:
This method also implements '__rmul__'.

(6) Signature: [const] QMatrix4x4 * (float factor)

Description: Operator QMatrix4x4 ::operator*(const QMatrix4x4 &matrix, float factor)

This is the mapping of the global operator to the instance method.

Python specific notes:
This method also implements '__rmul__'.

*=

(1) Signature: QMatrix4x4 *= (const QMatrix4x4 other)

Description: Method QMatrix4x4 &QMatrix4x4::operator*=(const QMatrix4x4 &other)

(2) Signature: QMatrix4x4 *= (float factor)

Description: Method QMatrix4x4 &QMatrix4x4::operator*=(float factor)

+

Signature: [const] QMatrix4x4 + (const QMatrix4x4 m2)

Description: Operator QMatrix4x4 ::operator+(const QMatrix4x4 &m1, const QMatrix4x4 &m2)

This is the mapping of the global operator to the instance method.

+=

Signature: QMatrix4x4 += (const QMatrix4x4 other)

Description: Method QMatrix4x4 &QMatrix4x4::operator+=(const QMatrix4x4 &other)

-

(1) Signature: [const] QMatrix4x4 - (const QMatrix4x4 m2)

Description: Operator QMatrix4x4 ::operator-(const QMatrix4x4 &m1, const QMatrix4x4 &m2)

This is the mapping of the global operator to the instance method.

(2) Signature: [const] QMatrix4x4 -

Description: Operator QMatrix4x4 ::operator-(const QMatrix4x4 &matrix)

This is the mapping of the global operator to the instance method.

-=

Signature: QMatrix4x4 -= (const QMatrix4x4 other)

Description: Method QMatrix4x4 &QMatrix4x4::operator-=(const QMatrix4x4 &other)

/

Signature: [const] QMatrix4x4 / (float divisor)

Description: Operator QMatrix4x4 ::operator/(const QMatrix4x4 &matrix, float divisor)

This is the mapping of the global operator to the instance method.

/=

Signature: QMatrix4x4 /= (float divisor)

Description: Method QMatrix4x4 &QMatrix4x4::operator/=(float divisor)

==

Signature: [const] bool == (const QMatrix4x4 other)

Description: Method bool QMatrix4x4::operator==(const QMatrix4x4 &other)

_const_cast

Signature: [const] QMatrix4x4 ptr _const_cast

Description: Returns a non-const reference to self.

Basically, this method allows turning a const object reference to a non-const one. This method is provided as last resort to remove the constness from an object. Usually there is a good reason for a const object reference, so using this method may have undesired side effects.

This method has been introduced in version 0.29.6.

_create

Signature: void _create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

_destroy

Signature: void _destroy

Description: Explicitly destroys the object

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

_destroyed?

Signature: [const] bool _destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

_is_const_object?

Signature: [const] bool _is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

_manage

Signature: void _manage

Description: Marks the object as managed by the script side.

After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required.

Usually it's not required to call this method. It has been introduced in version 0.24.

_unmanage

Signature: void _unmanage

Description: Marks the object as no longer owned by the script side.

Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur.

Usually it's not required to call this method. It has been introduced in version 0.24.

assign

Signature: void assign (const QMatrix4x4 other)

Description: Assigns another object to self

column

Signature: [const] QVector4D column (int index)

Description: Method QVector4D QMatrix4x4::column(int index)

constData

Signature: [const] float ptr constData

Description: Method const float *QMatrix4x4::constData()

copyDataTo

Signature: [const] void copyDataTo (float ptr values)

Description: Method void QMatrix4x4::copyDataTo(float *values)

create

Signature: void create

Description: Ensures the C++ object is created

Use of this method is deprecated. Use _create instead

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

data

(1) Signature: float ptr data

Description: Method float *QMatrix4x4::data()

(2) Signature: [const] float ptr data

Description: Method const float *QMatrix4x4::data()

destroy

Signature: void destroy

Description: Explicitly destroys the object

Use of this method is deprecated. Use _destroy instead

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

destroyed?

Signature: [const] bool destroyed?

Description: Returns a value indicating whether the object was already destroyed

Use of this method is deprecated. Use _destroyed? instead

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

determinant

Signature: [const] double determinant

Description: Method double QMatrix4x4::determinant()

dup

Signature: [const] new QMatrix4x4 ptr dup

Description: Creates a copy of self

Python specific notes:
This method also implements '__copy__' and '__deepcopy__'.

fill

Signature: void fill (float value)

Description: Method void QMatrix4x4::fill(float value)

flipCoordinates

Signature: void flipCoordinates

Description: Method void QMatrix4x4::flipCoordinates()

frustum

Signature: void frustum (float left, float right, float bottom, float top, float nearPlane, float farPlane)

Description: Method void QMatrix4x4::frustum(float left, float right, float bottom, float top, float nearPlane, float farPlane)

inverted

Signature: [const] QMatrix4x4 inverted (bool ptr invertible = nullptr)

Description: Method QMatrix4x4 QMatrix4x4::inverted(bool *invertible)

isAffine?

Signature: [const] bool isAffine?

Description: Method bool QMatrix4x4::isAffine()

isIdentity?

Signature: [const] bool isIdentity?

Description: Method bool QMatrix4x4::isIdentity()

is_const_object?

Signature: [const] bool is_const_object?

Description: Returns a value indicating whether the reference is a const reference

Use of this method is deprecated. Use _is_const_object? instead

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

lookAt

Signature: void lookAt (const QVector3D eye, const QVector3D center, const QVector3D up)

Description: Method void QMatrix4x4::lookAt(const QVector3D &eye, const QVector3D &center, const QVector3D &up)

map

(1) Signature: [const] QPoint map (const QPoint point)

Description: Method QPoint QMatrix4x4::map(const QPoint &point)

(2) Signature: [const] QPointF map (const QPointF point)

Description: Method QPointF QMatrix4x4::map(const QPointF &point)

(3) Signature: [const] QVector3D map (const QVector3D point)

Description: Method QVector3D QMatrix4x4::map(const QVector3D &point)

(4) Signature: [const] QVector4D map (const QVector4D point)

Description: Method QVector4D QMatrix4x4::map(const QVector4D &point)

mapRect

(1) Signature: [const] QRect mapRect (const QRect rect)

Description: Method QRect QMatrix4x4::mapRect(const QRect &rect)

(2) Signature: [const] QRectF mapRect (const QRectF rect)

Description: Method QRectF QMatrix4x4::mapRect(const QRectF &rect)

mapVector

Signature: [const] QVector3D mapVector (const QVector3D vector)

Description: Method QVector3D QMatrix4x4::mapVector(const QVector3D &vector)

new

(1) Signature: [static] new QMatrix4x4 new

Description: Constructor QMatrix4x4::QMatrix4x4()

This method creates an object of class QMatrix4x4.

Python specific notes:
This method is the default initializer of the object.

(2) Signature: [static] new QMatrix4x4 new (float ptr values)

Description: Constructor QMatrix4x4::QMatrix4x4(const float *values)

This method creates an object of class QMatrix4x4.

Python specific notes:
This method is the default initializer of the object.

(3) Signature: [static] new QMatrix4x4 new (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)

Description: Constructor QMatrix4x4::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)

This method creates an object of class QMatrix4x4.

Python specific notes:
This method is the default initializer of the object.

(4) Signature: [static] new QMatrix4x4 new (float ptr values, int cols, int rows)

Description: Constructor QMatrix4x4::QMatrix4x4(const float *values, int cols, int rows)

This method creates an object of class QMatrix4x4.

Python specific notes:
This method is the default initializer of the object.

(5) Signature: [static] new QMatrix4x4 new (const QTransform transform)

Description: Constructor QMatrix4x4::QMatrix4x4(const QTransform &transform)

This method creates an object of class QMatrix4x4.

Python specific notes:
This method is the default initializer of the object.

(6) Signature: [static] new QMatrix4x4 new (const QMatrix matrix)

Description: Constructor QMatrix4x4::QMatrix4x4(const QMatrix &matrix)

This method creates an object of class QMatrix4x4.

Python specific notes:
This method is the default initializer of the object.

optimize

Signature: void optimize

Description: Method void QMatrix4x4::optimize()

ortho

(1) Signature: void ortho (const QRect rect)

Description: Method void QMatrix4x4::ortho(const QRect &rect)

(2) Signature: void ortho (const QRectF rect)

Description: Method void QMatrix4x4::ortho(const QRectF &rect)

(3) Signature: void ortho (float left, float right, float bottom, float top, float nearPlane, float farPlane)

Description: Method void QMatrix4x4::ortho(float left, float right, float bottom, float top, float nearPlane, float farPlane)

perspective

Signature: void perspective (float verticalAngle, float aspectRatio, float nearPlane, float farPlane)

Description: Method void QMatrix4x4::perspective(float verticalAngle, float aspectRatio, float nearPlane, float farPlane)

rotate

(1) Signature: void rotate (float angle, const QVector3D vector)

Description: Method void QMatrix4x4::rotate(float angle, const QVector3D &vector)

(2) Signature: void rotate (float angle, float x, float y, float z = 0.0f)

Description: Method void QMatrix4x4::rotate(float angle, float x, float y, float z)

(3) Signature: void rotate (const QQuaternion quaternion)

Description: Method void QMatrix4x4::rotate(const QQuaternion &quaternion)

row

Signature: [const] QVector4D row (int index)

Description: Method QVector4D QMatrix4x4::row(int index)

scale

(1) Signature: void scale (const QVector3D vector)

Description: Method void QMatrix4x4::scale(const QVector3D &vector)

(2) Signature: void scale (float x, float y)

Description: Method void QMatrix4x4::scale(float x, float y)

(3) Signature: void scale (float x, float y, float z)

Description: Method void QMatrix4x4::scale(float x, float y, float z)

(4) Signature: void scale (float factor)

Description: Method void QMatrix4x4::scale(float factor)

setColumn

Signature: void setColumn (int index, const QVector4D value)

Description: Method void QMatrix4x4::setColumn(int index, const QVector4D &value)

setRow

Signature: void setRow (int index, const QVector4D value)

Description: Method void QMatrix4x4::setRow(int index, const QVector4D &value)

setToIdentity

Signature: void setToIdentity

Description: Method void QMatrix4x4::setToIdentity()

toAffine

Signature: [const] QMatrix toAffine

Description: Method QMatrix QMatrix4x4::toAffine()

toTransform

(1) Signature: [const] QTransform toTransform

Description: Method QTransform QMatrix4x4::toTransform()

(2) Signature: [const] QTransform toTransform (float distanceToPlane)

Description: Method QTransform QMatrix4x4::toTransform(float distanceToPlane)

translate

(1) Signature: void translate (const QVector3D vector)

Description: Method void QMatrix4x4::translate(const QVector3D &vector)

(2) Signature: void translate (float x, float y)

Description: Method void QMatrix4x4::translate(float x, float y)

(3) Signature: void translate (float x, float y, float z)

Description: Method void QMatrix4x4::translate(float x, float y, float z)

transposed

Signature: [const] QMatrix4x4 transposed

Description: Method QMatrix4x4 QMatrix4x4::transposed()

viewport

(1) Signature: void viewport (const QRectF rect)

Description: Method void QMatrix4x4::viewport(const QRectF &rect)

(2) Signature: void viewport (float left, float bottom, float width, float height, float nearPlane = 0.0f, float farPlane = 1.0f)

Description: Method void QMatrix4x4::viewport(float left, float bottom, float width, float height, float nearPlane, float farPlane)