1// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "qt3dquick3dcoreplugin.h"
5
6#include <Qt3DCore/qarmature.h>
7#include <Qt3DCore/qabstractskeleton.h>
8#include <Qt3DCore/qskeletonloader.h>
9#include <Qt3DCore/qtransform.h>
10#include <Qt3DCore/qjoint.h>
11#include <Qt3DCore/qattribute.h>
12#include <Qt3DCore/qbuffer.h>
13#include <Qt3DCore/qgeometry.h>
14#include <Qt3DCore/qgeometryview.h>
15#include <Qt3DCore/qboundingvolume.h>
16#include <QtCore/qvariantanimation.h>
17
18#include <Qt3DQuick/private/quick3dentity_p.h>
19#include <Qt3DQuick/private/quick3dentityloader_p.h>
20#include <Qt3DQuick/private/quick3dnodeinstantiator_p.h>
21#include <Qt3DQuick/private/quick3djoint_p.h>
22#include <Qt3DQuick/private/qquaternionanimation_p.h>
23#include <Qt3DQuick/private/qt3dquick_global_p.h>
24#include <Qt3DQuick/private/quick3dbuffer_p.h>
25#include <Qt3DQuick/private/quick3dgeometry_p.h>
26
27#include <QtQml/qqml.h>
28
29QT_BEGIN_NAMESPACE
30
31extern void qml_register_types_Qt3D_Core();
32Q_GHS_KEEP_REFERENCE(qml_register_types_Qt3D_Core);
33
34Qt3DQuick3DCorePlugin::Qt3DQuick3DCorePlugin(QObject *parent)
35 : QQmlExtensionPlugin(parent)
36{
37 volatile auto registration = &qml_register_types_Qt3D_Core;
38 Q_UNUSED(registration);
39}
40
41void Qt3DQuick3DCorePlugin::registerTypes(const char *uri)
42{
43 Q_UNUSED(uri);
44 Qt3DCore::Quick::Quick3D_initialize();
45 Qt3DCore::Quick::Quick3D_registerType(className: "QEntity", quickName: "Qt3D.Core/Entity", major: 2, minor: 0);
46 Qt3DCore::Quick::Quick3D_registerType(className: "QGeometry", quickName: "Qt3D.Core/Geometry", major: 2, minor: 0);
47 qRegisterAnimationInterpolator<QQuaternion>(func: Qt3DCore::Quick::q_quaternionInterpolator);
48}
49
50Qt3DQuick3DCorePlugin::~Qt3DQuick3DCorePlugin()
51{
52 Qt3DCore::Quick::Quick3D_uninitialize();
53}
54
55QT_END_NAMESPACE
56
57#include "moc_qt3dquick3dcoreplugin.cpp"
58

source code of qt3d/src/quick3d/imports/core/qt3dquick3dcoreplugin.cpp