1 | /* |
2 | --------------------------------------------------------------------------- |
3 | Open Asset Import Library (assimp) |
4 | --------------------------------------------------------------------------- |
5 | |
6 | Copyright (c) 2006-2017, assimp team |
7 | |
8 | |
9 | All rights reserved. |
10 | |
11 | Redistribution and use of this software in source and binary forms, |
12 | with or without modification, are permitted provided that the following |
13 | conditions are met: |
14 | |
15 | * Redistributions of source code must retain the above |
16 | copyright notice, this list of conditions and the |
17 | following disclaimer. |
18 | |
19 | * Redistributions in binary form must reproduce the above |
20 | copyright notice, this list of conditions and the |
21 | following disclaimer in the documentation and/or other |
22 | materials provided with the distribution. |
23 | |
24 | * Neither the name of the assimp team, nor the names of its |
25 | contributors may be used to endorse or promote products |
26 | derived from this software without specific prior |
27 | written permission of the assimp team. |
28 | |
29 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
30 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
31 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
32 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
33 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
34 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
35 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
36 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
37 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
38 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
39 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
40 | --------------------------------------------------------------------------- |
41 | */ |
42 | |
43 | /** @file ImporterRegistry.cpp |
44 | |
45 | Central registry for all importers available. Do not edit this file |
46 | directly (unless you are adding new loaders), instead use the |
47 | corresponding preprocessor flag to selectively disable formats. |
48 | */ |
49 | |
50 | #include <vector> |
51 | #include "BaseImporter.h" |
52 | |
53 | // ------------------------------------------------------------------------------------------------ |
54 | // Importers |
55 | // (include_new_importers_here) |
56 | // ------------------------------------------------------------------------------------------------ |
57 | #ifndef ASSIMP_BUILD_NO_X_IMPORTER |
58 | # include "XFileImporter.h" |
59 | #endif |
60 | #ifndef ASSIMP_BUILD_NO_AMF_IMPORTER |
61 | # include "AMFImporter.hpp" |
62 | #endif |
63 | #ifndef ASSIMP_BUILD_NO_3DS_IMPORTER |
64 | # include "3DSLoader.h" |
65 | #endif |
66 | #ifndef ASSIMP_BUILD_NO_MD3_IMPORTER |
67 | # include "MD3Loader.h" |
68 | #endif |
69 | #ifndef ASSIMP_BUILD_NO_MDL_IMPORTER |
70 | # include "MDLLoader.h" |
71 | #endif |
72 | #ifndef ASSIMP_BUILD_NO_MD2_IMPORTER |
73 | # include "MD2Loader.h" |
74 | #endif |
75 | #ifndef ASSIMP_BUILD_NO_PLY_IMPORTER |
76 | # include "PlyLoader.h" |
77 | #endif |
78 | #ifndef ASSIMP_BUILD_NO_ASE_IMPORTER |
79 | # include "ASELoader.h" |
80 | #endif |
81 | #ifndef ASSIMP_BUILD_NO_OBJ_IMPORTER |
82 | # include "ObjFileImporter.h" |
83 | #endif |
84 | #ifndef ASSIMP_BUILD_NO_HMP_IMPORTER |
85 | # include "HMPLoader.h" |
86 | #endif |
87 | #ifndef ASSIMP_BUILD_NO_SMD_IMPORTER |
88 | # include "SMDLoader.h" |
89 | #endif |
90 | #ifndef ASSIMP_BUILD_NO_MDC_IMPORTER |
91 | # include "MDCLoader.h" |
92 | #endif |
93 | #ifndef ASSIMP_BUILD_NO_MD5_IMPORTER |
94 | # include "MD5Loader.h" |
95 | #endif |
96 | #ifndef ASSIMP_BUILD_NO_STL_IMPORTER |
97 | # include "STLLoader.h" |
98 | #endif |
99 | #ifndef ASSIMP_BUILD_NO_LWO_IMPORTER |
100 | # include "LWOLoader.h" |
101 | #endif |
102 | #ifndef ASSIMP_BUILD_NO_DXF_IMPORTER |
103 | # include "DXFLoader.h" |
104 | #endif |
105 | #ifndef ASSIMP_BUILD_NO_NFF_IMPORTER |
106 | # include "NFFLoader.h" |
107 | #endif |
108 | #ifndef ASSIMP_BUILD_NO_RAW_IMPORTER |
109 | # include "RawLoader.h" |
110 | #endif |
111 | #ifndef ASSIMP_BUILD_NO_SIB_IMPORTER |
112 | # include "SIBImporter.h" |
113 | #endif |
114 | #ifndef ASSIMP_BUILD_NO_OFF_IMPORTER |
115 | # include "OFFLoader.h" |
116 | #endif |
117 | #ifndef ASSIMP_BUILD_NO_AC_IMPORTER |
118 | # include "ACLoader.h" |
119 | #endif |
120 | #ifndef ASSIMP_BUILD_NO_BVH_IMPORTER |
121 | # include "BVHLoader.h" |
122 | #endif |
123 | #ifndef ASSIMP_BUILD_NO_IRRMESH_IMPORTER |
124 | # include "IRRMeshLoader.h" |
125 | #endif |
126 | #ifndef ASSIMP_BUILD_NO_IRR_IMPORTER |
127 | # include "IRRLoader.h" |
128 | #endif |
129 | #ifndef ASSIMP_BUILD_NO_Q3D_IMPORTER |
130 | # include "Q3DLoader.h" |
131 | #endif |
132 | #ifndef ASSIMP_BUILD_NO_B3D_IMPORTER |
133 | # include "B3DImporter.h" |
134 | #endif |
135 | #ifndef ASSIMP_BUILD_NO_COLLADA_IMPORTER |
136 | # include "ColladaLoader.h" |
137 | #endif |
138 | #ifndef ASSIMP_BUILD_NO_TERRAGEN_IMPORTER |
139 | # include "TerragenLoader.h" |
140 | #endif |
141 | #ifndef ASSIMP_BUILD_NO_CSM_IMPORTER |
142 | # include "CSMLoader.h" |
143 | #endif |
144 | #ifndef ASSIMP_BUILD_NO_3D_IMPORTER |
145 | # include "UnrealLoader.h" |
146 | #endif |
147 | #ifndef ASSIMP_BUILD_NO_LWS_IMPORTER |
148 | # include "LWSLoader.h" |
149 | #endif |
150 | #ifndef ASSIMP_BUILD_NO_OGRE_IMPORTER |
151 | # include "OgreImporter.h" |
152 | #endif |
153 | #ifndef ASSIMP_BUILD_NO_OPENGEX_IMPORTER |
154 | # include "OpenGEXImporter.h" |
155 | #endif |
156 | #ifndef ASSIMP_BUILD_NO_MS3D_IMPORTER |
157 | # include "MS3DLoader.h" |
158 | #endif |
159 | #ifndef ASSIMP_BUILD_NO_COB_IMPORTER |
160 | # include "COBLoader.h" |
161 | #endif |
162 | #ifndef ASSIMP_BUILD_NO_BLEND_IMPORTER |
163 | # include "BlenderLoader.h" |
164 | #endif |
165 | #ifndef ASSIMP_BUILD_NO_Q3BSP_IMPORTER |
166 | # include "Q3BSPFileImporter.h" |
167 | #endif |
168 | #ifndef ASSIMP_BUILD_NO_NDO_IMPORTER |
169 | # include "NDOLoader.h" |
170 | #endif |
171 | #ifndef ASSIMP_BUILD_NO_IFC_IMPORTER |
172 | # include "IFCLoader.h" |
173 | #endif |
174 | #ifndef ASSIMP_BUILD_NO_XGL_IMPORTER |
175 | # include "XGLLoader.h" |
176 | #endif |
177 | #ifndef ASSIMP_BUILD_NO_FBX_IMPORTER |
178 | # include "FBXImporter.h" |
179 | #endif |
180 | #ifndef ASSIMP_BUILD_NO_ASSBIN_IMPORTER |
181 | # include "AssbinLoader.h" |
182 | #endif |
183 | #ifndef ASSIMP_BUILD_NO_GLTF_IMPORTER |
184 | # include "glTFImporter.h" |
185 | # include "glTF2Importer.h" |
186 | #endif |
187 | #ifndef ASSIMP_BUILD_NO_C4D_IMPORTER |
188 | # include "C4DImporter.h" |
189 | #endif |
190 | #ifndef ASSIMP_BUILD_NO_3MF_IMPORTER |
191 | # include "D3MFImporter.h" |
192 | #endif |
193 | #ifndef ASSIMP_BUILD_NO_X3D_IMPORTER |
194 | # include "X3DImporter.hpp" |
195 | #endif |
196 | #ifndef ASSIMP_BUILD_NO_MMD_IMPORTER |
197 | # include "MMDImporter.h" |
198 | #endif |
199 | |
200 | namespace Assimp { |
201 | |
202 | // ------------------------------------------------------------------------------------------------ |
203 | void GetImporterInstanceList(std::vector< BaseImporter* >& out) |
204 | { |
205 | // ---------------------------------------------------------------------------- |
206 | // Add an instance of each worker class here |
207 | // (register_new_importers_here) |
208 | // ---------------------------------------------------------------------------- |
209 | out.reserve(64); |
210 | #if (!defined ASSIMP_BUILD_NO_X_IMPORTER) |
211 | out.push_back( new XFileImporter()); |
212 | #endif |
213 | #if (!defined ASSIMP_BUILD_NO_OBJ_IMPORTER) |
214 | out.push_back( new ObjFileImporter()); |
215 | #endif |
216 | #ifndef ASSIMP_BUILD_NO_AMF_IMPORTER |
217 | out.push_back( new AMFImporter() ); |
218 | #endif |
219 | #if (!defined ASSIMP_BUILD_NO_3DS_IMPORTER) |
220 | out.push_back( new Discreet3DSImporter()); |
221 | #endif |
222 | #if (!defined ASSIMP_BUILD_NO_MD3_IMPORTER) |
223 | out.push_back( new MD3Importer()); |
224 | #endif |
225 | #if (!defined ASSIMP_BUILD_NO_MD2_IMPORTER) |
226 | out.push_back( new MD2Importer()); |
227 | #endif |
228 | #if (!defined ASSIMP_BUILD_NO_PLY_IMPORTER) |
229 | out.push_back( new PLYImporter()); |
230 | #endif |
231 | #if (!defined ASSIMP_BUILD_NO_MDL_IMPORTER) |
232 | out.push_back( new MDLImporter()); |
233 | #endif |
234 | #if (!defined ASSIMP_BUILD_NO_ASE_IMPORTER) |
235 | #if (!defined ASSIMP_BUILD_NO_3DS_IMPORTER) |
236 | out.push_back( new ASEImporter()); |
237 | # endif |
238 | #endif |
239 | #if (!defined ASSIMP_BUILD_NO_HMP_IMPORTER) |
240 | out.push_back( new HMPImporter()); |
241 | #endif |
242 | #if (!defined ASSIMP_BUILD_NO_SMD_IMPORTER) |
243 | out.push_back( new SMDImporter()); |
244 | #endif |
245 | #if (!defined ASSIMP_BUILD_NO_MDC_IMPORTER) |
246 | out.push_back( new MDCImporter()); |
247 | #endif |
248 | #if (!defined ASSIMP_BUILD_NO_MD5_IMPORTER) |
249 | out.push_back( new MD5Importer()); |
250 | #endif |
251 | #if (!defined ASSIMP_BUILD_NO_STL_IMPORTER) |
252 | out.push_back( new STLImporter()); |
253 | #endif |
254 | #if (!defined ASSIMP_BUILD_NO_LWO_IMPORTER) |
255 | out.push_back( new LWOImporter()); |
256 | #endif |
257 | #if (!defined ASSIMP_BUILD_NO_DXF_IMPORTER) |
258 | out.push_back( new DXFImporter()); |
259 | #endif |
260 | #if (!defined ASSIMP_BUILD_NO_NFF_IMPORTER) |
261 | out.push_back( new NFFImporter()); |
262 | #endif |
263 | #if (!defined ASSIMP_BUILD_NO_RAW_IMPORTER) |
264 | out.push_back( new RAWImporter()); |
265 | #endif |
266 | #if (!defined ASSIMP_BUILD_NO_SIB_IMPORTER) |
267 | out.push_back( new SIBImporter()); |
268 | #endif |
269 | #if (!defined ASSIMP_BUILD_NO_OFF_IMPORTER) |
270 | out.push_back( new OFFImporter()); |
271 | #endif |
272 | #if (!defined ASSIMP_BUILD_NO_AC_IMPORTER) |
273 | out.push_back( new AC3DImporter()); |
274 | #endif |
275 | #if (!defined ASSIMP_BUILD_NO_BVH_IMPORTER) |
276 | out.push_back( new BVHLoader()); |
277 | #endif |
278 | #if (!defined ASSIMP_BUILD_NO_IRRMESH_IMPORTER) |
279 | out.push_back( new IRRMeshImporter()); |
280 | #endif |
281 | #if (!defined ASSIMP_BUILD_NO_IRR_IMPORTER) |
282 | out.push_back( new IRRImporter()); |
283 | #endif |
284 | #if (!defined ASSIMP_BUILD_NO_Q3D_IMPORTER) |
285 | out.push_back( new Q3DImporter()); |
286 | #endif |
287 | #if (!defined ASSIMP_BUILD_NO_B3D_IMPORTER) |
288 | out.push_back( new B3DImporter()); |
289 | #endif |
290 | #if (!defined ASSIMP_BUILD_NO_COLLADA_IMPORTER) |
291 | out.push_back( new ColladaLoader()); |
292 | #endif |
293 | #if (!defined ASSIMP_BUILD_NO_TERRAGEN_IMPORTER) |
294 | out.push_back( new TerragenImporter()); |
295 | #endif |
296 | #if (!defined ASSIMP_BUILD_NO_CSM_IMPORTER) |
297 | out.push_back( new CSMImporter()); |
298 | #endif |
299 | #if (!defined ASSIMP_BUILD_NO_3D_IMPORTER) |
300 | out.push_back( new UnrealImporter()); |
301 | #endif |
302 | #if (!defined ASSIMP_BUILD_NO_LWS_IMPORTER) |
303 | out.push_back( new LWSImporter()); |
304 | #endif |
305 | #if (!defined ASSIMP_BUILD_NO_OGRE_IMPORTER) |
306 | out.push_back( new Ogre::OgreImporter()); |
307 | #endif |
308 | #if (!defined ASSIMP_BUILD_NO_OPENGEX_IMPORTER ) |
309 | out.push_back( new OpenGEX::OpenGEXImporter() ); |
310 | #endif |
311 | #if (!defined ASSIMP_BUILD_NO_MS3D_IMPORTER) |
312 | out.push_back( new MS3DImporter()); |
313 | #endif |
314 | #if (!defined ASSIMP_BUILD_NO_COB_IMPORTER) |
315 | out.push_back( new COBImporter()); |
316 | #endif |
317 | #if (!defined ASSIMP_BUILD_NO_BLEND_IMPORTER) |
318 | out.push_back( new BlenderImporter()); |
319 | #endif |
320 | #if (!defined ASSIMP_BUILD_NO_Q3BSP_IMPORTER) |
321 | out.push_back( new Q3BSPFileImporter() ); |
322 | #endif |
323 | #if (!defined ASSIMP_BUILD_NO_NDO_IMPORTER) |
324 | out.push_back( new NDOImporter() ); |
325 | #endif |
326 | #if (!defined ASSIMP_BUILD_NO_IFC_IMPORTER) |
327 | out.push_back( new IFCImporter() ); |
328 | #endif |
329 | #if ( !defined ASSIMP_BUILD_NO_XGL_IMPORTER ) |
330 | out.push_back( new XGLImporter() ); |
331 | #endif |
332 | #if ( !defined ASSIMP_BUILD_NO_FBX_IMPORTER ) |
333 | out.push_back( new FBXImporter() ); |
334 | #endif |
335 | #if ( !defined ASSIMP_BUILD_NO_ASSBIN_IMPORTER ) |
336 | out.push_back( new AssbinImporter() ); |
337 | #endif |
338 | #if ( !defined ASSIMP_BUILD_NO_GLTF_IMPORTER ) |
339 | out.push_back( new glTFImporter() ); |
340 | out.push_back( new glTF2Importer() ); |
341 | #endif |
342 | #if ( !defined ASSIMP_BUILD_NO_C4D_IMPORTER ) |
343 | out.push_back( new C4DImporter() ); |
344 | #endif |
345 | #if ( !defined ASSIMP_BUILD_NO_3MF_IMPORTER ) |
346 | out.push_back( new D3MFImporter() ); |
347 | #endif |
348 | #ifndef ASSIMP_BUILD_NO_X3D_IMPORTER |
349 | out.push_back( new X3DImporter() ); |
350 | #endif |
351 | #ifndef ASSIMP_BUILD_NO_MMD_IMPORTER |
352 | out.push_back( new MMDImporter() ); |
353 | #endif |
354 | } |
355 | |
356 | /** will delete all registered importers. */ |
357 | void DeleteImporterInstanceList(std::vector< BaseImporter* >& deleteList){ |
358 | for(size_t i= 0; i<deleteList.size();++i){ |
359 | delete deleteList[i]; |
360 | deleteList[i]=NULL; |
361 | }//for |
362 | } |
363 | |
364 | } // namespace Assimp |
365 | |