QSGTransformNode Class

The QSGTransformNode class implements transformations in the scene graph. More...

Header: #include <QSGTransformNode>
Inherits: QSGNode

Public Functions

QSGTransformNode()
virtual ~QSGTransformNode() override
const QMatrix4x4 &combinedMatrix() const
const QMatrix4x4 &matrix() const
void setCombinedMatrix(const QMatrix4x4 &matrix)
void setMatrix(const QMatrix4x4 &matrix)

Detailed Description

\inmoduleQtQuick \ingroup qtquick-scenegraph-nodes

Transformations apply the node's subtree and can be nested. Multiple transform nodes will be accumulated by intersecting all their matrices. The accumulation happens as part of the rendering.

The transform nodes implement a 4x4 matrix which in theory supports full 3D transformations. However, because the renderer optimizes for 2D use-cases rather than 3D use-cases, rendering a scene with full 3D transformations needs to be done with some care.

Note: All classes with QSG prefix should be used solely on the scene graph's rendering thread. See Scene Graph and Rendering for more information.

Member Function Documentation

QSGTransformNode::QSGTransformNode()

Create a new QSGTransformNode with its matrix set to the identity matrix.

[override virtual noexcept] QSGTransformNode::~QSGTransformNode()

Deletes this transform node.

const QMatrix4x4 &QSGTransformNode::combinedMatrix() const

Set during rendering to the combination of all parent matrices for that rendering pass.

\internal

See also setCombinedMatrix().

const QMatrix4x4 &QSGTransformNode::matrix() const

Returns this transform node's matrix.

See also setMatrix().

void QSGTransformNode::setCombinedMatrix(const QMatrix4x4 &matrix)

Sets the combined matrix of this matrix to transform.

This function is meant to be called by the node preprocessing prior to rendering the tree, so it will not mark the tree as dirty.

\internal

See also combinedMatrix().

void QSGTransformNode::setMatrix(const QMatrix4x4 &matrix)

Sets this transform node's matrix to matrix.

See also matrix().