Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qquick3dnode.cpp
Go to the documentation of this file.
1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#include "qquick3dnode_p.h"
5#include "qquick3dnode_p_p.h"
6
7#include <QtQuick3DRuntimeRender/private/qssgrendernode_p.h>
8#include <QtQuick3DUtils/private/qssgutils_p.h>
9#include <QtQuick3D/private/qquick3dobject_p.h>
10
11#include <QtMath>
12
14
17{
18
19}
20
22{
23
24}
25
27{
28
29}
30
32{
33 Q_Q(QQuick3DNode);
34 if (isHidden == m_isHiddenInEditor)
35 return;
36 m_isHiddenInEditor = isHidden;
37 q->update();
38}
39
105{
106 Q_D(QQuick3DNode);
107 d->init();
108}
109
112{
113 Q_ASSERT_X(QSSGRenderGraphObject::isNodeType(dd.type), "", "Type needs to be identified as a node type!");
114
115 Q_D(QQuick3DNode);
116 d->init();
117}
118
120
129float QQuick3DNode::x() const
130{
131 Q_D(const QQuick3DNode);
132 return d->m_position.x();
133}
134
143float QQuick3DNode::y() const
144{
145 Q_D(const QQuick3DNode);
146 return d->m_position.y();
147}
148
157float QQuick3DNode::z() const
158{
159 Q_D(const QQuick3DNode);
160 return d->m_position.z();
161}
162
170{
171 Q_D(const QQuick3DNode);
172 return d->m_rotation;
173}
174
183{
184 Q_D(const QQuick3DNode);
185 return d->m_position;
186}
187
188
195{
196 Q_D(const QQuick3DNode);
197 return d->m_scale;
198}
199
208{
209 Q_D(const QQuick3DNode);
210 return d->m_pivot;
211}
212
222{
223 Q_D(const QQuick3DNode);
224 return d->m_opacity;
225}
226
234{
235 Q_D(const QQuick3DNode);
236 return d->m_visible;
237}
238
247{
248 Q_D(const QQuick3DNode);
249 return d->m_staticFlags;
250}
251
253{
254 // The parent of a QQuick3DNode should never be anything else than a (subclass
255 // of) QQuick3DNode (but the children/leaf nodes can be something else).
256 return static_cast<QQuick3DNode *>(parentItem());
257}
258
269{
270 return mapDirectionToScene(QVector3D(0, 0, -1)).normalized();
271}
272
283{
284 return mapDirectionToScene(QVector3D(0, 1, 0)).normalized();
285}
286
297{
298 return mapDirectionToScene(QVector3D(1, 0, 0)).normalized();
299}
314{
316}
317
325{
326 Q_D(const QQuick3DNode);
327 return QQuaternion::fromRotationMatrix(mat44::getUpper3x3(d->sceneRotationMatrix())).normalized();
328}
329
337{
339}
340
349{
350 Q_D(const QQuick3DNode);
351 if (d->m_sceneTransformDirty)
352 const_cast<QQuick3DNodePrivate *>(d)->calculateGlobalVariables();
353 return d->m_sceneTransform;
354}
355
357{
358 Q_Q(QQuick3DNode);
359 m_sceneTransformDirty = false;
361 QQuick3DNode *parent = q->parentNode();
362 if (!parent) {
363 m_sceneTransform = localTransform;
365 return;
366 }
368
369 if (privateParent->m_sceneTransformDirty)
370 privateParent->calculateGlobalVariables();
371 m_sceneTransform = privateParent->m_sceneTransform * localTransform;
372
373 // Check if we have an ancestor with non-uniform scale. This will decide whether
374 // or not we can use the sceneTransform to extract sceneRotation and sceneScale.
377 const QVector3D ps = privateParent->m_scale;
378 m_hasInheritedUniformScale = qFuzzyCompare(ps.x(), ps.y()) && qFuzzyCompare(ps.x(), ps.z());
379 }
380}
381
383{
385}
386
388{
389 Q_Q(const QQuick3DNode);
390
392 // Ensure m_hasInheritedUniformScale is up to date
393 const_cast<QQuick3DNodePrivate *>(this)->calculateGlobalVariables();
394 }
395
397 // When we know that every node up to the root have a uniform scale, we can extract the
398 // rotation directly from the sceneTransform(). This is optimizing, since we reuse that
399 // matrix for more than just calculating the sceneRotation.
400 QMatrix4x4 rotationMatrix = q->sceneTransform();
401 mat44::normalize(rotationMatrix);
402 return rotationMatrix;
403 }
404
405 // When we have an ancestor that has a non-uniform scale, we cannot extract
406 // the rotation from the sceneMatrix directly. Instead, we need to calculate
407 // it separately, which is slightly more costly.
408 const QMatrix4x4 parentRotationMatrix = QQuick3DNodePrivate::get(q->parentNode())->sceneRotationMatrix();
409 return parentRotationMatrix * localRotationMatrix();
410}
411
413{
414 Q_Q(QQuick3DNode);
415 const QVector3D prevPosition = mat44::getPosition(m_sceneTransform);
417 const QVector3D prevScale = mat44::getScale(m_sceneTransform);
418 QVector3D prevForward, prevUp, prevRight;
419 QVector3D newForward, newUp, newRight;
420 // Do direction (forward, up, right) calculations only if they have connections
421 bool emitDirectionChanges = (m_directionConnectionCount > 0);
422 if (emitDirectionChanges) {
423 // Instead of calling forward(), up() and right(), calculate them here.
424 // This way m_sceneTransform isn't updated due to m_sceneTransformDirty and
425 // common theDirMatrix operations are not duplicated.
427 prevForward = mat33::transform(theDirMatrix, QVector3D(0, 0, -1)).normalized();
428 prevUp = mat33::transform(theDirMatrix, QVector3D(0, 1, 0)).normalized();
429 prevRight = mat33::transform(theDirMatrix, QVector3D(1, 0, 0)).normalized();
430 }
431
433
434 const QVector3D newPosition = mat44::getPosition(m_sceneTransform);
437 if (emitDirectionChanges) {
439 newForward = mat33::transform(theDirMatrix, QVector3D(0, 0, -1)).normalized();
440 newUp = mat33::transform(theDirMatrix, QVector3D(0, 1, 0)).normalized();
441 newRight = mat33::transform(theDirMatrix, QVector3D(1, 0, 0)).normalized();
442 }
443
444 const bool positionChanged = prevPosition != newPosition;
445 const bool rotationChanged = prevRotation != newRotation;
446 const bool scaleChanged = !qFuzzyCompare(prevScale, newScale);
447
448 if (!positionChanged && !rotationChanged && !scaleChanged)
449 return;
450
451 emit q->sceneTransformChanged();
452
453 if (positionChanged)
454 emit q->scenePositionChanged();
455 if (rotationChanged)
456 emit q->sceneRotationChanged();
457 if (scaleChanged)
458 emit q->sceneScaleChanged();
459 if (emitDirectionChanges) {
460 const bool forwardChanged = prevForward != newForward;
461 const bool upChanged = prevUp != newUp;
462 const bool rightChanged = prevRight != newRight;
463 if (forwardChanged)
464 Q_EMIT q->forwardChanged();
465 if (upChanged)
466 Q_EMIT q->upChanged();
467 if (rightChanged)
468 Q_EMIT q->rightChanged();
469 }
470}
471
473{
474 // Return true if its likely that we need to emit
475 // the given signal when our global transform changes.
476 static const QMetaMethod sceneTransformSignal = QMetaMethod::fromSignal(&QQuick3DNode::sceneTransformChanged);
480
481 return (signal == sceneTransformSignal
482 || signal == scenePositionSignal
483 || signal == sceneRotationSignal
484 || signal == sceneScaleSignal);
485}
486
488{
489 // Return true if its likely that we need to emit
490 // the given signal when our global transform changes.
494
495 return (signal == forwardSignal
496 || signal == upSignal
497 || signal == rightSignal);
498}
499
501{
502 Q_D(QQuick3DNode);
503 // Since we want to avoid calculating the global transform in the frontend
504 // unnecessary, we keep track of the number of connections/QML bindings
505 // that needs it. If there are no connections, we can skip calculating it
506 // whenever our geometry changes (unless someone asks for it explicitly).
507 if (d->isSceneTransformRelatedSignal(signal))
508 d->m_sceneTransformConnectionCount++;
509 if (d->isDirectionRelatedSignal(signal))
510 d->m_directionConnectionCount++;
511}
512
514{
515 Q_D(QQuick3DNode);
516 if (d->isSceneTransformRelatedSignal(signal))
517 d->m_sceneTransformConnectionCount--;
518 if (d->isDirectionRelatedSignal(signal))
519 d->m_directionConnectionCount--;
520}
521
523{
524 Q_D(QQuick3DNode);
526 if (d->m_sceneTransformConnectionCount > 0 || d->m_directionConnectionCount > 0)
527 d->emitChangesToSceneTransform();
528}
529
531{
532 Q_Q(QQuick3DNode);
533 // Note: we recursively set m_sceneTransformDirty to true whenever our geometry
534 // changes. But we only set it back to false if someone actually queries our global
535 // transform (because only then do we need to calculate it). This means that if no
536 // one ever does that, m_sceneTransformDirty will remain true, perhaps through out
537 // the life time of the node. This is in contrast with the backend, which need to
538 // update dirty transform nodes for every scene graph sync (and clear the backend
539 // dirty transform flags - QQuick3DObjectPrivate::dirtyAttributes).
540 // This means that for most nodes, calling markSceneTransformDirty() should be
541 // cheap, since we normally expect to return early in the following test.
543 return;
544
546
549
551 for (auto child : children) {
552 if (auto node = qobject_cast<QQuick3DNode *>(child)) {
554 }
555 }
556}
557
559{
560 Q_D(QQuick3DNode);
561 if (qFuzzyCompare(d->m_position.x(), x))
562 return;
563
564 d->m_position.setX(x);
565 d->markSceneTransformDirty();
567 emit xChanged();
568 update();
569}
570
572{
573 Q_D(QQuick3DNode);
574 if (qFuzzyCompare(d->m_position.y(), y))
575 return;
576
577 d->m_position.setY(y);
578 d->markSceneTransformDirty();
580 emit yChanged();
581 update();
582}
583
585{
586 Q_D(QQuick3DNode);
587 if (qFuzzyCompare(d->m_position.z(), z))
588 return;
589
590 d->m_position.setZ(z);
591 d->markSceneTransformDirty();
593 emit zChanged();
594 update();
595}
596
598{
599 Q_D(QQuick3DNode);
600 if (d->m_rotation == rotation)
601 return;
602
603 d->m_rotation = rotation;
604 d->markSceneTransformDirty();
607
608 update();
609}
610
612{
613 Q_D(QQuick3DNode);
614 if (d->m_position == position)
615 return;
616
617 const bool xUnchanged = qFuzzyCompare(position.x(), d->m_position.x());
618 const bool yUnchanged = qFuzzyCompare(position.y(), d->m_position.y());
619 const bool zUnchanged = qFuzzyCompare(position.z(), d->m_position.z());
620
621 d->m_position = position;
622 d->markSceneTransformDirty();
624
625 if (!xUnchanged)
626 emit xChanged();
627 if (!yUnchanged)
628 emit yChanged();
629 if (!zUnchanged)
630 emit zChanged();
631
632 update();
633}
634
636{
637 Q_D(QQuick3DNode);
638 if (d->m_scale == scale)
639 return;
640
641 d->m_scale = scale;
642 d->markSceneTransformDirty();
644 update();
645}
646
648{
649 Q_D(QQuick3DNode);
650 if (d->m_pivot == pivot)
651 return;
652
653 d->m_pivot = pivot;
654 d->markSceneTransformDirty();
656 update();
657}
658
660{
661 Q_D(QQuick3DNode);
662 if (qFuzzyCompare(d->m_opacity, opacity))
663 return;
664
665 d->m_opacity = opacity;
667 update();
668}
669
670void QQuick3DNode::setVisible(bool visible)
671{
672 Q_D(QQuick3DNode);
673 if (d->m_visible == visible)
674 return;
675
676 d->m_visible = visible;
678 update();
679}
680
681void QQuick3DNode::setStaticFlags(int staticFlags)
682{
683 Q_D(QQuick3DNode);
684 if (d->m_staticFlags == staticFlags)
685 return;
686
687 d->m_staticFlags = staticFlags;
689 update();
690}
691
692void QQuick3DNode::setEulerRotation(const QVector3D &eulerRotation) {
693 Q_D(QQuick3DNode);
694
695 if (d->m_rotation == eulerRotation)
696 return;
697
698 d->m_rotation = eulerRotation;
699
701 d->markSceneTransformDirty();
703 update();
704}
705
721void QQuick3DNode::rotate(qreal degrees, const QVector3D &axis, TransformSpace space)
722{
723 Q_D(QQuick3DNode);
724
725 const QQuaternion addRotationQuat = QQuaternion::fromAxisAndAngle(axis, float(degrees));
726 const QMatrix4x4 addRotationMatrix = QMatrix4x4(addRotationQuat.toRotationMatrix());
727 QMatrix4x4 newRotationMatrix;
728
729 switch (space) {
730 case LocalSpace:
731 newRotationMatrix = d->localRotationMatrix() * addRotationMatrix;
732 break;
733 case ParentSpace:
734 newRotationMatrix = addRotationMatrix * d->localRotationMatrix();
735 break;
736 case SceneSpace:
737 if (const auto parent = parentNode()) {
738 const QMatrix4x4 lrm = d->localRotationMatrix();
740 newRotationMatrix = prm.inverted() * addRotationMatrix * prm * lrm;
741 } else {
742 newRotationMatrix = d->localRotationMatrix() * addRotationMatrix;
743 }
744 break;
745 }
746
747 const QQuaternion newRotationQuaternion = QQuaternion::fromRotationMatrix(mat44::getUpper3x3(newRotationMatrix)).normalized();
748
749 if (d->m_rotation == newRotationQuaternion)
750 return;
751
752 d->m_rotation = newRotationQuaternion;
753 d->markSceneTransformDirty();
754
757
758 update();
759}
760
762{
763 Q_D(QQuick3DNode);
764 if (!node) {
765 markAllDirty();
766 node = new QSSGRenderNode();
767 }
769 auto spacialNode = static_cast<QSSGRenderNode *>(node);
770 bool transformIsDirty = false;
771
772 if (spacialNode->pivot != d->m_pivot) {
773 transformIsDirty = true;
774 spacialNode->pivot = d->m_pivot;
775 }
776
777 if (!qFuzzyCompare(spacialNode->localOpacity, d->m_opacity)) {
778 spacialNode->localOpacity = d->m_opacity;
779 spacialNode->markDirty(QSSGRenderNode::DirtyFlag::OpacityDirty);
780 }
781
782 if (!transformIsDirty && !qFuzzyCompare(d->m_position, mat44::getPosition(spacialNode->localTransform)))
783 transformIsDirty = true;
784
785 if (!transformIsDirty && !qFuzzyCompare(d->m_scale, mat44::getScale(spacialNode->localTransform)))
786 transformIsDirty = true;
787
788 if (!transformIsDirty && !qFuzzyCompare(d->m_rotation, QQuaternion::fromRotationMatrix(mat44::getUpper3x3(spacialNode->localTransform))))
789 transformIsDirty = true;
790
791 if (transformIsDirty) {
792 spacialNode->localTransform = QSSGRenderNode::calculateTransformMatrix(d->m_position, d->m_scale, d->m_pivot, d->m_rotation);;
793 spacialNode->markDirty(QSSGRenderNode::DirtyFlag::TransformDirty);
794 }
795
796 spacialNode->staticFlags = d->m_staticFlags;
797
798 // The Hidden in Editor flag overrides the visible value
799 if (d->m_isHiddenInEditor)
800 spacialNode->setState(QSSGRenderNode::LocalState::Active, false);
801 else
802 spacialNode->setState(QSSGRenderNode::LocalState::Active, d->m_visible);
803
805
806 return spacialNode;
807}
808
821{
822 return mat44::transform(sceneTransform(), localPosition);
823}
824
833{
834 return mat44::transform(sceneTransform().inverted(), scenePosition);
835}
836
847QVector3D QQuick3DNode::mapPositionToNode(const QQuick3DNode *node, const QVector3D &localPosition) const
848{
849 const auto scenePositionSelf = mapPositionToScene(localPosition);
850 return node ? node->mapPositionFromScene(scenePositionSelf) : scenePositionSelf;
851}
852
864{
865 const auto scenePositionOther = node ? node->mapPositionToScene(localPosition) : localPosition;
866 return mapPositionFromScene(scenePositionOther);
867}
868
882{
883 QMatrix3x3 theDirMatrix = sceneTransform().normalMatrix();
884 return mat33::transform(theDirMatrix, localDirection);
885}
886
900{
902 theDirMatrix = theDirMatrix.transposed();
903 return mat33::transform(theDirMatrix, sceneDirection);
904}
905
921QVector3D QQuick3DNode::mapDirectionToNode(const QQuick3DNode *node, const QVector3D &localDirection) const
922{
923 const auto sceneDirectionSelf = mapDirectionToScene(localDirection);
924 return node ? node->mapDirectionFromScene(sceneDirectionSelf) : sceneDirectionSelf;
925}
926
943{
944 const auto sceneDirectionOther = node ? node->mapDirectionToScene(localDirection) : localDirection;
945 return mapDirectionFromScene(sceneDirectionOther);
946}
947
949{
950 Q_D(QQuick3DNode);
951
952 d->markSceneTransformDirty();
954}
955
967{
968 const Q_D(QQuick3DNode);
969
970 return d->m_rotation;
971}
972
973void QQuick3DNode::itemChange(ItemChange change, const ItemChangeData &)
974{
975 if (change == QQuick3DObject::ItemParentHasChanged)
977}
978
Definition lalr.h:137
QGenericMatrix< M, N, T > transposed() const
Returns this matrix, transposed about its diagonal.
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
Definition qmatrix4x4.h:25
QMatrix3x3 normalMatrix() const
Returns the normal matrix corresponding to this 4x4 transformation.
QMatrix4x4 inverted(bool *invertible=nullptr) const
Returns the inverse of this matrix.
\inmodule QtCore
Definition qmetaobject.h:18
static QMetaMethod fromSignal(PointerToMemberFunction signal)
QObject * parent
Definition qobject.h:61
The QQuaternion class represents a quaternion consisting of a vector and scalar.
Definition qquaternion.h:21
static QQuaternion fromRotationMatrix(const QMatrix3x3 &rot3x3)
QQuaternion normalized() const
Returns the normalized unit form of this quaternion.
QMatrix3x3 toRotationMatrix() const
static QQuaternion fromAxisAndAngle(const QVector3D &axis, float angle)
Creates a normalized quaternion that corresponds to rotating through angle degrees about the specifie...
void setIsHiddenInEditor(bool isHidden)
bool isDirectionRelatedSignal(const QMetaMethod &signal) const
QMatrix4x4 localRotationMatrix() const
QMatrix4x4 sceneRotationMatrix() const
QQuick3DNodePrivate(QQuick3DObjectPrivate::Type t)
bool isSceneTransformRelatedSignal(const QMetaMethod &signal) const
static QQuick3DNodePrivate * get(QQuick3DNode *node)
QVector3D pivot
void eulerRotationChanged()
void rightChanged()
void rotationChanged()
void setRotation(const QQuaternion &rotation)
void setVisible(bool visible)
void connectNotify(const QMetaMethod &signal) override
virtual void itemChange(ItemChange, const ItemChangeData &) override
Q_INVOKABLE QVector3D mapDirectionFromNode(const QQuick3DNode *node, const QVector3D &localDirection) const
\qmlmethod vector3d QtQuick3D::Node::mapDirectionFromNode(QtQuick3D::Node node, vector3d localDirecti...
QVector3D sceneScale
Q_INVOKABLE QVector3D mapPositionFromScene(const QVector3D &scenePosition) const
\qmlmethod vector3d QtQuick3D::Node::mapPositionFromScene(vector3d scenePosition)
void disconnectNotify(const QMetaMethod &signal) override
QVector3D scenePosition
~QQuick3DNode() override
Q_INVOKABLE QVector3D mapDirectionFromScene(const QVector3D &sceneDirection) const
\qmlmethod vector3d QtQuick3D::Node::mapDirectionFromScene(vector3d sceneDirection)
void setEulerRotation(const QVector3D &eulerRotation)
void setScale(const QVector3D &scale)
Q_INVOKABLE void rotate(qreal degrees, const QVector3D &axis, QQuick3DNode::TransformSpace space)
\qmlmethod QtQuick3D::Node::rotate(real degrees, vector3d axis, enumeration space)
Q_INVOKABLE QVector3D mapPositionFromNode(const QQuick3DNode *node, const QVector3D &localPosition) const
\qmlmethod vector3d QtQuick3D::Node::mapPositionFromNode(QtQuick3D::Node node, vector3d localPosition...
void setPivot(const QVector3D &pivot)
void localOpacityChanged()
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
void visibleChanged()
void xChanged()
void setStaticFlags(int staticFlags)
void setLocalOpacity(float opacity)
void markAllDirty() override
QMatrix4x4 sceneTransform
void sceneScaleChanged()
void setPosition(const QVector3D &position)
QVector3D forward
Q_INVOKABLE QVector3D mapPositionToScene(const QVector3D &localPosition) const
\qmlmethod vector3d QtQuick3D::Node::mapPositionToScene(vector3d localPosition)
QVector3D right
void yChanged()
void positionChanged()
void zChanged()
void sceneRotationChanged()
QQuick3DNode * parentNode() const
Q_INVOKABLE QVector3D mapPositionToNode(const QQuick3DNode *node, const QVector3D &localPosition) const
\qmlmethod vector3d QtQuick3D::Node::mapPositionToNode(QtQuick3D::Node node, vector3d localPosition)
void scenePositionChanged()
QSSGRenderGraphObject * updateSpatialNode(QSSGRenderGraphObject *node) override
void pivotChanged()
QQuaternion rotation
float localOpacity() const
\qmlproperty real QtQuick3D::Node::opacity
void setY(float y)
Q_INVOKABLE QVector3D mapDirectionToScene(const QVector3D &localDirection) const
\qmlmethod vector3d QtQuick3D::Node::mapDirectionToScene(vector3d localDirection)
void sceneTransformChanged()
void setX(float x)
Q_INVOKABLE QVector3D mapDirectionToNode(const QQuick3DNode *node, const QVector3D &localDirection) const
\qmlmethod vector3d QtQuick3D::Node::mapDirectionToNode(QtQuick3D::Node node, vector3d localDirection...
QQuick3DNode(QQuick3DNode *parent=nullptr)
\qmltype Node \inherits Object3D \inqmlmodule QtQuick3D
QVector3D eulerRotation
void setZ(float z)
void scaleChanged()
void staticFlagsChanged()
QQuaternion sceneRotation
void forwardChanged()
QVector3D position
QVector3D scale
void upChanged()
QList< QQuick3DObject * > childItems
QQmlListProperty< QQuick3DObject > children()
static QQuick3DObjectPrivate * get(QQuick3DObject *item)
\qmltype Object3D \inqmlmodule QtQuick3D \instantiates QQuick3DObject \inherits QtObject
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
QQuick3DObject * parent
\qmlproperty Object3D QtQuick3D::Object3D::parent This property holds the parent of the Object3D in a...
virtual QSSGRenderGraphObject * updateSpatialNode(QSSGRenderGraphObject *node)
virtual void markAllDirty()
The QVector3D class represents a vector or vertex in 3D space.
Definition qvectornd.h:171
QVector3D normalized() const noexcept
Returns the normalized unit vector form of this vector.
Definition qvectornd.h:695
constexpr float y() const noexcept
Returns the y coordinate of this point.
Definition qvectornd.h:671
constexpr float x() const noexcept
Returns the x coordinate of this point.
Definition qvectornd.h:670
constexpr float z() const noexcept
Returns the z coordinate of this point.
Definition qvectornd.h:672
QMatrix3x3 toRotationMatrix() const
auto signal
void ensureDebugObjectName(T *node, QObject *src)
Combined button and popup list for selecting options.
QVector3D Q_QUICK3DUTILS_EXPORT transform(const QMatrix3x3 &m, const QVector3D &v)
Definition qssgutils.cpp:43
QMatrix3x3 Q_QUICK3DUTILS_EXPORT getUpper3x3(const QMatrix4x4 &m)
Definition qssgutils.cpp:51
void Q_QUICK3DUTILS_EXPORT normalize(QMatrix4x4 &m)
Definition qssgutils.cpp:57
QVector3D Q_QUICK3DUTILS_EXPORT transform(const QMatrix4x4 &m, const QVector3D &v)
Definition qssgutils.cpp:86
QVector3D Q_QUICK3DUTILS_EXPORT getScale(const QMatrix4x4 &m)
QVector3D Q_QUICK3DUTILS_EXPORT getPosition(const QMatrix4x4 &m)
Definition qssgutils.cpp:97
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
Definition qfloat16.h:287
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat z
GLint GLint GLint GLint GLint x
[0]
GLint y
GLdouble GLdouble t
Definition qopenglext.h:243
GLdouble GLdouble GLdouble GLdouble q
Definition qopenglext.h:259
GLenum GLenum GLenum GLenum GLenum scale
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
#define Q_ASSERT_X(cond, x, msg)
Definition qrandom.cpp:48
#define Q_EMIT
#define emit
double qreal
Definition qtypes.h:92
QLayoutItem * child
[0]
static Q_REQUIRED_RESULT constexpr bool isNodeType(Type type) Q_DECL_NOTHROW
static QMatrix4x4 calculateTransformMatrix(QVector3D position, QVector3D scale, QVector3D pivot, QQuaternion rotation)
Definition moc.h:24
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent