1 | // Copyright (C) 2016 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 "qt3dquick3dextrasplugin.h" |
5 | |
6 | #include <Qt3DExtras/qconegeometry.h> |
7 | #include <Qt3DExtras/qconegeometryview.h> |
8 | #include <Qt3DExtras/qconemesh.h> |
9 | #include <Qt3DExtras/qcuboidgeometry.h> |
10 | #include <Qt3DExtras/qcuboidgeometryview.h> |
11 | #include <Qt3DExtras/qcuboidmesh.h> |
12 | #include <Qt3DExtras/qcylindergeometry.h> |
13 | #include <Qt3DExtras/qcylindergeometryview.h> |
14 | #include <Qt3DExtras/qcylindermesh.h> |
15 | #include <Qt3DExtras/qdiffusemapmaterial.h> |
16 | #include <Qt3DExtras/qdiffusespecularmapmaterial.h> |
17 | #include <Qt3DExtras/qextrudedtextgeometry.h> |
18 | #include <Qt3DExtras/qextrudedtextmesh.h> |
19 | #include <Qt3DExtras/qfirstpersoncameracontroller.h> |
20 | #include <Qt3DExtras/qforwardrenderer.h> |
21 | #include <Qt3DExtras/qgoochmaterial.h> |
22 | #include <Qt3DExtras/qmetalroughmaterial.h> |
23 | #include <Qt3DExtras/qdiffusespecularmaterial.h> |
24 | #include <Qt3DExtras/qmorphphongmaterial.h> |
25 | #include <Qt3DExtras/qnormaldiffusemapalphamaterial.h> |
26 | #include <Qt3DExtras/qnormaldiffusemapmaterial.h> |
27 | #include <Qt3DExtras/qnormaldiffusespecularmapmaterial.h> |
28 | #include <Qt3DExtras/qorbitcameracontroller.h> |
29 | #include <Qt3DExtras/qpervertexcolormaterial.h> |
30 | #include <Qt3DExtras/qphongalphamaterial.h> |
31 | #include <Qt3DExtras/qphongmaterial.h> |
32 | #include <Qt3DExtras/qplanegeometry.h> |
33 | #include <Qt3DExtras/qplanegeometryview.h> |
34 | #include <Qt3DExtras/qplanemesh.h> |
35 | #include <Qt3DExtras/qskyboxentity.h> |
36 | #include <Qt3DExtras/qspheregeometry.h> |
37 | #include <Qt3DExtras/qspheregeometryview.h> |
38 | #include <Qt3DExtras/qspheremesh.h> |
39 | #include <Qt3DExtras/qspritegrid.h> |
40 | #include <Qt3DExtras/qspritesheetitem.h> |
41 | #include <Qt3DExtras/qtext2dentity.h> |
42 | #include <Qt3DExtras/qtexturematerial.h> |
43 | #include <Qt3DExtras/qtorusgeometry.h> |
44 | #include <Qt3DExtras/qtorusgeometryview.h> |
45 | #include <Qt3DExtras/qtorusmesh.h> |
46 | |
47 | #include <Qt3DQuickExtras/private/quick3dlevelofdetailloader_p.h> |
48 | #include <Qt3DQuickExtras/private/quick3dspritesheet_p.h> |
49 | |
50 | #include <QtQml/qqml.h> |
51 | |
52 | QT_BEGIN_NAMESPACE |
53 | |
54 | void Qt3DQuick3DExtrasPlugin::(const char *uri) |
55 | { |
56 | // Framegraphs |
57 | qmlRegisterType<Qt3DExtras::QForwardRenderer>(uri, versionMajor: 2, versionMinor: 0, qmlName: "ForwardRenderer" ); |
58 | qmlRegisterType<Qt3DExtras::QForwardRenderer, 9>(uri, versionMajor: 2, versionMinor: 9, qmlName: "ForwardRenderer" ); |
59 | qmlRegisterType<Qt3DExtras::QForwardRenderer, 14>(uri, versionMajor: 2, versionMinor: 14, qmlName: "ForwardRenderer" ); |
60 | qmlRegisterType<Qt3DExtras::QForwardRenderer, 15>(uri, versionMajor: 2, versionMinor: 15, qmlName: "ForwardRenderer" ); |
61 | |
62 | // Entities |
63 | qmlRegisterType<Qt3DExtras::QSkyboxEntity>(uri, versionMajor: 2, versionMinor: 0, qmlName: "SkyboxEntity" ); |
64 | qmlRegisterType<Qt3DExtras::QSkyboxEntity, 9>(uri, versionMajor: 2, versionMinor: 9, qmlName: "SkyboxEntity" ); |
65 | qmlRegisterType<Qt3DExtras::Extras::Quick::Quick3DLevelOfDetailLoader>(uri, versionMajor: 2, versionMinor: 9, qmlName: "LevelOfDetailLoader" ); |
66 | |
67 | // Camera Controllers |
68 | qmlRegisterType<Qt3DExtras::QFirstPersonCameraController>(uri, versionMajor: 2, versionMinor: 0, qmlName: "FirstPersonCameraController" ); |
69 | qmlRegisterType<Qt3DExtras::QOrbitCameraController>(uri, versionMajor: 2, versionMinor: 0, qmlName: "OrbitCameraController" ); |
70 | |
71 | // Materials |
72 | qmlRegisterType<Qt3DExtras::QPhongMaterial>(uri, versionMajor: 2, versionMinor: 0, qmlName: "PhongMaterial" ); |
73 | qmlRegisterType<Qt3DExtras::QPhongAlphaMaterial>(uri, versionMajor: 2, versionMinor: 0, qmlName: "PhongAlphaMaterial" ); |
74 | qmlRegisterType<Qt3DExtras::QDiffuseMapMaterial>(uri, versionMajor: 2, versionMinor: 0, qmlName: "DiffuseMapMaterial" ); |
75 | qmlRegisterType<Qt3DExtras::QDiffuseSpecularMapMaterial>(uri, versionMajor: 2, versionMinor: 0, qmlName: "DiffuseSpecularMapMaterial" ); |
76 | qmlRegisterType<Qt3DExtras::QNormalDiffuseMapAlphaMaterial>(uri, versionMajor: 2, versionMinor: 0, qmlName: "NormalDiffuseMapAlphaMaterial" ); |
77 | qmlRegisterType<Qt3DExtras::QNormalDiffuseMapMaterial>(uri, versionMajor: 2, versionMinor: 0, qmlName: "NormalDiffuseMapMaterial" ); |
78 | qmlRegisterType<Qt3DExtras::QNormalDiffuseSpecularMapMaterial>(uri, versionMajor: 2, versionMinor: 0, qmlName: "NormalDiffuseSpecularMapMaterial" ); |
79 | qmlRegisterType<Qt3DExtras::QPerVertexColorMaterial>(uri, versionMajor: 2, versionMinor: 0, qmlName: "PerVertexColorMaterial" ); |
80 | qmlRegisterType<Qt3DExtras::QGoochMaterial>(uri, versionMajor: 2, versionMinor: 0, qmlName: "GoochMaterial" ); |
81 | qmlRegisterType<Qt3DExtras::QTextureMaterial>(uri, versionMajor: 2, versionMinor: 0, qmlName: "TextureMaterial" ); |
82 | qmlRegisterType<Qt3DExtras::QTextureMaterial, 10>(uri, versionMajor: 2, versionMinor: 10, qmlName: "TextureMaterial" ); |
83 | qmlRegisterType<Qt3DExtras::QTextureMaterial, 11>(uri, versionMajor: 2, versionMinor: 11, qmlName: "TextureMaterial" ); |
84 | qmlRegisterType<Qt3DExtras::QDiffuseSpecularMaterial>(uri, versionMajor: 2, versionMinor: 10, qmlName: "DiffuseSpecularMaterial" ); |
85 | qmlRegisterType<Qt3DExtras::QMetalRoughMaterial>(uri, versionMajor: 2, versionMinor: 9, qmlName: "MetalRoughMaterial" ); |
86 | qmlRegisterType<Qt3DExtras::QMetalRoughMaterial, 10>(uri, versionMajor: 2, versionMinor: 10, qmlName: "MetalRoughMaterial" ); |
87 | |
88 | qmlRegisterType<Qt3DExtras::QSpriteGrid>(uri, versionMajor: 2, versionMinor: 10, qmlName: "SpriteGrid" ); |
89 | qmlRegisterType<Qt3DExtras::QSpriteSheetItem>(uri, versionMajor: 2, versionMinor: 10, qmlName: "SpriteItem" ); |
90 | Qt3DExtras::Quick::registerExtendedType<Qt3DExtras::QSpriteSheet, Qt3DExtras::Extras::Quick::Quick3DSpriteSheet>(className: "QSpriteSheet" , quickName: "Qt3D.Extras/SpriteSheet" , uri, major: 2, minor: 10, name: "SpriteSheet" ); |
91 | |
92 | // Meshes |
93 | qmlRegisterType<Qt3DExtras::QConeMesh>(uri, versionMajor: 2, versionMinor: 0, qmlName: "ConeMesh" ); |
94 | qmlRegisterType<Qt3DExtras::QConeGeometry>(uri, versionMajor: 2, versionMinor: 0, qmlName: "ConeGeometry" ); |
95 | qmlRegisterType<Qt3DExtras::QConeGeometryView>(uri, versionMajor: 2, versionMinor: 16, qmlName: "ConeGeometryView" ); |
96 | qmlRegisterType<Qt3DExtras::QCuboidMesh>(uri, versionMajor: 2, versionMinor: 0, qmlName: "CuboidMesh" ); |
97 | qmlRegisterType<Qt3DExtras::QCuboidGeometry>(uri, versionMajor: 2, versionMinor: 0, qmlName: "CuboidGeometry" ); |
98 | qmlRegisterType<Qt3DExtras::QCuboidGeometryView>(uri, versionMajor: 2, versionMinor: 16, qmlName: "CuboidGeometryView" ); |
99 | qmlRegisterType<Qt3DExtras::QCylinderMesh>(uri, versionMajor: 2, versionMinor: 0, qmlName: "CylinderMesh" ); |
100 | qmlRegisterType<Qt3DExtras::QCylinderGeometry>(uri, versionMajor: 2, versionMinor: 0, qmlName: "CylinderGeometry" ); |
101 | qmlRegisterType<Qt3DExtras::QCylinderGeometryView>(uri, versionMajor: 2, versionMinor: 16, qmlName: "CylinderGeometryView" ); |
102 | qmlRegisterType<Qt3DExtras::QPlaneMesh>(uri, versionMajor: 2, versionMinor: 0, qmlName: "PlaneMesh" ); |
103 | qmlRegisterType<Qt3DExtras::QPlaneMesh, 9>(uri, versionMajor: 2, versionMinor: 9, qmlName: "PlaneMesh" ); |
104 | qmlRegisterType<Qt3DExtras::QPlaneGeometry>(uri, versionMajor: 2, versionMinor: 0, qmlName: "PlaneGeometry" ); |
105 | qmlRegisterType<Qt3DExtras::QPlaneGeometryView>(uri, versionMajor: 2, versionMinor: 16, qmlName: "PlaneGeometryView" ); |
106 | qmlRegisterType<Qt3DExtras::QPlaneGeometry, 9>(uri, versionMajor: 2, versionMinor: 9, qmlName: "PlaneGeometry" ); |
107 | qmlRegisterType<Qt3DExtras::QTorusMesh>(uri, versionMajor: 2, versionMinor: 0, qmlName: "TorusMesh" ); |
108 | qmlRegisterType<Qt3DExtras::QTorusGeometry>(uri, versionMajor: 2, versionMinor: 0, qmlName: "TorusGeometry" ); |
109 | qmlRegisterType<Qt3DExtras::QTorusGeometryView>(uri, versionMajor: 2, versionMinor: 16, qmlName: "TorusGeometryView" ); |
110 | qmlRegisterType<Qt3DExtras::QSphereMesh>(uri, versionMajor: 2, versionMinor: 0, qmlName: "SphereMesh" ); |
111 | qmlRegisterType<Qt3DExtras::QSphereGeometry>(uri, versionMajor: 2, versionMinor: 0, qmlName: "SphereGeometry" ); |
112 | qmlRegisterType<Qt3DExtras::QSphereGeometryView>(uri, versionMajor: 2, versionMinor: 16, qmlName: "SphereGeometryView" ); |
113 | |
114 | // 3D Text |
115 | qmlRegisterType<Qt3DExtras::QExtrudedTextGeometry>(uri, versionMajor: 2, versionMinor: 9, qmlName: "ExtrudedTextGeometry" ); |
116 | qmlRegisterType<Qt3DExtras::QExtrudedTextMesh>(uri, versionMajor: 2, versionMinor: 9, qmlName: "ExtrudedTextMesh" ); |
117 | |
118 | qmlRegisterType<Qt3DExtras::QText2DEntity>(uri, versionMajor: 2, versionMinor: 9, qmlName: "Text2DEntity" ); |
119 | |
120 | // Auto-increment the import to stay in sync with ALL future Qt minor versions |
121 | qmlRegisterModule(uri, versionMajor: 2, versionMinor: 15); |
122 | } |
123 | |
124 | |
125 | QT_END_NAMESPACE |
126 | |
127 | #include "moc_qt3dquick3dextrasplugin.cpp" |
128 | |