1 | /* |
2 | --------------------------------------------------------------------------- |
3 | Open Asset Import Library (assimp) |
4 | --------------------------------------------------------------------------- |
5 | |
6 | Copyright (c) 2006-2024, 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 config.h |
44 | * @brief Defines constants for configurable properties for the library |
45 | * |
46 | * Typically these properties are set via |
47 | * #Assimp::Importer::SetPropertyFloat, |
48 | * #Assimp::Importer::SetPropertyInteger or |
49 | * #Assimp::Importer::SetPropertyString, |
50 | * depending on the data type of a property. All properties have a |
51 | * default value. See the doc for the mentioned methods for more details. |
52 | * |
53 | * <br><br> |
54 | * The corresponding functions for use with the plain-c API are: |
55 | * #aiSetImportPropertyInteger, |
56 | * #aiSetImportPropertyFloat, |
57 | * #aiSetImportPropertyString |
58 | */ |
59 | #pragma once |
60 | #ifndef AI_CONFIG_H_INC |
61 | #define AI_CONFIG_H_INC |
62 | |
63 | // ignore build warinings of 3rd party submodule |
64 | #if defined(__clang__) |
65 | #pragma clang diagnostic ignored "-Winconsistent-missing-override" |
66 | #pragma clang diagnostic ignored "-Wdeprecated-copy" |
67 | #elif defined(__GNUC__) |
68 | #pragma GCC diagnostic ignored "-Wsuggest-override" |
69 | #if defined(__cplusplus) |
70 | #pragma GCC diagnostic ignored "-Wreorder" |
71 | #pragma GCC diagnostic ignored "-Wdeprecated-copy" |
72 | #endif |
73 | #endif |
74 | |
75 | // ########################################################################### |
76 | // LIBRARY SETTINGS |
77 | // General, global settings |
78 | // ########################################################################### |
79 | |
80 | // --------------------------------------------------------------------------- |
81 | /** @brief Enables time measurements. |
82 | * |
83 | * If enabled, measures the time needed for each part of the loading |
84 | * process (i.e. IO time, importing, postprocessing, ..) and dumps |
85 | * these timings to the DefaultLogger. See the @link perf Performance |
86 | * Page@endlink for more information on this topic. |
87 | * |
88 | * Property type: bool. Default value: false. |
89 | */ |
90 | #define AI_CONFIG_GLOB_MEASURE_TIME \ |
91 | "GLOB_MEASURE_TIME" |
92 | |
93 | |
94 | // --------------------------------------------------------------------------- |
95 | /** @brief Global setting to disable generation of skeleton dummy meshes |
96 | * |
97 | * Skeleton dummy meshes are generated as a visualization aid in cases which |
98 | * the input data contains no geometry, but only animation data. |
99 | * Property data type: bool. Default value: false |
100 | */ |
101 | // --------------------------------------------------------------------------- |
102 | #define AI_CONFIG_IMPORT_NO_SKELETON_MESHES \ |
103 | "IMPORT_NO_SKELETON_MESHES" |
104 | |
105 | // ########################################################################### |
106 | // POST PROCESSING SETTINGS |
107 | // Various stuff to fine-tune the behavior of a specific post processing step. |
108 | // ########################################################################### |
109 | |
110 | |
111 | // --------------------------------------------------------------------------- |
112 | /** @brief Maximum bone count per mesh for the SplitbyBoneCount step. |
113 | * |
114 | * Meshes are split until the maximum number of bones is reached. The default |
115 | * value is AI_SBBC_DEFAULT_MAX_BONES, which may be altered at |
116 | * compile-time. |
117 | * Property data type: integer. |
118 | */ |
119 | // --------------------------------------------------------------------------- |
120 | #define AI_CONFIG_PP_SBBC_MAX_BONES \ |
121 | "PP_SBBC_MAX_BONES" |
122 | |
123 | |
124 | // default limit for bone count |
125 | #if (!defined AI_SBBC_DEFAULT_MAX_BONES) |
126 | # define AI_SBBC_DEFAULT_MAX_BONES 60 |
127 | #endif |
128 | |
129 | |
130 | // --------------------------------------------------------------------------- |
131 | /** @brief Specifies the maximum angle that may be between two vertex tangents |
132 | * that their tangents and bi-tangents are smoothed. |
133 | * |
134 | * This applies to the CalcTangentSpace-Step. The angle is specified |
135 | * in degrees. The maximum value is 175. |
136 | * Property type: float. Default value: 45 degrees |
137 | */ |
138 | #define AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE \ |
139 | "PP_CT_MAX_SMOOTHING_ANGLE" |
140 | |
141 | // --------------------------------------------------------------------------- |
142 | /** @brief Source UV channel for tangent space computation. |
143 | * |
144 | * The specified channel must exist or an error will be raised. |
145 | * Property type: integer. Default value: 0 |
146 | */ |
147 | // --------------------------------------------------------------------------- |
148 | #define AI_CONFIG_PP_CT_TEXTURE_CHANNEL_INDEX \ |
149 | "PP_CT_TEXTURE_CHANNEL_INDEX" |
150 | |
151 | // --------------------------------------------------------------------------- |
152 | /** @brief Specifies the maximum angle that may be between two face normals |
153 | * at the same vertex position that their are smoothed together. |
154 | * |
155 | * Sometimes referred to as 'crease angle'. |
156 | * This applies to the GenSmoothNormals-Step. The angle is specified |
157 | * in degrees, so 180 is PI. The default value is 175 degrees (all vertex |
158 | * normals are smoothed). The maximum value is 175, too. Property type: float. |
159 | * Warning: setting this option may cause a severe loss of performance. The |
160 | * performance is unaffected if the #AI_CONFIG_FAVOUR_SPEED flag is set but |
161 | * the output quality may be reduced. |
162 | */ |
163 | #define AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE \ |
164 | "PP_GSN_MAX_SMOOTHING_ANGLE" |
165 | |
166 | |
167 | // --------------------------------------------------------------------------- |
168 | /** @brief Sets the colormap (= palette) to be used to decode embedded |
169 | * textures in MDL (Quake or 3DGS) files. |
170 | * |
171 | * This must be a valid path to a file. The file is 768 (256*3) bytes |
172 | * large and contains RGB triplets for each of the 256 palette entries. |
173 | * The default value is colormap.lmp. If the file is not found, |
174 | * a default palette (from Quake 1) is used. |
175 | * Property type: string. |
176 | */ |
177 | #define AI_CONFIG_IMPORT_MDL_COLORMAP \ |
178 | "IMPORT_MDL_COLORMAP" |
179 | |
180 | // --------------------------------------------------------------------------- |
181 | /** @brief Configures the #aiProcess_RemoveRedundantMaterials step to |
182 | * keep materials matching a name in a given list. |
183 | * |
184 | * This is a list of 1 to n strings, ' ' serves as delimiter character. |
185 | * Identifiers containing whitespaces must be enclosed in *single* |
186 | * quotation marks. For example:<tt> |
187 | * "keep-me and_me_to anotherMaterialToBeKept \'name with whitespace\'"</tt>. |
188 | * If a material matches on of these names, it will not be modified or |
189 | * removed by the postprocessing step nor will other materials be replaced |
190 | * by a reference to it. <br> |
191 | * This option might be useful if you are using some magic material names |
192 | * to pass additional semantics through the content pipeline. This ensures |
193 | * they won't be optimized away, but a general optimization is still |
194 | * performed for materials not contained in the list. |
195 | * Property type: String. Default value: n/a |
196 | * @note Linefeeds, tabs or carriage returns are treated as whitespace. |
197 | * Material names are case sensitive. |
198 | */ |
199 | #define AI_CONFIG_PP_RRM_EXCLUDE_LIST \ |
200 | "PP_RRM_EXCLUDE_LIST" |
201 | |
202 | // --------------------------------------------------------------------------- |
203 | /** @brief Configures the #aiProcess_PreTransformVertices step to |
204 | * keep the scene hierarchy. Meshes are moved to worldspace, but |
205 | * no optimization is performed (read: meshes with equal materials are not |
206 | * joined. The total number of meshes won't change). |
207 | * |
208 | * This option could be of use for you if the scene hierarchy contains |
209 | * important additional information which you intend to parse. |
210 | * For rendering, you can still render all meshes in the scene without |
211 | * any transformations. |
212 | * Property type: bool. Default value: false. |
213 | */ |
214 | #define AI_CONFIG_PP_PTV_KEEP_HIERARCHY \ |
215 | "PP_PTV_KEEP_HIERARCHY" |
216 | |
217 | // --------------------------------------------------------------------------- |
218 | /** @brief Configures the #aiProcess_PreTransformVertices step to normalize |
219 | * all vertex components into the [-1,1] range. That is, a bounding box |
220 | * for the whole scene is computed, the maximum component is taken and all |
221 | * meshes are scaled appropriately (uniformly of course!). |
222 | * This might be useful if you don't know the spatial dimension of the input |
223 | * data*/ |
224 | #define AI_CONFIG_PP_PTV_NORMALIZE \ |
225 | "PP_PTV_NORMALIZE" |
226 | |
227 | // --------------------------------------------------------------------------- |
228 | /** @brief Configures the #aiProcess_PreTransformVertices step to use |
229 | * a users defined matrix as the scene root node transformation before |
230 | * transforming vertices. |
231 | * Property type: bool. Default value: false. |
232 | */ |
233 | #define AI_CONFIG_PP_PTV_ADD_ROOT_TRANSFORMATION \ |
234 | "PP_PTV_ADD_ROOT_TRANSFORMATION" |
235 | |
236 | // --------------------------------------------------------------------------- |
237 | /** @brief Configures the #aiProcess_PreTransformVertices step to use |
238 | * a users defined matrix as the scene root node transformation before |
239 | * transforming vertices. This property correspond to the 'a1' component |
240 | * of the transformation matrix. |
241 | * Property type: aiMatrix4x4. |
242 | */ |
243 | #define AI_CONFIG_PP_PTV_ROOT_TRANSFORMATION \ |
244 | "PP_PTV_ROOT_TRANSFORMATION" |
245 | |
246 | // --------------------------------------------------------------------------- |
247 | /** @brief Set epsilon to check the identity of the matrix 4x4. |
248 | * |
249 | * This is used by aiMatrix4x4t<TReal>::IsIdentity(const TReal epsilon). |
250 | * @note The default value is 10e-3f for backward compatibility of legacy code. |
251 | * Property type: Float. |
252 | */ |
253 | #define AI_CONFIG_CHECK_IDENTITY_MATRIX_EPSILON \ |
254 | "CHECK_IDENTITY_MATRIX_EPSILON" |
255 | // default value for AI_CONFIG_CHECK_IDENTITY_MATRIX_EPSILON |
256 | #if (!defined AI_CONFIG_CHECK_IDENTITY_MATRIX_EPSILON_DEFAULT) |
257 | # define AI_CONFIG_CHECK_IDENTITY_MATRIX_EPSILON_DEFAULT 10e-3f |
258 | #endif |
259 | |
260 | // --------------------------------------------------------------------------- |
261 | /** @brief Configures the #aiProcess_FindDegenerates step to |
262 | * remove degenerated primitives from the import - immediately. |
263 | * |
264 | * The default behaviour converts degenerated triangles to lines and |
265 | * degenerated lines to points. See the documentation to the |
266 | * #aiProcess_FindDegenerates step for a detailed example of the various ways |
267 | * to get rid of these lines and points if you don't want them. |
268 | * Property type: bool. Default value: false. |
269 | */ |
270 | #define AI_CONFIG_PP_FD_REMOVE \ |
271 | "PP_FD_REMOVE" |
272 | |
273 | // --------------------------------------------------------------------------- |
274 | /** |
275 | * @brief Configures the #aiProcess_FindDegenerates to check the area of a |
276 | * triangle to be greater than e-6. If this is not the case the triangle will |
277 | * be removed if #AI_CONFIG_PP_FD_REMOVE is set to true. |
278 | */ |
279 | #define AI_CONFIG_PP_FD_CHECKAREA \ |
280 | "PP_FD_CHECKAREA" |
281 | |
282 | // --------------------------------------------------------------------------- |
283 | /** @brief Configures the #aiProcess_OptimizeGraph step to preserve nodes |
284 | * matching a name in a given list. |
285 | * |
286 | * This is a list of 1 to n strings, ' ' serves as delimiter character. |
287 | * Identifiers containing whitespaces must be enclosed in *single* |
288 | * quotation marks. For example:<tt> |
289 | * "keep-me and_me_to anotherNodeToBeKept \'name with whitespace\'"</tt>. |
290 | * If a node matches on of these names, it will not be modified or |
291 | * removed by the postprocessing step.<br> |
292 | * This option might be useful if you are using some magic node names |
293 | * to pass additional semantics through the content pipeline. This ensures |
294 | * they won't be optimized away, but a general optimization is still |
295 | * performed for nodes not contained in the list. |
296 | * Property type: String. Default value: n/a |
297 | * @note Linefeeds, tabs or carriage returns are treated as whitespace. |
298 | * Node names are case sensitive. |
299 | */ |
300 | #define AI_CONFIG_PP_OG_EXCLUDE_LIST \ |
301 | "PP_OG_EXCLUDE_LIST" |
302 | |
303 | // --------------------------------------------------------------------------- |
304 | /** @brief Set the maximum number of triangles in a mesh. |
305 | * |
306 | * This is used by the "SplitLargeMeshes" PostProcess-Step to determine |
307 | * whether a mesh must be split or not. |
308 | * @note The default value is AI_SLM_DEFAULT_MAX_TRIANGLES |
309 | * Property type: integer. |
310 | */ |
311 | #define AI_CONFIG_PP_SLM_TRIANGLE_LIMIT \ |
312 | "PP_SLM_TRIANGLE_LIMIT" |
313 | |
314 | // default value for AI_CONFIG_PP_SLM_TRIANGLE_LIMIT |
315 | #if (!defined AI_SLM_DEFAULT_MAX_TRIANGLES) |
316 | # define AI_SLM_DEFAULT_MAX_TRIANGLES 1000000 |
317 | #endif |
318 | |
319 | // --------------------------------------------------------------------------- |
320 | /** @brief Set the maximum number of vertices in a mesh. |
321 | * |
322 | * This is used by the "SplitLargeMeshes" PostProcess-Step to determine |
323 | * whether a mesh must be split or not. |
324 | * @note The default value is AI_SLM_DEFAULT_MAX_VERTICES |
325 | * Property type: integer. |
326 | */ |
327 | #define AI_CONFIG_PP_SLM_VERTEX_LIMIT \ |
328 | "PP_SLM_VERTEX_LIMIT" |
329 | |
330 | // default value for AI_CONFIG_PP_SLM_VERTEX_LIMIT |
331 | #if (!defined AI_SLM_DEFAULT_MAX_VERTICES) |
332 | # define AI_SLM_DEFAULT_MAX_VERTICES 1000000 |
333 | #endif |
334 | |
335 | // --------------------------------------------------------------------------- |
336 | /** @brief Set the maximum number of bones affecting a single vertex |
337 | * |
338 | * This is used by the #aiProcess_LimitBoneWeights PostProcess-Step. |
339 | * @note The default value is AI_LMW_MAX_WEIGHTS |
340 | * Property type: integer.*/ |
341 | #define AI_CONFIG_PP_LBW_MAX_WEIGHTS \ |
342 | "PP_LBW_MAX_WEIGHTS" |
343 | |
344 | // default value for AI_CONFIG_PP_LBW_MAX_WEIGHTS |
345 | #if (!defined AI_LMW_MAX_WEIGHTS) |
346 | # define AI_LMW_MAX_WEIGHTS 0x4 |
347 | #endif // !! AI_LMW_MAX_WEIGHTS |
348 | |
349 | // --------------------------------------------------------------------------- |
350 | /** @brief Lower the deboning threshold in order to remove more bones. |
351 | * |
352 | * This is used by the #aiProcess_Debone PostProcess-Step. |
353 | * @note The default value is AI_DEBONE_THRESHOLD |
354 | * Property type: float.*/ |
355 | #define AI_CONFIG_PP_DB_THRESHOLD \ |
356 | "PP_DB_THRESHOLD" |
357 | |
358 | // default value for AI_CONFIG_PP_LBW_MAX_WEIGHTS |
359 | #if (!defined AI_DEBONE_THRESHOLD) |
360 | # define AI_DEBONE_THRESHOLD 1.0f |
361 | #endif // !! AI_DEBONE_THRESHOLD |
362 | |
363 | // --------------------------------------------------------------------------- |
364 | /** @brief Require all bones qualify for deboning before removing any |
365 | * |
366 | * This is used by the #aiProcess_Debone PostProcess-Step. |
367 | * @note The default value is 0 |
368 | * Property type: bool.*/ |
369 | #define AI_CONFIG_PP_DB_ALL_OR_NONE \ |
370 | "PP_DB_ALL_OR_NONE" |
371 | |
372 | /** @brief Default value for the #AI_CONFIG_PP_ICL_PTCACHE_SIZE property |
373 | */ |
374 | #ifndef PP_ICL_PTCACHE_SIZE |
375 | # define PP_ICL_PTCACHE_SIZE 12 |
376 | #endif |
377 | |
378 | // --------------------------------------------------------------------------- |
379 | /** @brief Set the size of the post-transform vertex cache to optimize the |
380 | * vertices for. This configures the #aiProcess_ImproveCacheLocality step. |
381 | * |
382 | * The size is given in vertices. Of course you can't know how the vertex |
383 | * format will exactly look like after the import returns, but you can still |
384 | * guess what your meshes will probably have. |
385 | * @note The default value is #PP_ICL_PTCACHE_SIZE. That results in slight |
386 | * performance improvements for most nVidia/AMD cards since 2002. |
387 | * Property type: integer. |
388 | */ |
389 | #define AI_CONFIG_PP_ICL_PTCACHE_SIZE "PP_ICL_PTCACHE_SIZE" |
390 | |
391 | // --------------------------------------------------------------------------- |
392 | /** @brief Enumerates components of the aiScene and aiMesh data structures |
393 | * that can be excluded from the import using the #aiProcess_RemoveComponent step. |
394 | * |
395 | * See the documentation to #aiProcess_RemoveComponent for more details. |
396 | */ |
397 | enum aiComponent |
398 | { |
399 | /** Normal vectors */ |
400 | #ifdef SWIG |
401 | aiComponent_NORMALS = 0x2, |
402 | #else |
403 | aiComponent_NORMALS = 0x2u, |
404 | #endif |
405 | |
406 | /** Tangents and bitangents go always together ... */ |
407 | #ifdef SWIG |
408 | aiComponent_TANGENTS_AND_BITANGENTS = 0x4, |
409 | #else |
410 | aiComponent_TANGENTS_AND_BITANGENTS = 0x4u, |
411 | #endif |
412 | |
413 | /** ALL color sets |
414 | * Use aiComponent_COLORn(N) to specify the N'th set */ |
415 | aiComponent_COLORS = 0x8, |
416 | |
417 | /** ALL texture UV sets |
418 | * aiComponent_TEXCOORDn(N) to specify the N'th set */ |
419 | aiComponent_TEXCOORDS = 0x10, |
420 | |
421 | /** Removes all bone weights from all meshes. |
422 | * The scenegraph nodes corresponding to the bones are NOT removed. |
423 | * use the #aiProcess_OptimizeGraph step to do this */ |
424 | aiComponent_BONEWEIGHTS = 0x20, |
425 | |
426 | /** Removes all node animations (aiScene::mAnimations). |
427 | * The corresponding scenegraph nodes are NOT removed. |
428 | * use the #aiProcess_OptimizeGraph step to do this */ |
429 | aiComponent_ANIMATIONS = 0x40, |
430 | |
431 | /** Removes all embedded textures (aiScene::mTextures) */ |
432 | aiComponent_TEXTURES = 0x80, |
433 | |
434 | /** Removes all light sources (aiScene::mLights). |
435 | * The corresponding scenegraph nodes are NOT removed. |
436 | * use the #aiProcess_OptimizeGraph step to do this */ |
437 | aiComponent_LIGHTS = 0x100, |
438 | |
439 | /** Removes all cameras (aiScene::mCameras). |
440 | * The corresponding scenegraph nodes are NOT removed. |
441 | * use the #aiProcess_OptimizeGraph step to do this */ |
442 | aiComponent_CAMERAS = 0x200, |
443 | |
444 | /** Removes all meshes (aiScene::mMeshes). */ |
445 | aiComponent_MESHES = 0x400, |
446 | |
447 | /** Removes all materials. One default material will |
448 | * be generated, so aiScene::mNumMaterials will be 1. */ |
449 | aiComponent_MATERIALS = 0x800, |
450 | |
451 | |
452 | /** This value is not used. It is just there to force the |
453 | * compiler to map this enum to a 32 Bit integer. */ |
454 | #ifndef SWIG |
455 | _aiComponent_Force32Bit = 0x9fffffff |
456 | #endif |
457 | }; |
458 | |
459 | // Remove a specific color channel 'n' |
460 | #define aiComponent_COLORSn(n) (1u << (n+20u)) |
461 | |
462 | // Remove a specific UV channel 'n' |
463 | #define aiComponent_TEXCOORDSn(n) (1u << (n+25u)) |
464 | |
465 | // --------------------------------------------------------------------------- |
466 | /** @brief Input parameter to the #aiProcess_RemoveComponent step: |
467 | * Specifies the parts of the data structure to be removed. |
468 | * |
469 | * See the documentation to this step for further details. The property |
470 | * is expected to be an integer, a bitwise combination of the |
471 | * #aiComponent flags defined above in this header. The default |
472 | * value is 0. Important: if no valid mesh is remaining after the |
473 | * step has been executed (e.g you thought it was funny to specify ALL |
474 | * of the flags defined above) the import FAILS. Mainly because there is |
475 | * no data to work on anymore ... |
476 | */ |
477 | #define AI_CONFIG_PP_RVC_FLAGS \ |
478 | "PP_RVC_FLAGS" |
479 | |
480 | // --------------------------------------------------------------------------- |
481 | /** @brief Input parameter to the #aiProcess_SortByPType step: |
482 | * Specifies which primitive types are removed by the step. |
483 | * |
484 | * This is a bitwise combination of the aiPrimitiveType flags. |
485 | * Specifying all of them is illegal, of course. A typical use would |
486 | * be to exclude all line and point meshes from the import. This |
487 | * is an integer property, its default value is 0. |
488 | */ |
489 | #define AI_CONFIG_PP_SBP_REMOVE \ |
490 | "PP_SBP_REMOVE" |
491 | |
492 | // --------------------------------------------------------------------------- |
493 | /** @brief Input parameter to the #aiProcess_FindInvalidData step: |
494 | * Specifies the floating-point accuracy for animation values. The step |
495 | * checks for animation tracks where all frame values are absolutely equal |
496 | * and removes them. This tweakable controls the epsilon for floating-point |
497 | * comparisons - two keys are considered equal if the invariant |
498 | * abs(n0-n1)>epsilon holds true for all vector respectively quaternion |
499 | * components. The default value is 0.f - comparisons are exact then. |
500 | */ |
501 | #define AI_CONFIG_PP_FID_ANIM_ACCURACY \ |
502 | "PP_FID_ANIM_ACCURACY" |
503 | |
504 | // --------------------------------------------------------------------------- |
505 | /** @brief Input parameter to the #aiProcess_FindInvalidData step: |
506 | * Set to true to ignore texture coordinates. This may be useful if you have |
507 | * to assign different kind of textures like one for the summer or one for the winter. |
508 | */ |
509 | #define AI_CONFIG_PP_FID_IGNORE_TEXTURECOORDS \ |
510 | "PP_FID_IGNORE_TEXTURECOORDS" |
511 | |
512 | // TransformUVCoords evaluates UV scalings |
513 | #define AI_UVTRAFO_SCALING 0x1 |
514 | |
515 | // TransformUVCoords evaluates UV rotations |
516 | #define AI_UVTRAFO_ROTATION 0x2 |
517 | |
518 | // TransformUVCoords evaluates UV translation |
519 | #define AI_UVTRAFO_TRANSLATION 0x4 |
520 | |
521 | // Everything baked together -> default value |
522 | #define AI_UVTRAFO_ALL (AI_UVTRAFO_SCALING | AI_UVTRAFO_ROTATION | AI_UVTRAFO_TRANSLATION) |
523 | |
524 | // --------------------------------------------------------------------------- |
525 | /** @brief Input parameter to the #aiProcess_TransformUVCoords step: |
526 | * Specifies which UV transformations are evaluated. |
527 | * |
528 | * This is a bitwise combination of the AI_UVTRAFO_XXX flags (integer |
529 | * property, of course). By default all transformations are enabled |
530 | * (AI_UVTRAFO_ALL). |
531 | */ |
532 | #define AI_CONFIG_PP_TUV_EVALUATE \ |
533 | "PP_TUV_EVALUATE" |
534 | |
535 | // --------------------------------------------------------------------------- |
536 | /** @brief A hint to assimp to favour speed against import quality. |
537 | * |
538 | * Enabling this option may result in faster loading, but it needn't. |
539 | * It represents just a hint to loaders and post-processing steps to use |
540 | * faster code paths, if possible. |
541 | * This property is expected to be an integer, != 0 stands for true. |
542 | * The default value is 0. |
543 | */ |
544 | #define AI_CONFIG_FAVOUR_SPEED \ |
545 | "FAVOUR_SPEED" |
546 | |
547 | |
548 | // ########################################################################### |
549 | // IMPORTER SETTINGS |
550 | // Various stuff to fine-tune the behaviour of specific importer plugins. |
551 | // ########################################################################### |
552 | |
553 | // --------------------------------------------------------------------------- |
554 | /** @brief Importers which parse JSON may use this to obtain a pointer to a |
555 | * rapidjson::IRemoteSchemaDocumentProvider. |
556 | * |
557 | * The default value is nullptr |
558 | * Property type: void* |
559 | */ |
560 | #define AI_CONFIG_IMPORT_SCHEMA_DOCUMENT_PROVIDER \ |
561 | "IMPORT_SCHEMA_DOCUMENT_PROVIDER" |
562 | |
563 | // --------------------------------------------------------------------------- |
564 | /** @brief Set whether the fbx importer will merge all geometry layers present |
565 | * in the source file or take only the first. |
566 | * |
567 | * The default value is true (1) |
568 | * Property type: bool |
569 | */ |
570 | #define AI_CONFIG_IMPORT_FBX_READ_ALL_GEOMETRY_LAYERS \ |
571 | "IMPORT_FBX_READ_ALL_GEOMETRY_LAYERS" |
572 | |
573 | // --------------------------------------------------------------------------- |
574 | /** @brief Set whether the fbx importer will read all materials present in the |
575 | * source file or take only the referenced materials. |
576 | * |
577 | * This is void unless IMPORT_FBX_READ_MATERIALS=1. |
578 | * |
579 | * The default value is false (0) |
580 | * Property type: bool |
581 | */ |
582 | #define AI_CONFIG_IMPORT_FBX_READ_ALL_MATERIALS \ |
583 | "IMPORT_FBX_READ_ALL_MATERIALS" |
584 | |
585 | // --------------------------------------------------------------------------- |
586 | /** @brief Set whether the fbx importer will read materials. |
587 | * |
588 | * The default value is true (1) |
589 | * Property type: bool |
590 | */ |
591 | #define AI_CONFIG_IMPORT_FBX_READ_MATERIALS \ |
592 | "IMPORT_FBX_READ_MATERIALS" |
593 | |
594 | // --------------------------------------------------------------------------- |
595 | /** @brief Set whether the fbx importer will read embedded textures. |
596 | * |
597 | * The default value is true (1) |
598 | * Property type: bool |
599 | */ |
600 | #define AI_CONFIG_IMPORT_FBX_READ_TEXTURES \ |
601 | "IMPORT_FBX_READ_TEXTURES" |
602 | |
603 | // --------------------------------------------------------------------------- |
604 | /** @brief Set whether the fbx importer will read cameras. |
605 | * |
606 | * The default value is true (1) |
607 | * Property type: bool |
608 | */ |
609 | #define AI_CONFIG_IMPORT_FBX_READ_CAMERAS \ |
610 | "IMPORT_FBX_READ_CAMERAS" |
611 | |
612 | // --------------------------------------------------------------------------- |
613 | /** @brief Set whether the fbx importer will read light sources. |
614 | * |
615 | * The default value is true (1) |
616 | * Property type: bool |
617 | */ |
618 | #define AI_CONFIG_IMPORT_FBX_READ_LIGHTS \ |
619 | "IMPORT_FBX_READ_LIGHTS" |
620 | |
621 | // --------------------------------------------------------------------------- |
622 | /** @brief Set whether the fbx importer will read animations. |
623 | * |
624 | * The default value is true (1) |
625 | * Property type: bool |
626 | */ |
627 | #define AI_CONFIG_IMPORT_FBX_READ_ANIMATIONS \ |
628 | "IMPORT_FBX_READ_ANIMATIONS" |
629 | |
630 | // --------------------------------------------------------------------------- |
631 | /** @brief Set whether the fbx importer will read weights. |
632 | * |
633 | * The default value is true (1) |
634 | * Property type: bool |
635 | */ |
636 | #define AI_CONFIG_IMPORT_FBX_READ_WEIGHTS \ |
637 | "IMPORT_FBX_READ_WEIGHTS" |
638 | |
639 | // --------------------------------------------------------------------------- |
640 | /** @brief Set whether the fbx importer will act in strict mode in which only |
641 | * FBX 2013 is supported and any other sub formats are rejected. FBX 2013 |
642 | * is the primary target for the importer, so this format is best |
643 | * supported and well-tested. |
644 | * |
645 | * The default value is false (0) |
646 | * Property type: bool |
647 | */ |
648 | #define AI_CONFIG_IMPORT_FBX_STRICT_MODE \ |
649 | "IMPORT_FBX_STRICT_MODE" |
650 | |
651 | // --------------------------------------------------------------------------- |
652 | /** @brief Set whether the fbx importer will preserve pivot points for |
653 | * transformations (as extra nodes). If set to false, pivots and offsets |
654 | * will be evaluated whenever possible. |
655 | * |
656 | * The default value is true (1) |
657 | * Property type: bool |
658 | */ |
659 | #define AI_CONFIG_IMPORT_FBX_PRESERVE_PIVOTS \ |
660 | "IMPORT_FBX_PRESERVE_PIVOTS" |
661 | |
662 | // --------------------------------------------------------------------------- |
663 | /** @brief Specifies whether the importer will drop empty animation curves or |
664 | * animation curves which match the bind pose transformation over their |
665 | * entire defined range. |
666 | * |
667 | * The default value is true (1) |
668 | * Property type: bool |
669 | */ |
670 | #define AI_CONFIG_IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES \ |
671 | "IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES" |
672 | |
673 | // --------------------------------------------------------------------------- |
674 | /** @brief Set whether the fbx importer will use the legacy embedded texture naming. |
675 | * |
676 | * The default value is false (0) |
677 | * Property type: bool |
678 | */ |
679 | #define AI_CONFIG_IMPORT_FBX_EMBEDDED_TEXTURES_LEGACY_NAMING \ |
680 | "AI_CONFIG_IMPORT_FBX_EMBEDDED_TEXTURES_LEGACY_NAMING" |
681 | |
682 | // --------------------------------------------------------------------------- |
683 | /** @brief Set wether the importer shall not remove empty bones. |
684 | * |
685 | * Empty bone are often used to define connections for other models. |
686 | */ |
687 | #define AI_CONFIG_IMPORT_REMOVE_EMPTY_BONES \ |
688 | "AI_CONFIG_IMPORT_REMOVE_EMPTY_BONES" |
689 | |
690 | |
691 | // --------------------------------------------------------------------------- |
692 | /** @brief Set wether the FBX importer shall convert the unit from cm to m. |
693 | */ |
694 | #define AI_CONFIG_FBX_CONVERT_TO_M \ |
695 | "AI_CONFIG_FBX_CONVERT_TO_M" |
696 | |
697 | // --------------------------------------------------------------------------- |
698 | /** @brief Will enable the skeleton struct to store bone data. |
699 | * |
700 | * This will decouple the bone coupling to the mesh. This feature is |
701 | * experimental. |
702 | */ |
703 | #define AI_CONFIG_FBX_USE_SKELETON_BONE_CONTAINER \ |
704 | "AI_CONFIG_FBX_USE_SKELETON_BONE_CONTAINER" |
705 | |
706 | // --------------------------------------------------------------------------- |
707 | /** @brief Set the vertex animation keyframe to be imported |
708 | * |
709 | * ASSIMP does not support vertex keyframes (only bone animation is supported). |
710 | * The library reads only one frame of models with vertex animations. |
711 | * By default this is the first frame. |
712 | * \note The default value is 0. This option applies to all importers. |
713 | * However, it is also possible to override the global setting |
714 | * for a specific loader. You can use the AI_CONFIG_IMPORT_XXX_KEYFRAME |
715 | * options (where XXX is a placeholder for the file format for which you |
716 | * want to override the global setting). |
717 | * Property type: integer. |
718 | */ |
719 | #define AI_CONFIG_IMPORT_GLOBAL_KEYFRAME "IMPORT_GLOBAL_KEYFRAME" |
720 | |
721 | #define AI_CONFIG_IMPORT_MD3_KEYFRAME "IMPORT_MD3_KEYFRAME" |
722 | #define AI_CONFIG_IMPORT_MD2_KEYFRAME "IMPORT_MD2_KEYFRAME" |
723 | #define AI_CONFIG_IMPORT_MDL_KEYFRAME "IMPORT_MDL_KEYFRAME" |
724 | #define AI_CONFIG_IMPORT_MDC_KEYFRAME "IMPORT_MDC_KEYFRAME" |
725 | #define AI_CONFIG_IMPORT_SMD_KEYFRAME "IMPORT_SMD_KEYFRAME" |
726 | #define AI_CONFIG_IMPORT_UNREAL_KEYFRAME "IMPORT_UNREAL_KEYFRAME" |
727 | |
728 | // --------------------------------------------------------------------------- |
729 | /** @brief Set whether the MDL (HL1) importer will read animations. |
730 | * |
731 | * The default value is true (1) |
732 | * Property type: bool |
733 | */ |
734 | #define AI_CONFIG_IMPORT_MDL_HL1_READ_ANIMATIONS "IMPORT_MDL_HL1_READ_ANIMATIONS" |
735 | |
736 | // --------------------------------------------------------------------------- |
737 | /** @brief Set whether the MDL (HL1) importer will read animation events. |
738 | * \note This property requires AI_CONFIG_IMPORT_MDL_HL1_READ_ANIMATIONS to be set to true. |
739 | * |
740 | * The default value is true (1) |
741 | * Property type: bool |
742 | */ |
743 | #define AI_CONFIG_IMPORT_MDL_HL1_READ_ANIMATION_EVENTS "IMPORT_MDL_HL1_READ_ANIMATION_EVENTS" |
744 | |
745 | // --------------------------------------------------------------------------- |
746 | /** @brief Set whether the MDL (HL1) importer will read blend controllers. |
747 | * \note This property requires AI_CONFIG_IMPORT_MDL_HL1_READ_ANIMATIONS to be set to true. |
748 | * |
749 | * The default value is true (1) |
750 | * Property type: bool |
751 | */ |
752 | #define AI_CONFIG_IMPORT_MDL_HL1_READ_BLEND_CONTROLLERS "IMPORT_MDL_HL1_READ_BLEND_CONTROLLERS" |
753 | |
754 | // --------------------------------------------------------------------------- |
755 | /** @brief Set whether the MDL (HL1) importer will read sequence transition graph. |
756 | * \note This property requires AI_CONFIG_IMPORT_MDL_HL1_READ_ANIMATIONS to be set to true. |
757 | * |
758 | * The default value is true (1) |
759 | * Property type: bool |
760 | */ |
761 | #define AI_CONFIG_IMPORT_MDL_HL1_READ_SEQUENCE_TRANSITIONS "IMPORT_MDL_HL1_READ_SEQUENCE_TRANSITIONS" |
762 | |
763 | // --------------------------------------------------------------------------- |
764 | /** @brief Set whether the MDL (HL1) importer will read attachments info. |
765 | * |
766 | * The default value is true (1) |
767 | * Property type: bool |
768 | */ |
769 | #define AI_CONFIG_IMPORT_MDL_HL1_READ_ATTACHMENTS "IMPORT_MDL_HL1_READ_ATTACHMENTS" |
770 | |
771 | // --------------------------------------------------------------------------- |
772 | /** @brief Set whether the MDL (HL1) importer will read bone controllers info. |
773 | * |
774 | * The default value is true (1) |
775 | * Property type: bool |
776 | */ |
777 | #define AI_CONFIG_IMPORT_MDL_HL1_READ_BONE_CONTROLLERS "IMPORT_MDL_HL1_READ_BONE_CONTROLLERS" |
778 | |
779 | // --------------------------------------------------------------------------- |
780 | /** @brief Set whether the MDL (HL1) importer will read hitboxes info. |
781 | * |
782 | * The default value is true (1) |
783 | * Property type: bool |
784 | */ |
785 | #define AI_CONFIG_IMPORT_MDL_HL1_READ_HITBOXES "IMPORT_MDL_HL1_READ_HITBOXES" |
786 | |
787 | // --------------------------------------------------------------------------- |
788 | /** @brief Set whether the MDL (HL1) importer will read miscellaneous global model info. |
789 | * |
790 | * The default value is true (1) |
791 | * Property type: bool |
792 | */ |
793 | #define AI_CONFIG_IMPORT_MDL_HL1_READ_MISC_GLOBAL_INFO "IMPORT_MDL_HL1_READ_MISC_GLOBAL_INFO" |
794 | |
795 | // --------------------------------------------------------------------------- |
796 | /** Smd load multiple animations |
797 | * |
798 | * Property type: bool. Default value: true. |
799 | */ |
800 | #define AI_CONFIG_IMPORT_SMD_LOAD_ANIMATION_LIST "IMPORT_SMD_LOAD_ANIMATION_LIST" |
801 | |
802 | // --------------------------------------------------------------------------- |
803 | /** @brief Configures the AC loader to collect all surfaces which have the |
804 | * "Backface cull" flag set in separate meshes. |
805 | * |
806 | * Property type: bool. Default value: true. |
807 | */ |
808 | #define AI_CONFIG_IMPORT_AC_SEPARATE_BFCULL \ |
809 | "IMPORT_AC_SEPARATE_BFCULL" |
810 | |
811 | // --------------------------------------------------------------------------- |
812 | /** @brief Configures whether the AC loader evaluates subdivision surfaces ( |
813 | * indicated by the presence of the 'subdiv' attribute in the file). By |
814 | * default, Assimp performs the subdivision using the standard |
815 | * Catmull-Clark algorithm |
816 | * |
817 | * * Property type: bool. Default value: true. |
818 | */ |
819 | #define AI_CONFIG_IMPORT_AC_EVAL_SUBDIVISION \ |
820 | "IMPORT_AC_EVAL_SUBDIVISION" |
821 | |
822 | // --------------------------------------------------------------------------- |
823 | /** @brief Configures the UNREAL 3D loader to separate faces with different |
824 | * surface flags (e.g. two-sided vs. single-sided). |
825 | * |
826 | * * Property type: bool. Default value: true. |
827 | */ |
828 | #define AI_CONFIG_IMPORT_UNREAL_HANDLE_FLAGS \ |
829 | "UNREAL_HANDLE_FLAGS" |
830 | |
831 | // --------------------------------------------------------------------------- |
832 | /** @brief Configures the terragen import plugin to compute uv's for |
833 | * terrains, if not given. Furthermore a default texture is assigned. |
834 | * |
835 | * UV coordinates for terrains are so simple to compute that you'll usually |
836 | * want to compute them on your own, if you need them. This option is intended |
837 | * for model viewers which want to offer an easy way to apply textures to |
838 | * terrains. |
839 | * * Property type: bool. Default value: false. |
840 | */ |
841 | #define AI_CONFIG_IMPORT_TER_MAKE_UVS \ |
842 | "IMPORT_TER_MAKE_UVS" |
843 | |
844 | // --------------------------------------------------------------------------- |
845 | /** @brief Configures the ASE loader to always reconstruct normal vectors |
846 | * basing on the smoothing groups loaded from the file. |
847 | * |
848 | * Some ASE files have carry invalid normals, other don't. |
849 | * * Property type: bool. Default value: true. |
850 | */ |
851 | #define AI_CONFIG_IMPORT_ASE_RECONSTRUCT_NORMALS \ |
852 | "IMPORT_ASE_RECONSTRUCT_NORMALS" |
853 | |
854 | // --------------------------------------------------------------------------- |
855 | /** @brief Configures the M3D loader to detect and process multi-part |
856 | * Quake player models. |
857 | * |
858 | * These models usually consist of 3 files, lower.md3, upper.md3 and |
859 | * head.md3. If this property is set to true, Assimp will try to load and |
860 | * combine all three files if one of them is loaded. |
861 | * Property type: bool. Default value: true. |
862 | */ |
863 | #define AI_CONFIG_IMPORT_MD3_HANDLE_MULTIPART \ |
864 | "IMPORT_MD3_HANDLE_MULTIPART" |
865 | |
866 | // --------------------------------------------------------------------------- |
867 | /** @brief Tells the MD3 loader which skin files to load. |
868 | * |
869 | * When loading MD3 files, Assimp checks whether a file |
870 | * [md3_file_name]_[skin_name].skin is existing. These files are used by |
871 | * Quake III to be able to assign different skins (e.g. red and blue team) |
872 | * to models. 'default', 'red', 'blue' are typical skin names. |
873 | * Property type: String. Default value: "default". |
874 | */ |
875 | #define AI_CONFIG_IMPORT_MD3_SKIN_NAME \ |
876 | "IMPORT_MD3_SKIN_NAME" |
877 | |
878 | // --------------------------------------------------------------------------- |
879 | /** @brief Specify if to try load Quake 3 shader files. This also controls |
880 | * original surface name handling: when disabled it will be used unchanged. |
881 | * |
882 | * Property type: bool. Default value: true. |
883 | */ |
884 | #define AI_CONFIG_IMPORT_MD3_LOAD_SHADERS \ |
885 | "IMPORT_MD3_LOAD_SHADERS" |
886 | |
887 | // --------------------------------------------------------------------------- |
888 | /** @brief Specify the Quake 3 shader file to be used for a particular |
889 | * MD3 file. This can also be a search path. |
890 | * |
891 | * By default Assimp's behaviour is as follows: If a MD3 file |
892 | * <tt>any_path/models/any_q3_subdir/model_name/file_name.md3</tt> is |
893 | * loaded, the library tries to locate the corresponding shader file in |
894 | * <tt>any_path/scripts/model_name.shader</tt>. This property overrides this |
895 | * behaviour. It can either specify a full path to the shader to be loaded |
896 | * or alternatively the path (relative or absolute) to the directory where |
897 | * the shaders for all MD3s to be loaded reside. Assimp attempts to open |
898 | * <tt>IMPORT_MD3_SHADER_SRC/model_name.shader</tt> first, <tt>IMPORT_MD3_SHADER_SRC/file_name.shader</tt> |
899 | * is the fallback file. Note that IMPORT_MD3_SHADER_SRC should have a terminal (back)slash. |
900 | * Property type: String. Default value: n/a. |
901 | */ |
902 | #define AI_CONFIG_IMPORT_MD3_SHADER_SRC \ |
903 | "IMPORT_MD3_SHADER_SRC" |
904 | |
905 | // --------------------------------------------------------------------------- |
906 | /** @brief Configures the LWO loader to load just one layer from the model. |
907 | * |
908 | * LWO files consist of layers and in some cases it could be useful to load |
909 | * only one of them. This property can be either a string - which specifies |
910 | * the name of the layer - or an integer - the index of the layer. If the |
911 | * property is not set the whole LWO model is loaded. Loading fails if the |
912 | * requested layer is not available. The layer index is zero-based and the |
913 | * layer name may not be empty.<br> |
914 | * Property type: Integer. Default value: all layers are loaded. |
915 | */ |
916 | #define AI_CONFIG_IMPORT_LWO_ONE_LAYER_ONLY \ |
917 | "IMPORT_LWO_ONE_LAYER_ONLY" |
918 | |
919 | // --------------------------------------------------------------------------- |
920 | /** @brief Configures the MD5 loader to not load the MD5ANIM file for |
921 | * a MD5MESH file automatically. |
922 | * |
923 | * The default strategy is to look for a file with the same name but the |
924 | * MD5ANIM extension in the same directory. If it is found, it is loaded |
925 | * and combined with the MD5MESH file. This configuration option can be |
926 | * used to disable this behaviour. |
927 | * |
928 | * * Property type: bool. Default value: false. |
929 | */ |
930 | #define AI_CONFIG_IMPORT_MD5_NO_ANIM_AUTOLOAD \ |
931 | "IMPORT_MD5_NO_ANIM_AUTOLOAD" |
932 | |
933 | // --------------------------------------------------------------------------- |
934 | /** @brief Defines the begin of the time range for which the LWS loader |
935 | * evaluates animations and computes aiNodeAnim's. |
936 | * |
937 | * Assimp provides full conversion of LightWave's envelope system, including |
938 | * pre and post conditions. The loader computes linearly subsampled animation |
939 | * chanels with the frame rate given in the LWS file. This property defines |
940 | * the start time. Note: animation channels are only generated if a node |
941 | * has at least one envelope with more tan one key assigned. This property. |
942 | * is given in frames, '0' is the first frame. By default, if this property |
943 | * is not set, the importer takes the animation start from the input LWS |
944 | * file ('FirstFrame' line)<br> |
945 | * Property type: Integer. Default value: taken from file. |
946 | * |
947 | * @see AI_CONFIG_IMPORT_LWS_ANIM_END - end of the imported time range |
948 | */ |
949 | #define AI_CONFIG_IMPORT_LWS_ANIM_START \ |
950 | "IMPORT_LWS_ANIM_START" |
951 | #define AI_CONFIG_IMPORT_LWS_ANIM_END \ |
952 | "IMPORT_LWS_ANIM_END" |
953 | |
954 | // --------------------------------------------------------------------------- |
955 | /** @brief Defines the output frame rate of the IRR loader. |
956 | * |
957 | * IRR animations are difficult to convert for Assimp and there will |
958 | * always be a loss of quality. This setting defines how many keys per second |
959 | * are returned by the converter.<br> |
960 | * Property type: integer. Default value: 100 |
961 | */ |
962 | #define AI_CONFIG_IMPORT_IRR_ANIM_FPS \ |
963 | "IMPORT_IRR_ANIM_FPS" |
964 | |
965 | // --------------------------------------------------------------------------- |
966 | /** @brief Ogre Importer will try to find referenced materials from this file. |
967 | * |
968 | * Ogre meshes reference with material names, this does not tell Assimp the file |
969 | * where it is located in. Assimp will try to find the source file in the following |
970 | * order: <material-name>.material, <mesh-filename-base>.material and |
971 | * lastly the material name defined by this config property. |
972 | * <br> |
973 | * Property type: String. Default value: Scene.material. |
974 | */ |
975 | #define AI_CONFIG_IMPORT_OGRE_MATERIAL_FILE \ |
976 | "IMPORT_OGRE_MATERIAL_FILE" |
977 | |
978 | // --------------------------------------------------------------------------- |
979 | /** @brief Ogre Importer detect the texture usage from its filename. |
980 | * |
981 | * Ogre material texture units do not define texture type, the textures usage |
982 | * depends on the used shader or Ogre's fixed pipeline. If this config property |
983 | * is true Assimp will try to detect the type from the textures filename postfix: |
984 | * _n, _nrm, _nrml, _normal, _normals and _normalmap for normal map, _s, _spec, |
985 | * _specular and _specularmap for specular map, _l, _light, _lightmap, _occ |
986 | * and _occlusion for light map, _disp and _displacement for displacement map. |
987 | * The matching is case insensitive. Post fix is taken between the last |
988 | * underscore and the last period. |
989 | * Default behavior is to detect type from lower cased texture unit name by |
990 | * matching against: normalmap, specularmap, lightmap and displacementmap. |
991 | * For both cases if no match is found aiTextureType_DIFFUSE is used. |
992 | * <br> |
993 | * Property type: Bool. Default value: false. |
994 | */ |
995 | #define AI_CONFIG_IMPORT_OGRE_TEXTURETYPE_FROM_FILENAME \ |
996 | "IMPORT_OGRE_TEXTURETYPE_FROM_FILENAME" |
997 | |
998 | /** @brief Specifies whether the Android JNI asset extraction is supported. |
999 | * |
1000 | * Turn on this option if you want to manage assets in native |
1001 | * Android application without having to keep the internal directory and asset |
1002 | * manager pointer. |
1003 | */ |
1004 | #define AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT "AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT" |
1005 | |
1006 | // --------------------------------------------------------------------------- |
1007 | /** @brief Specifies whether the IFC loader skips over IfcSpace elements. |
1008 | * |
1009 | * IfcSpace elements (and their geometric representations) are used to |
1010 | * represent, well, free space in a building storey.<br> |
1011 | * Property type: Bool. Default value: true. |
1012 | */ |
1013 | #define AI_CONFIG_IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS "IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS" |
1014 | |
1015 | // --------------------------------------------------------------------------- |
1016 | /** @brief Specifies whether the IFC loader will use its own, custom triangulation |
1017 | * algorithm to triangulate wall and floor meshes. |
1018 | * |
1019 | * If this property is set to false, walls will be either triangulated by |
1020 | * #aiProcess_Triangulate or will be passed through as huge polygons with |
1021 | * faked holes (i.e. holes that are connected with the outer boundary using |
1022 | * a dummy edge). It is highly recommended to set this property to true |
1023 | * if you want triangulated data because #aiProcess_Triangulate is known to |
1024 | * have problems with the kind of polygons that the IFC loader spits out for |
1025 | * complicated meshes. |
1026 | * Property type: Bool. Default value: true. |
1027 | */ |
1028 | #define AI_CONFIG_IMPORT_IFC_CUSTOM_TRIANGULATION "IMPORT_IFC_CUSTOM_TRIANGULATION" |
1029 | |
1030 | // --------------------------------------------------------------------------- |
1031 | /** @brief Set the tessellation conic angle for IFC smoothing curves. |
1032 | * |
1033 | * This is used by the IFC importer to determine the tessellation parameter |
1034 | * for smoothing curves. |
1035 | * @note The default value is AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE and the |
1036 | * accepted values are in range [5.0, 120.0]. |
1037 | * Property type: Float. |
1038 | */ |
1039 | #define AI_CONFIG_IMPORT_IFC_SMOOTHING_ANGLE "IMPORT_IFC_SMOOTHING_ANGLE" |
1040 | |
1041 | // default value for AI_CONFIG_IMPORT_IFC_SMOOTHING_ANGLE |
1042 | #if (!defined AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE) |
1043 | # define AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE 10.0f |
1044 | #endif |
1045 | |
1046 | // --------------------------------------------------------------------------- |
1047 | /** @brief Set the tessellation for IFC cylindrical shapes. |
1048 | * |
1049 | * This is used by the IFC importer to determine the tessellation parameter |
1050 | * for cylindrical shapes, i.e. the number of segments used to approximate a circle. |
1051 | * @note The default value is AI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATION and the |
1052 | * accepted values are in range [3, 180]. |
1053 | * Property type: Integer. |
1054 | */ |
1055 | #define AI_CONFIG_IMPORT_IFC_CYLINDRICAL_TESSELLATION "IMPORT_IFC_CYLINDRICAL_TESSELLATION" |
1056 | |
1057 | // default value for AI_CONFIG_IMPORT_IFC_CYLINDRICAL_TESSELLATION |
1058 | #if (!defined AI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATION) |
1059 | # define AI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATION 32 |
1060 | #endif |
1061 | |
1062 | // --------------------------------------------------------------------------- |
1063 | /** @brief Specifies whether the Collada loader will ignore the provided up direction. |
1064 | * |
1065 | * If this property is set to true, the up direction provided in the file header will |
1066 | * be ignored and the file will be loaded as is. |
1067 | * Property type: Bool. Default value: false. |
1068 | */ |
1069 | #define AI_CONFIG_IMPORT_COLLADA_IGNORE_UP_DIRECTION "IMPORT_COLLADA_IGNORE_UP_DIRECTION" |
1070 | |
1071 | // --------------------------------------------------------------------------- |
1072 | /** @brief Specifies whether the Collada loader will ignore the provided unit size. |
1073 | * |
1074 | * If this property is set to true, the unit size provided in the file header will |
1075 | * be ignored and the file will be loaded without scaling the assets. |
1076 | * Property type: Bool. Default value: false. |
1077 | */ |
1078 | #define AI_CONFIG_IMPORT_COLLADA_IGNORE_UNIT_SIZE "IMPORT_COLLADA_IGNORE_UNIT_SIZE" |
1079 | |
1080 | // --------------------------------------------------------------------------- |
1081 | /** @brief Specifies whether the Collada loader should use Collada names. |
1082 | * |
1083 | * If this property is set to true, the Collada names will be used as the node and |
1084 | * mesh names. The default is to use the id tag (resp. sid tag, if no id tag is present) |
1085 | * instead. |
1086 | * Property type: Bool. Default value: false. |
1087 | */ |
1088 | #define AI_CONFIG_IMPORT_COLLADA_USE_COLLADA_NAMES "IMPORT_COLLADA_USE_COLLADA_NAMES" |
1089 | |
1090 | // ---------- All the Export defines ------------ |
1091 | |
1092 | /** @brief Specifies the xfile use double for real values of float |
1093 | * |
1094 | * Property type: Bool. Default value: false. |
1095 | */ |
1096 | |
1097 | #define AI_CONFIG_EXPORT_XFILE_64BIT "EXPORT_XFILE_64BIT" |
1098 | |
1099 | /** @brief Specifies whether the assimp export shall be able to export point clouds |
1100 | * |
1101 | * When this flag is not defined the render data has to contain valid faces. |
1102 | * Point clouds are only a collection of vertices which have nor spatial organization |
1103 | * by a face and the validation process will remove them. Enabling this feature will |
1104 | * switch off the flag and enable the functionality to export pure point clouds. |
1105 | * |
1106 | * Property type: Bool. Default value: false. |
1107 | */ |
1108 | #define AI_CONFIG_EXPORT_POINT_CLOUDS "EXPORT_POINT_CLOUDS" |
1109 | |
1110 | /** @brief Specifies whether to use the deprecated KHR_materials_pbrSpecularGlossiness extension |
1111 | * |
1112 | * When this flag is undefined any material with specularity will use the new KHR_materials_specular |
1113 | * extension. Enabling this flag will revert to the deprecated extension. Note that exporting |
1114 | * KHR_materials_pbrSpecularGlossiness with extensions other than KHR_materials_unlit is unsupported, |
1115 | * including the basic pbrMetallicRoughness spec. |
1116 | * |
1117 | * Property type: Bool. Default value: false. |
1118 | */ |
1119 | #define AI_CONFIG_USE_GLTF_PBR_SPECULAR_GLOSSINESS "USE_GLTF_PBR_SPECULAR_GLOSSINESS" |
1120 | |
1121 | /** @brief Specifies whether to apply a limit on the number of four bones per vertex in skinning |
1122 | * |
1123 | * When this flag is not defined, all bone weights and indices are limited to a |
1124 | * maximum of four bones for each vertex (attributes JOINT_0 and WEIGHT_0 only). |
1125 | * By enabling this flag, the number of bones per vertex is unlimited. |
1126 | * In both cases, indices and bone weights are sorted by weight in descending order. |
1127 | * In the case of the limit of up to four bones, a maximum of the four largest values are exported. |
1128 | * Weights are not normalized. |
1129 | * Property type: Bool. Default value: false. |
1130 | */ |
1131 | #define AI_CONFIG_EXPORT_GLTF_UNLIMITED_SKINNING_BONES_PER_VERTEX \ |
1132 | "USE_UNLIMITED_BONES_PER VERTEX" |
1133 | |
1134 | /** @brief Specifies whether to write the value referenced to opacity in TransparencyFactor of each material. |
1135 | * |
1136 | * When this flag is not defined, the TransparencyFactor value of each meterial is 1.0. |
1137 | * By enabling this flag, the value is 1.0 - opacity; |
1138 | |
1139 | * Property type: Bool. Default value: false. |
1140 | */ |
1141 | #define AI_CONFIG_EXPORT_FBX_TRANSPARENCY_FACTOR_REFER_TO_OPACITY \ |
1142 | "EXPORT_FBX_TRANSPARENCY_FACTOR_REFER_TO_OPACITY" |
1143 | |
1144 | /** |
1145 | * @brief Specifies the blob name, assimp uses for exporting. |
1146 | * |
1147 | * Some formats require auxiliary files to be written, that need to be linked back into |
1148 | * the original file. For example, OBJ files export materials to a separate MTL file and |
1149 | * use the `mtllib` keyword to reference this file. |
1150 | * |
1151 | * When exporting blobs using #ExportToBlob, assimp does not know the name of the blob |
1152 | * file and thus outputs `mtllib $blobfile.mtl`, which might not be desired, since the |
1153 | * MTL file might be called differently. |
1154 | * |
1155 | * This property can be used to give the exporter a hint on how to use the magic |
1156 | * `$blobfile` keyword. If the exporter detects the keyword and is provided with a name |
1157 | * for the blob, it instead uses this name. |
1158 | */ |
1159 | #define AI_CONFIG_EXPORT_BLOB_NAME "EXPORT_BLOB_NAME" |
1160 | |
1161 | /** |
1162 | * |
1163 | * @brief Specifies a global key factor for scale, float value |
1164 | */ |
1165 | #define AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY "GLOBAL_SCALE_FACTOR" |
1166 | |
1167 | #if (!defined AI_CONFIG_GLOBAL_SCALE_FACTOR_DEFAULT) |
1168 | # define AI_CONFIG_GLOBAL_SCALE_FACTOR_DEFAULT 1.0f |
1169 | #endif // !! AI_DEBONE_THRESHOLD |
1170 | |
1171 | #define AI_CONFIG_APP_SCALE_KEY "APP_SCALE_FACTOR" |
1172 | |
1173 | #if (!defined AI_CONFIG_APP_SCALE_KEY) |
1174 | # define AI_CONFIG_APP_SCALE_KEY 1.0 |
1175 | #endif // AI_CONFIG_APP_SCALE_KEY |
1176 | |
1177 | |
1178 | // ---------- All the Build/Compile-time defines ------------ |
1179 | |
1180 | /** @brief Specifies if double precision is supported inside assimp |
1181 | * |
1182 | * Property type: Bool. Default value: undefined. |
1183 | */ |
1184 | |
1185 | |
1186 | |
1187 | #endif // !! AI_CONFIG_H_INC |
1188 | |