1 | /**************************************************************************** |
2 | ** |
3 | ** Copyright (C) 2016 Klaralvdalens Datakonsult AB (KDAB). |
4 | ** Contact: https://www.qt.io/licensing/ |
5 | ** |
6 | ** This file is part of the Qt3D module of the Qt Toolkit. |
7 | ** |
8 | ** $QT_BEGIN_LICENSE:LGPL$ |
9 | ** Commercial License Usage |
10 | ** Licensees holding valid commercial Qt licenses may use this file in |
11 | ** accordance with the commercial license agreement provided with the |
12 | ** Software or, alternatively, in accordance with the terms contained in |
13 | ** a written agreement between you and The Qt Company. For licensing terms |
14 | ** and conditions see https://www.qt.io/terms-conditions. For further |
15 | ** information use the contact form at https://www.qt.io/contact-us. |
16 | ** |
17 | ** GNU Lesser General Public License Usage |
18 | ** Alternatively, this file may be used under the terms of the GNU Lesser |
19 | ** General Public License version 3 as published by the Free Software |
20 | ** Foundation and appearing in the file LICENSE.LGPL3 included in the |
21 | ** packaging of this file. Please review the following information to |
22 | ** ensure the GNU Lesser General Public License version 3 requirements |
23 | ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. |
24 | ** |
25 | ** GNU General Public License Usage |
26 | ** Alternatively, this file may be used under the terms of the GNU |
27 | ** General Public License version 2.0 or (at your option) the GNU General |
28 | ** Public license version 3 or any later version approved by the KDE Free |
29 | ** Qt Foundation. The licenses are as published by the Free Software |
30 | ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 |
31 | ** included in the packaging of this file. Please review the following |
32 | ** information to ensure the GNU General Public License requirements will |
33 | ** be met: https://www.gnu.org/licenses/gpl-2.0.html and |
34 | ** https://www.gnu.org/licenses/gpl-3.0.html. |
35 | ** |
36 | ** $QT_END_LICENSE$ |
37 | ** |
38 | ****************************************************************************/ |
39 | |
40 | #include "qt3dquick3dextrasplugin.h" |
41 | |
42 | #include <Qt3DExtras/qconegeometry.h> |
43 | #include <Qt3DExtras/qconemesh.h> |
44 | #include <Qt3DExtras/qcuboidgeometry.h> |
45 | #include <Qt3DExtras/qcuboidmesh.h> |
46 | #include <Qt3DExtras/qcylindergeometry.h> |
47 | #include <Qt3DExtras/qcylindermesh.h> |
48 | #include <Qt3DExtras/qdiffusemapmaterial.h> |
49 | #include <Qt3DExtras/qdiffusespecularmapmaterial.h> |
50 | #include <Qt3DExtras/qextrudedtextgeometry.h> |
51 | #include <Qt3DExtras/qextrudedtextmesh.h> |
52 | #include <Qt3DExtras/qfirstpersoncameracontroller.h> |
53 | #include <Qt3DExtras/qforwardrenderer.h> |
54 | #include <Qt3DExtras/qgoochmaterial.h> |
55 | #include <Qt3DExtras/qmetalroughmaterial.h> |
56 | #include <Qt3DExtras/qdiffusespecularmaterial.h> |
57 | #include <Qt3DExtras/qmorphphongmaterial.h> |
58 | #include <Qt3DExtras/qnormaldiffusemapalphamaterial.h> |
59 | #include <Qt3DExtras/qnormaldiffusemapmaterial.h> |
60 | #include <Qt3DExtras/qnormaldiffusespecularmapmaterial.h> |
61 | #include <Qt3DExtras/qorbitcameracontroller.h> |
62 | #include <Qt3DExtras/qpervertexcolormaterial.h> |
63 | #include <Qt3DExtras/qphongalphamaterial.h> |
64 | #include <Qt3DExtras/qphongmaterial.h> |
65 | #include <Qt3DExtras/qplanegeometry.h> |
66 | #include <Qt3DExtras/qplanemesh.h> |
67 | #include <Qt3DExtras/qskyboxentity.h> |
68 | #include <Qt3DExtras/qspheregeometry.h> |
69 | #include <Qt3DExtras/qspheremesh.h> |
70 | #include <Qt3DExtras/qspritegrid.h> |
71 | #include <Qt3DExtras/qspritesheetitem.h> |
72 | #include <Qt3DExtras/qtext2dentity.h> |
73 | #include <Qt3DExtras/qtexturematerial.h> |
74 | #include <Qt3DExtras/qtexturedmetalroughmaterial.h> |
75 | #include <Qt3DExtras/qtorusgeometry.h> |
76 | #include <Qt3DExtras/qtorusmesh.h> |
77 | |
78 | #include <Qt3DQuickExtras/private/quick3dlevelofdetailloader_p.h> |
79 | #include <Qt3DQuickExtras/private/quick3dspritesheet_p.h> |
80 | |
81 | #include <QtQml/qqml.h> |
82 | |
83 | QT_BEGIN_NAMESPACE |
84 | |
85 | void Qt3DQuick3DExtrasPlugin::(const char *uri) |
86 | { |
87 | // Framegraphs |
88 | qmlRegisterType<Qt3DExtras::QForwardRenderer>(uri, versionMajor: 2, versionMinor: 0, qmlName: "ForwardRenderer" ); |
89 | qmlRegisterType<Qt3DExtras::QForwardRenderer, 9>(uri, versionMajor: 2, versionMinor: 9, qmlName: "ForwardRenderer" ); |
90 | qmlRegisterType<Qt3DExtras::QForwardRenderer, 14>(uri, versionMajor: 2, versionMinor: 14, qmlName: "ForwardRenderer" ); |
91 | qmlRegisterType<Qt3DExtras::QForwardRenderer, 15>(uri, versionMajor: 2, versionMinor: 15, qmlName: "ForwardRenderer" ); |
92 | |
93 | // Entities |
94 | qmlRegisterType<Qt3DExtras::QSkyboxEntity>(uri, versionMajor: 2, versionMinor: 0, qmlName: "SkyboxEntity" ); |
95 | qmlRegisterType<Qt3DExtras::QSkyboxEntity, 9>(uri, versionMajor: 2, versionMinor: 9, qmlName: "SkyboxEntity" ); |
96 | qmlRegisterType<Qt3DExtras::Extras::Quick::Quick3DLevelOfDetailLoader>(uri, versionMajor: 2, versionMinor: 9, qmlName: "LevelOfDetailLoader" ); |
97 | |
98 | // Camera Controllers |
99 | qmlRegisterType<Qt3DExtras::QFirstPersonCameraController>(uri, versionMajor: 2, versionMinor: 0, qmlName: "FirstPersonCameraController" ); |
100 | qmlRegisterType<Qt3DExtras::QOrbitCameraController>(uri, versionMajor: 2, versionMinor: 0, qmlName: "OrbitCameraController" ); |
101 | |
102 | // Materials |
103 | qmlRegisterType<Qt3DExtras::QPhongMaterial>(uri, versionMajor: 2, versionMinor: 0, qmlName: "PhongMaterial" ); |
104 | qmlRegisterType<Qt3DExtras::QPhongAlphaMaterial>(uri, versionMajor: 2, versionMinor: 0, qmlName: "PhongAlphaMaterial" ); |
105 | qmlRegisterType<Qt3DExtras::QDiffuseMapMaterial>(uri, versionMajor: 2, versionMinor: 0, qmlName: "DiffuseMapMaterial" ); |
106 | qmlRegisterType<Qt3DExtras::QDiffuseSpecularMapMaterial>(uri, versionMajor: 2, versionMinor: 0, qmlName: "DiffuseSpecularMapMaterial" ); |
107 | qmlRegisterType<Qt3DExtras::QNormalDiffuseMapAlphaMaterial>(uri, versionMajor: 2, versionMinor: 0, qmlName: "NormalDiffuseMapAlphaMaterial" ); |
108 | qmlRegisterType<Qt3DExtras::QNormalDiffuseMapMaterial>(uri, versionMajor: 2, versionMinor: 0, qmlName: "NormalDiffuseMapMaterial" ); |
109 | qmlRegisterType<Qt3DExtras::QNormalDiffuseSpecularMapMaterial>(uri, versionMajor: 2, versionMinor: 0, qmlName: "NormalDiffuseSpecularMapMaterial" ); |
110 | qmlRegisterType<Qt3DExtras::QPerVertexColorMaterial>(uri, versionMajor: 2, versionMinor: 0, qmlName: "PerVertexColorMaterial" ); |
111 | qmlRegisterType<Qt3DExtras::QGoochMaterial>(uri, versionMajor: 2, versionMinor: 0, qmlName: "GoochMaterial" ); |
112 | qmlRegisterType<Qt3DExtras::QTextureMaterial>(uri, versionMajor: 2, versionMinor: 0, qmlName: "TextureMaterial" ); |
113 | qmlRegisterType<Qt3DExtras::QTextureMaterial, 10>(uri, versionMajor: 2, versionMinor: 10, qmlName: "TextureMaterial" ); |
114 | qmlRegisterType<Qt3DExtras::QTextureMaterial, 11>(uri, versionMajor: 2, versionMinor: 11, qmlName: "TextureMaterial" ); |
115 | qmlRegisterType<Qt3DExtras::QDiffuseSpecularMaterial>(uri, versionMajor: 2, versionMinor: 10, qmlName: "DiffuseSpecularMaterial" ); |
116 | qmlRegisterType<Qt3DExtras::QMetalRoughMaterial>(uri, versionMajor: 2, versionMinor: 9, qmlName: "MetalRoughMaterial" ); |
117 | qmlRegisterType<Qt3DExtras::QMetalRoughMaterial, 10>(uri, versionMajor: 2, versionMinor: 10, qmlName: "MetalRoughMaterial" ); |
118 | QT_WARNING_PUSH |
119 | QT_WARNING_DISABLE_DEPRECATED |
120 | qmlRegisterType<Qt3DExtras::QTexturedMetalRoughMaterial>(uri, versionMajor: 2, versionMinor: 9, qmlName: "TexturedMetalRoughMaterial" ); |
121 | QT_WARNING_POP |
122 | qmlRegisterType<Qt3DExtras::QMorphPhongMaterial>(uri, versionMajor: 2, versionMinor: 9, qmlName: "MorphPhongMaterial" ); |
123 | |
124 | qmlRegisterType<Qt3DExtras::QSpriteGrid>(uri, versionMajor: 2, versionMinor: 10, qmlName: "SpriteGrid" ); |
125 | qmlRegisterType<Qt3DExtras::QSpriteSheetItem>(uri, versionMajor: 2, versionMinor: 10, qmlName: "SpriteItem" ); |
126 | Qt3DExtras::Quick::registerExtendedType<Qt3DExtras::QSpriteSheet, Qt3DExtras::Extras::Quick::Quick3DSpriteSheet>(className: "QSpriteSheet" , quickName: "Qt3D.Extras/SpriteSheet" , uri, major: 2, minor: 10, name: "SpriteSheet" ); |
127 | |
128 | // Meshes |
129 | qmlRegisterType<Qt3DExtras::QConeMesh>(uri, versionMajor: 2, versionMinor: 0, qmlName: "ConeMesh" ); |
130 | qmlRegisterType<Qt3DExtras::QConeGeometry>(uri, versionMajor: 2, versionMinor: 0, qmlName: "ConeGeometry" ); |
131 | qmlRegisterType<Qt3DExtras::QCuboidMesh>(uri, versionMajor: 2, versionMinor: 0, qmlName: "CuboidMesh" ); |
132 | qmlRegisterType<Qt3DExtras::QCuboidGeometry>(uri, versionMajor: 2, versionMinor: 0, qmlName: "CuboidGeometry" ); |
133 | qmlRegisterType<Qt3DExtras::QCylinderMesh>(uri, versionMajor: 2, versionMinor: 0, qmlName: "CylinderMesh" ); |
134 | qmlRegisterType<Qt3DExtras::QCylinderGeometry>(uri, versionMajor: 2, versionMinor: 0, qmlName: "CylinderGeometry" ); |
135 | qmlRegisterType<Qt3DExtras::QPlaneMesh>(uri, versionMajor: 2, versionMinor: 0, qmlName: "PlaneMesh" ); |
136 | qmlRegisterType<Qt3DExtras::QPlaneMesh, 9>(uri, versionMajor: 2, versionMinor: 9, qmlName: "PlaneMesh" ); |
137 | qmlRegisterType<Qt3DExtras::QPlaneGeometry>(uri, versionMajor: 2, versionMinor: 0, qmlName: "PlaneGeometry" ); |
138 | qmlRegisterType<Qt3DExtras::QPlaneGeometry, 9>(uri, versionMajor: 2, versionMinor: 9, qmlName: "PlaneGeometry" ); |
139 | qmlRegisterType<Qt3DExtras::QTorusMesh>(uri, versionMajor: 2, versionMinor: 0, qmlName: "TorusMesh" ); |
140 | qmlRegisterType<Qt3DExtras::QTorusGeometry>(uri, versionMajor: 2, versionMinor: 0, qmlName: "TorusGeometry" ); |
141 | qmlRegisterType<Qt3DExtras::QSphereMesh>(uri, versionMajor: 2, versionMinor: 0, qmlName: "SphereMesh" ); |
142 | qmlRegisterType<Qt3DExtras::QSphereGeometry>(uri, versionMajor: 2, versionMinor: 0, qmlName: "SphereGeometry" ); |
143 | |
144 | // 3D Text |
145 | qmlRegisterType<Qt3DExtras::QExtrudedTextGeometry>(uri, versionMajor: 2, versionMinor: 9, qmlName: "ExtrudedTextGeometry" ); |
146 | qmlRegisterType<Qt3DExtras::QExtrudedTextMesh>(uri, versionMajor: 2, versionMinor: 9, qmlName: "ExtrudedTextMesh" ); |
147 | |
148 | qmlRegisterType<Qt3DExtras::QText2DEntity>(uri, versionMajor: 2, versionMinor: 9, qmlName: "Text2DEntity" ); |
149 | |
150 | // Auto-increment the import to stay in sync with ALL future Qt minor versions |
151 | qmlRegisterModule(uri, versionMajor: 2, QT_VERSION_MINOR); |
152 | } |
153 | |
154 | |
155 | QT_END_NAMESPACE |
156 | |