1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4//
5// W A R N I N G
6// -------------
7//
8// This file is not part of the Qt API. It exists purely as an
9// implementation detail. This header file may change from version to
10// version without notice, or even be removed.
11//
12// We mean it.
13//
14
15#ifndef LOOKATNODE_H
16#define LOOKATNODE_H
17
18#include <QtQuick3D/private/qquick3dnode_p.h>
19
20QT_BEGIN_NAMESPACE
21
22class LookAtNode : public QQuick3DNode
23{
24 Q_OBJECT
25 Q_PROPERTY(QQuick3DNode *target READ target WRITE setTarget NOTIFY targetChanged)
26 QML_NAMED_ELEMENT(LookAtNode)
27 QML_ADDED_IN_VERSION(6, 4)
28
29public:
30 LookAtNode();
31 ~LookAtNode() override;
32
33 QQuick3DNode *target() const;
34
35public Q_SLOTS:
36 void setTarget(QQuick3DNode *node);
37
38Q_SIGNALS:
39 void targetChanged();
40
41private Q_SLOTS:
42 void updateLookAt();
43
44private:
45 QQuick3DNode *m_target = nullptr;
46};
47
48QT_END_NAMESPACE
49
50#endif
51

source code of qtquick3d/src/helpers/lookatnode_p.h