miniassimp

view include/miniassimp/config.h @ 0:879c81d94345

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 28 Jan 2019 18:19:26 +0200
parents
children
line source
1 /*
2 ---------------------------------------------------------------------------
3 Open Asset Import Library (assimp)
4 ---------------------------------------------------------------------------
6 Copyright (c) 2006-2018, assimp team
9 All rights reserved.
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:
15 * Redistributions of source code must retain the above
16 copyright notice, this list of conditions and the
17 following disclaimer.
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.
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.
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 */
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
64 // ###########################################################################
65 // LIBRARY SETTINGS
66 // General, global settings
67 // ###########################################################################
69 // ---------------------------------------------------------------------------
70 /** @brief Enables time measurements.
71 *
72 * If enabled, measures the time needed for each part of the loading
73 * process (i.e. IO time, importing, postprocessing, ..) and dumps
74 * these timings to the DefaultLogger. See the @link perf Performance
75 * Page@endlink for more information on this topic.
76 *
77 * Property type: bool. Default value: false.
78 */
79 #define AI_CONFIG_GLOB_MEASURE_TIME \
80 "GLOB_MEASURE_TIME"
83 // ---------------------------------------------------------------------------
84 /** @brief Global setting to disable generation of skeleton dummy meshes
85 *
86 * Skeleton dummy meshes are generated as a visualization aid in cases which
87 * the input data contains no geometry, but only animation data.
88 * Property data type: bool. Default value: false
89 */
90 // ---------------------------------------------------------------------------
91 #define AI_CONFIG_IMPORT_NO_SKELETON_MESHES \
92 "IMPORT_NO_SKELETON_MESHES"
96 # if 0 // not implemented yet
97 // ---------------------------------------------------------------------------
98 /** @brief Set Assimp's multithreading policy.
99 *
100 * This setting is ignored if Assimp was built without boost.thread
101 * support (ASSIMP_BUILD_NO_THREADING, which is implied by ASSIMP_BUILD_BOOST_WORKAROUND).
102 * Possible values are: -1 to let Assimp decide what to do, 0 to disable
103 * multithreading entirely and any number larger than 0 to force a specific
104 * number of threads. Assimp is always free to ignore this settings, which is
105 * merely a hint. Usually, the default value (-1) will be fine. However, if
106 * Assimp is used concurrently from multiple user threads, it might be useful
107 * to limit each Importer instance to a specific number of cores.
108 *
109 * For more information, see the @link threading Threading page@endlink.
110 * Property type: int, default value: -1.
111 */
112 #define AI_CONFIG_GLOB_MULTITHREADING \
113 "GLOB_MULTITHREADING"
114 #endif
116 // ###########################################################################
117 // POST PROCESSING SETTINGS
118 // Various stuff to fine-tune the behavior of a specific post processing step.
119 // ###########################################################################
122 // ---------------------------------------------------------------------------
123 /** @brief Maximum bone count per mesh for the SplitbyBoneCount step.
124 *
125 * Meshes are split until the maximum number of bones is reached. The default
126 * value is AI_SBBC_DEFAULT_MAX_BONES, which may be altered at
127 * compile-time.
128 * Property data type: integer.
129 */
130 // ---------------------------------------------------------------------------
131 #define AI_CONFIG_PP_SBBC_MAX_BONES \
132 "PP_SBBC_MAX_BONES"
135 // default limit for bone count
136 #if (!defined AI_SBBC_DEFAULT_MAX_BONES)
137 # define AI_SBBC_DEFAULT_MAX_BONES 60
138 #endif
141 // ---------------------------------------------------------------------------
142 /** @brief Specifies the maximum angle that may be between two vertex tangents
143 * that their tangents and bi-tangents are smoothed.
144 *
145 * This applies to the CalcTangentSpace-Step. The angle is specified
146 * in degrees. The maximum value is 175.
147 * Property type: float. Default value: 45 degrees
148 */
149 #define AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE \
150 "PP_CT_MAX_SMOOTHING_ANGLE"
152 // ---------------------------------------------------------------------------
153 /** @brief Source UV channel for tangent space computation.
154 *
155 * The specified channel must exist or an error will be raised.
156 * Property type: integer. Default value: 0
157 */
158 // ---------------------------------------------------------------------------
159 #define AI_CONFIG_PP_CT_TEXTURE_CHANNEL_INDEX \
160 "PP_CT_TEXTURE_CHANNEL_INDEX"
162 // ---------------------------------------------------------------------------
163 /** @brief Specifies the maximum angle that may be between two face normals
164 * at the same vertex position that their are smoothed together.
165 *
166 * Sometimes referred to as 'crease angle'.
167 * This applies to the GenSmoothNormals-Step. The angle is specified
168 * in degrees, so 180 is PI. The default value is 175 degrees (all vertex
169 * normals are smoothed). The maximum value is 175, too. Property type: float.
170 * Warning: setting this option may cause a severe loss of performance. The
171 * performance is unaffected if the #AI_CONFIG_FAVOUR_SPEED flag is set but
172 * the output quality may be reduced.
173 */
174 #define AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE \
175 "PP_GSN_MAX_SMOOTHING_ANGLE"
178 // ---------------------------------------------------------------------------
179 /** @brief Sets the colormap (= palette) to be used to decode embedded
180 * textures in MDL (Quake or 3DGS) files.
181 *
182 * This must be a valid path to a file. The file is 768 (256*3) bytes
183 * large and contains RGB triplets for each of the 256 palette entries.
184 * The default value is colormap.lmp. If the file is not found,
185 * a default palette (from Quake 1) is used.
186 * Property type: string.
187 */
188 #define AI_CONFIG_IMPORT_MDL_COLORMAP \
189 "IMPORT_MDL_COLORMAP"
191 // ---------------------------------------------------------------------------
192 /** @brief Configures the #aiProcess_RemoveRedundantMaterials step to
193 * keep materials matching a name in a given list.
194 *
195 * This is a list of 1 to n strings, ' ' serves as delimiter character.
196 * Identifiers containing whitespaces must be enclosed in *single*
197 * quotation marks. For example:<tt>
198 * "keep-me and_me_to anotherMaterialToBeKept \'name with whitespace\'"</tt>.
199 * If a material matches on of these names, it will not be modified or
200 * removed by the postprocessing step nor will other materials be replaced
201 * by a reference to it. <br>
202 * This option might be useful if you are using some magic material names
203 * to pass additional semantics through the content pipeline. This ensures
204 * they won't be optimized away, but a general optimization is still
205 * performed for materials not contained in the list.
206 * Property type: String. Default value: n/a
207 * @note Linefeeds, tabs or carriage returns are treated as whitespace.
208 * Material names are case sensitive.
209 */
210 #define AI_CONFIG_PP_RRM_EXCLUDE_LIST \
211 "PP_RRM_EXCLUDE_LIST"
213 // ---------------------------------------------------------------------------
214 /** @brief Configures the #aiProcess_PreTransformVertices step to
215 * keep the scene hierarchy. Meshes are moved to worldspace, but
216 * no optimization is performed (read: meshes with equal materials are not
217 * joined. The total number of meshes won't change).
218 *
219 * This option could be of use for you if the scene hierarchy contains
220 * important additional information which you intend to parse.
221 * For rendering, you can still render all meshes in the scene without
222 * any transformations.
223 * Property type: bool. Default value: false.
224 */
225 #define AI_CONFIG_PP_PTV_KEEP_HIERARCHY \
226 "PP_PTV_KEEP_HIERARCHY"
228 // ---------------------------------------------------------------------------
229 /** @brief Configures the #aiProcess_PreTransformVertices step to normalize
230 * all vertex components into the [-1,1] range. That is, a bounding box
231 * for the whole scene is computed, the maximum component is taken and all
232 * meshes are scaled appropriately (uniformly of course!).
233 * This might be useful if you don't know the spatial dimension of the input
234 * data*/
235 #define AI_CONFIG_PP_PTV_NORMALIZE \
236 "PP_PTV_NORMALIZE"
238 // ---------------------------------------------------------------------------
239 /** @brief Configures the #aiProcess_PreTransformVertices step to use
240 * a users defined matrix as the scene root node transformation before
241 * transforming vertices.
242 * Property type: bool. Default value: false.
243 */
244 #define AI_CONFIG_PP_PTV_ADD_ROOT_TRANSFORMATION \
245 "PP_PTV_ADD_ROOT_TRANSFORMATION"
247 // ---------------------------------------------------------------------------
248 /** @brief Configures the #aiProcess_PreTransformVertices step to use
249 * a users defined matrix as the scene root node transformation before
250 * transforming vertices. This property correspond to the 'a1' component
251 * of the transformation matrix.
252 * Property type: aiMatrix4x4.
253 */
254 #define AI_CONFIG_PP_PTV_ROOT_TRANSFORMATION \
255 "PP_PTV_ROOT_TRANSFORMATION"
257 // ---------------------------------------------------------------------------
258 /** @brief Configures the #aiProcess_FindDegenerates step to
259 * remove degenerated primitives from the import - immediately.
260 *
261 * The default behaviour converts degenerated triangles to lines and
262 * degenerated lines to points. See the documentation to the
263 * #aiProcess_FindDegenerates step for a detailed example of the various ways
264 * to get rid of these lines and points if you don't want them.
265 * Property type: bool. Default value: false.
266 */
267 #define AI_CONFIG_PP_FD_REMOVE \
268 "PP_FD_REMOVE"
270 // ---------------------------------------------------------------------------
271 /**
272 * @brief Configures the #aiProcess_FindDegenerates to check the area of a
273 * trinagle to be greates than e-6. If this is not the case the triangle will
274 * be removed if #AI_CONFIG_PP_FD_REMOVE is set to true.
275 */
276 #define AI_CONFIG_PP_FD_CHECKAREA \
277 "PP_FD_CHECKAREA"
279 // ---------------------------------------------------------------------------
280 /** @brief Configures the #aiProcess_OptimizeGraph step to preserve nodes
281 * matching a name in a given list.
282 *
283 * This is a list of 1 to n strings, ' ' serves as delimiter character.
284 * Identifiers containing whitespaces must be enclosed in *single*
285 * quotation marks. For example:<tt>
286 * "keep-me and_me_to anotherNodeToBeKept \'name with whitespace\'"</tt>.
287 * If a node matches on of these names, it will not be modified or
288 * removed by the postprocessing step.<br>
289 * This option might be useful if you are using some magic node names
290 * to pass additional semantics through the content pipeline. This ensures
291 * they won't be optimized away, but a general optimization is still
292 * performed for nodes not contained in the list.
293 * Property type: String. Default value: n/a
294 * @note Linefeeds, tabs or carriage returns are treated as whitespace.
295 * Node names are case sensitive.
296 */
297 #define AI_CONFIG_PP_OG_EXCLUDE_LIST \
298 "PP_OG_EXCLUDE_LIST"
300 // ---------------------------------------------------------------------------
301 /** @brief Set the maximum number of triangles in a mesh.
302 *
303 * This is used by the "SplitLargeMeshes" PostProcess-Step to determine
304 * whether a mesh must be split or not.
305 * @note The default value is AI_SLM_DEFAULT_MAX_TRIANGLES
306 * Property type: integer.
307 */
308 #define AI_CONFIG_PP_SLM_TRIANGLE_LIMIT \
309 "PP_SLM_TRIANGLE_LIMIT"
311 // default value for AI_CONFIG_PP_SLM_TRIANGLE_LIMIT
312 #if (!defined AI_SLM_DEFAULT_MAX_TRIANGLES)
313 # define AI_SLM_DEFAULT_MAX_TRIANGLES 1000000
314 #endif
316 // ---------------------------------------------------------------------------
317 /** @brief Set the maximum number of vertices in a mesh.
318 *
319 * This is used by the "SplitLargeMeshes" PostProcess-Step to determine
320 * whether a mesh must be split or not.
321 * @note The default value is AI_SLM_DEFAULT_MAX_VERTICES
322 * Property type: integer.
323 */
324 #define AI_CONFIG_PP_SLM_VERTEX_LIMIT \
325 "PP_SLM_VERTEX_LIMIT"
327 // default value for AI_CONFIG_PP_SLM_VERTEX_LIMIT
328 #if (!defined AI_SLM_DEFAULT_MAX_VERTICES)
329 # define AI_SLM_DEFAULT_MAX_VERTICES 1000000
330 #endif
332 // ---------------------------------------------------------------------------
333 /** @brief Set the maximum number of bones affecting a single vertex
334 *
335 * This is used by the #aiProcess_LimitBoneWeights PostProcess-Step.
336 * @note The default value is AI_LMW_MAX_WEIGHTS
337 * Property type: integer.*/
338 #define AI_CONFIG_PP_LBW_MAX_WEIGHTS \
339 "PP_LBW_MAX_WEIGHTS"
341 // default value for AI_CONFIG_PP_LBW_MAX_WEIGHTS
342 #if (!defined AI_LMW_MAX_WEIGHTS)
343 # define AI_LMW_MAX_WEIGHTS 0x4
344 #endif // !! AI_LMW_MAX_WEIGHTS
346 // ---------------------------------------------------------------------------
347 /** @brief Lower the deboning threshold in order to remove more bones.
348 *
349 * This is used by the #aiProcess_Debone PostProcess-Step.
350 * @note The default value is AI_DEBONE_THRESHOLD
351 * Property type: float.*/
352 #define AI_CONFIG_PP_DB_THRESHOLD \
353 "PP_DB_THRESHOLD"
355 // default value for AI_CONFIG_PP_LBW_MAX_WEIGHTS
356 #if (!defined AI_DEBONE_THRESHOLD)
357 # define AI_DEBONE_THRESHOLD 1.0f
358 #endif // !! AI_DEBONE_THRESHOLD
360 // ---------------------------------------------------------------------------
361 /** @brief Require all bones qualify for deboning before removing any
362 *
363 * This is used by the #aiProcess_Debone PostProcess-Step.
364 * @note The default value is 0
365 * Property type: bool.*/
366 #define AI_CONFIG_PP_DB_ALL_OR_NONE \
367 "PP_DB_ALL_OR_NONE"
369 /** @brief Default value for the #AI_CONFIG_PP_ICL_PTCACHE_SIZE property
370 */
371 #ifndef PP_ICL_PTCACHE_SIZE
372 # define PP_ICL_PTCACHE_SIZE 12
373 #endif
375 // ---------------------------------------------------------------------------
376 /** @brief Set the size of the post-transform vertex cache to optimize the
377 * vertices for. This configures the #aiProcess_ImproveCacheLocality step.
378 *
379 * The size is given in vertices. Of course you can't know how the vertex
380 * format will exactly look like after the import returns, but you can still
381 * guess what your meshes will probably have.
382 * @note The default value is #PP_ICL_PTCACHE_SIZE. That results in slight
383 * performance improvements for most nVidia/AMD cards since 2002.
384 * Property type: integer.
385 */
386 #define AI_CONFIG_PP_ICL_PTCACHE_SIZE "PP_ICL_PTCACHE_SIZE"
388 // ---------------------------------------------------------------------------
389 /** @brief Enumerates components of the aiScene and aiMesh data structures
390 * that can be excluded from the import using the #aiProcess_RemoveComponent step.
391 *
392 * See the documentation to #aiProcess_RemoveComponent for more details.
393 */
394 enum aiComponent
395 {
396 /** Normal vectors */
397 #ifdef SWIG
398 aiComponent_NORMALS = 0x2,
399 #else
400 aiComponent_NORMALS = 0x2u,
401 #endif
403 /** Tangents and bitangents go always together ... */
404 #ifdef SWIG
405 aiComponent_TANGENTS_AND_BITANGENTS = 0x4,
406 #else
407 aiComponent_TANGENTS_AND_BITANGENTS = 0x4u,
408 #endif
410 /** ALL color sets
411 * Use aiComponent_COLORn(N) to specify the N'th set */
412 aiComponent_COLORS = 0x8,
414 /** ALL texture UV sets
415 * aiComponent_TEXCOORDn(N) to specify the N'th set */
416 aiComponent_TEXCOORDS = 0x10,
418 /** Removes all bone weights from all meshes.
419 * The scenegraph nodes corresponding to the bones are NOT removed.
420 * use the #aiProcess_OptimizeGraph step to do this */
421 aiComponent_BONEWEIGHTS = 0x20,
423 /** Removes all node animations (aiScene::mAnimations).
424 * The corresponding scenegraph nodes are NOT removed.
425 * use the #aiProcess_OptimizeGraph step to do this */
426 aiComponent_ANIMATIONS = 0x40,
428 /** Removes all embedded textures (aiScene::mTextures) */
429 aiComponent_TEXTURES = 0x80,
431 /** Removes all light sources (aiScene::mLights).
432 * The corresponding scenegraph nodes are NOT removed.
433 * use the #aiProcess_OptimizeGraph step to do this */
434 aiComponent_LIGHTS = 0x100,
436 /** Removes all cameras (aiScene::mCameras).
437 * The corresponding scenegraph nodes are NOT removed.
438 * use the #aiProcess_OptimizeGraph step to do this */
439 aiComponent_CAMERAS = 0x200,
441 /** Removes all meshes (aiScene::mMeshes). */
442 aiComponent_MESHES = 0x400,
444 /** Removes all materials. One default material will
445 * be generated, so aiScene::mNumMaterials will be 1. */
446 aiComponent_MATERIALS = 0x800,
449 /** This value is not used. It is just there to force the
450 * compiler to map this enum to a 32 Bit integer. */
451 #ifndef SWIG
452 _aiComponent_Force32Bit = 0x9fffffff
453 #endif
454 };
456 // Remove a specific color channel 'n'
457 #define aiComponent_COLORSn(n) (1u << (n+20u))
459 // Remove a specific UV channel 'n'
460 #define aiComponent_TEXCOORDSn(n) (1u << (n+25u))
462 // ---------------------------------------------------------------------------
463 /** @brief Input parameter to the #aiProcess_RemoveComponent step:
464 * Specifies the parts of the data structure to be removed.
465 *
466 * See the documentation to this step for further details. The property
467 * is expected to be an integer, a bitwise combination of the
468 * #aiComponent flags defined above in this header. The default
469 * value is 0. Important: if no valid mesh is remaining after the
470 * step has been executed (e.g you thought it was funny to specify ALL
471 * of the flags defined above) the import FAILS. Mainly because there is
472 * no data to work on anymore ...
473 */
474 #define AI_CONFIG_PP_RVC_FLAGS \
475 "PP_RVC_FLAGS"
477 // ---------------------------------------------------------------------------
478 /** @brief Input parameter to the #aiProcess_SortByPType step:
479 * Specifies which primitive types are removed by the step.
480 *
481 * This is a bitwise combination of the aiPrimitiveType flags.
482 * Specifying all of them is illegal, of course. A typical use would
483 * be to exclude all line and point meshes from the import. This
484 * is an integer property, its default value is 0.
485 */
486 #define AI_CONFIG_PP_SBP_REMOVE \
487 "PP_SBP_REMOVE"
489 // ---------------------------------------------------------------------------
490 /** @brief Input parameter to the #aiProcess_FindInvalidData step:
491 * Specifies the floating-point accuracy for animation values. The step
492 * checks for animation tracks where all frame values are absolutely equal
493 * and removes them. This tweakable controls the epsilon for floating-point
494 * comparisons - two keys are considered equal if the invariant
495 * abs(n0-n1)>epsilon holds true for all vector respectively quaternion
496 * components. The default value is 0.f - comparisons are exact then.
497 */
498 #define AI_CONFIG_PP_FID_ANIM_ACCURACY \
499 "PP_FID_ANIM_ACCURACY"
501 // ---------------------------------------------------------------------------
502 /** @brief Input parameter to the #aiProcess_FindInvalidData step:
503 * Set to true to ignore texture coordinates. This may be useful if you have
504 * to assign different kind of textures like one for the summer or one for the winter.
505 */
506 #define AI_CONFIG_PP_FID_IGNORE_TEXTURECOORDS \
507 "PP_FID_IGNORE_TEXTURECOORDS"
509 // TransformUVCoords evaluates UV scalings
510 #define AI_UVTRAFO_SCALING 0x1
512 // TransformUVCoords evaluates UV rotations
513 #define AI_UVTRAFO_ROTATION 0x2
515 // TransformUVCoords evaluates UV translation
516 #define AI_UVTRAFO_TRANSLATION 0x4
518 // Everything baked together -> default value
519 #define AI_UVTRAFO_ALL (AI_UVTRAFO_SCALING | AI_UVTRAFO_ROTATION | AI_UVTRAFO_TRANSLATION)
521 // ---------------------------------------------------------------------------
522 /** @brief Input parameter to the #aiProcess_TransformUVCoords step:
523 * Specifies which UV transformations are evaluated.
524 *
525 * This is a bitwise combination of the AI_UVTRAFO_XXX flags (integer
526 * property, of course). By default all transformations are enabled
527 * (AI_UVTRAFO_ALL).
528 */
529 #define AI_CONFIG_PP_TUV_EVALUATE \
530 "PP_TUV_EVALUATE"
532 // ---------------------------------------------------------------------------
533 /** @brief A hint to assimp to favour speed against import quality.
534 *
535 * Enabling this option may result in faster loading, but it needn't.
536 * It represents just a hint to loaders and post-processing steps to use
537 * faster code paths, if possible.
538 * This property is expected to be an integer, != 0 stands for true.
539 * The default value is 0.
540 */
541 #define AI_CONFIG_FAVOUR_SPEED \
542 "FAVOUR_SPEED"
545 // ###########################################################################
546 // IMPORTER SETTINGS
547 // Various stuff to fine-tune the behaviour of specific importer plugins.
548 // ###########################################################################
551 // ---------------------------------------------------------------------------
552 /** @brief Set whether the fbx importer will merge all geometry layers present
553 * in the source file or take only the first.
554 *
555 * The default value is true (1)
556 * Property type: bool
557 */
558 #define AI_CONFIG_IMPORT_FBX_READ_ALL_GEOMETRY_LAYERS \
559 "IMPORT_FBX_READ_ALL_GEOMETRY_LAYERS"
561 // ---------------------------------------------------------------------------
562 /** @brief Set whether the fbx importer will read all materials present in the
563 * source file or take only the referenced materials.
564 *
565 * This is void unless IMPORT_FBX_READ_MATERIALS=1.
566 *
567 * The default value is false (0)
568 * Property type: bool
569 */
570 #define AI_CONFIG_IMPORT_FBX_READ_ALL_MATERIALS \
571 "IMPORT_FBX_READ_ALL_MATERIALS"
573 // ---------------------------------------------------------------------------
574 /** @brief Set whether the fbx importer will read materials.
575 *
576 * The default value is true (1)
577 * Property type: bool
578 */
579 #define AI_CONFIG_IMPORT_FBX_READ_MATERIALS \
580 "IMPORT_FBX_READ_MATERIALS"
582 // ---------------------------------------------------------------------------
583 /** @brief Set whether the fbx importer will read embedded textures.
584 *
585 * The default value is true (1)
586 * Property type: bool
587 */
588 #define AI_CONFIG_IMPORT_FBX_READ_TEXTURES \
589 "IMPORT_FBX_READ_TEXTURES"
591 // ---------------------------------------------------------------------------
592 /** @brief Set whether the fbx importer will read cameras.
593 *
594 * The default value is true (1)
595 * Property type: bool
596 */
597 #define AI_CONFIG_IMPORT_FBX_READ_CAMERAS \
598 "IMPORT_FBX_READ_CAMERAS"
600 // ---------------------------------------------------------------------------
601 /** @brief Set whether the fbx importer will read light sources.
602 *
603 * The default value is true (1)
604 * Property type: bool
605 */
606 #define AI_CONFIG_IMPORT_FBX_READ_LIGHTS \
607 "IMPORT_FBX_READ_LIGHTS"
609 // ---------------------------------------------------------------------------
610 /** @brief Set whether the fbx importer will read animations.
611 *
612 * The default value is true (1)
613 * Property type: bool
614 */
615 #define AI_CONFIG_IMPORT_FBX_READ_ANIMATIONS \
616 "IMPORT_FBX_READ_ANIMATIONS"
618 // ---------------------------------------------------------------------------
619 /** @brief Set whether the fbx importer will act in strict mode in which only
620 * FBX 2013 is supported and any other sub formats are rejected. FBX 2013
621 * is the primary target for the importer, so this format is best
622 * supported and well-tested.
623 *
624 * The default value is false (0)
625 * Property type: bool
626 */
627 #define AI_CONFIG_IMPORT_FBX_STRICT_MODE \
628 "IMPORT_FBX_STRICT_MODE"
630 // ---------------------------------------------------------------------------
631 /** @brief Set whether the fbx importer will preserve pivot points for
632 * transformations (as extra nodes). If set to false, pivots and offsets
633 * will be evaluated whenever possible.
634 *
635 * The default value is true (1)
636 * Property type: bool
637 */
638 #define AI_CONFIG_IMPORT_FBX_PRESERVE_PIVOTS \
639 "IMPORT_FBX_PRESERVE_PIVOTS"
641 // ---------------------------------------------------------------------------
642 /** @brief Specifies whether the importer will drop empty animation curves or
643 * animation curves which match the bind pose transformation over their
644 * entire defined range.
645 *
646 * The default value is true (1)
647 * Property type: bool
648 */
649 #define AI_CONFIG_IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES \
650 "IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES"
652 // ---------------------------------------------------------------------------
653 /** @brief Set whether the fbx importer will use the legacy embedded texture naming.
654 *
655 * The default value is false (0)
656 * Property type: bool
657 */
658 #define AI_CONFIG_IMPORT_FBX_EMBEDDED_TEXTURES_LEGACY_NAMING \
659 "AI_CONFIG_IMPORT_FBX_EMBEDDED_TEXTURES_LEGACY_NAMING"
661 // ---------------------------------------------------------------------------
662 /** @brief Set the vertex animation keyframe to be imported
663 *
664 * ASSIMP does not support vertex keyframes (only bone animation is supported).
665 * The library reads only one frame of models with vertex animations.
666 * By default this is the first frame.
667 * \note The default value is 0. This option applies to all importers.
668 * However, it is also possible to override the global setting
669 * for a specific loader. You can use the AI_CONFIG_IMPORT_XXX_KEYFRAME
670 * options (where XXX is a placeholder for the file format for which you
671 * want to override the global setting).
672 * Property type: integer.
673 */
674 #define AI_CONFIG_IMPORT_GLOBAL_KEYFRAME "IMPORT_GLOBAL_KEYFRAME"
676 #define AI_CONFIG_IMPORT_MD3_KEYFRAME "IMPORT_MD3_KEYFRAME"
677 #define AI_CONFIG_IMPORT_MD2_KEYFRAME "IMPORT_MD2_KEYFRAME"
678 #define AI_CONFIG_IMPORT_MDL_KEYFRAME "IMPORT_MDL_KEYFRAME"
679 #define AI_CONFIG_IMPORT_MDC_KEYFRAME "IMPORT_MDC_KEYFRAME"
680 #define AI_CONFIG_IMPORT_SMD_KEYFRAME "IMPORT_SMD_KEYFRAME"
681 #define AI_CONFIG_IMPORT_UNREAL_KEYFRAME "IMPORT_UNREAL_KEYFRAME"
683 // ---------------------------------------------------------------------------
684 /** Smd load multiple animations
685 *
686 * Property type: bool. Default value: true.
687 */
688 #define AI_CONFIG_IMPORT_SMD_LOAD_ANIMATION_LIST "IMPORT_SMD_LOAD_ANIMATION_LIST"
690 // ---------------------------------------------------------------------------
691 /** @brief Configures the AC loader to collect all surfaces which have the
692 * "Backface cull" flag set in separate meshes.
693 *
694 * Property type: bool. Default value: true.
695 */
696 #define AI_CONFIG_IMPORT_AC_SEPARATE_BFCULL \
697 "IMPORT_AC_SEPARATE_BFCULL"
699 // ---------------------------------------------------------------------------
700 /** @brief Configures whether the AC loader evaluates subdivision surfaces (
701 * indicated by the presence of the 'subdiv' attribute in the file). By
702 * default, Assimp performs the subdivision using the standard
703 * Catmull-Clark algorithm
704 *
705 * * Property type: bool. Default value: true.
706 */
707 #define AI_CONFIG_IMPORT_AC_EVAL_SUBDIVISION \
708 "IMPORT_AC_EVAL_SUBDIVISION"
710 // ---------------------------------------------------------------------------
711 /** @brief Configures the UNREAL 3D loader to separate faces with different
712 * surface flags (e.g. two-sided vs. single-sided).
713 *
714 * * Property type: bool. Default value: true.
715 */
716 #define AI_CONFIG_IMPORT_UNREAL_HANDLE_FLAGS \
717 "UNREAL_HANDLE_FLAGS"
719 // ---------------------------------------------------------------------------
720 /** @brief Configures the terragen import plugin to compute uv's for
721 * terrains, if not given. Furthermore a default texture is assigned.
722 *
723 * UV coordinates for terrains are so simple to compute that you'll usually
724 * want to compute them on your own, if you need them. This option is intended
725 * for model viewers which want to offer an easy way to apply textures to
726 * terrains.
727 * * Property type: bool. Default value: false.
728 */
729 #define AI_CONFIG_IMPORT_TER_MAKE_UVS \
730 "IMPORT_TER_MAKE_UVS"
732 // ---------------------------------------------------------------------------
733 /** @brief Configures the ASE loader to always reconstruct normal vectors
734 * basing on the smoothing groups loaded from the file.
735 *
736 * Some ASE files have carry invalid normals, other don't.
737 * * Property type: bool. Default value: true.
738 */
739 #define AI_CONFIG_IMPORT_ASE_RECONSTRUCT_NORMALS \
740 "IMPORT_ASE_RECONSTRUCT_NORMALS"
742 // ---------------------------------------------------------------------------
743 /** @brief Configures the M3D loader to detect and process multi-part
744 * Quake player models.
745 *
746 * These models usually consist of 3 files, lower.md3, upper.md3 and
747 * head.md3. If this property is set to true, Assimp will try to load and
748 * combine all three files if one of them is loaded.
749 * Property type: bool. Default value: true.
750 */
751 #define AI_CONFIG_IMPORT_MD3_HANDLE_MULTIPART \
752 "IMPORT_MD3_HANDLE_MULTIPART"
754 // ---------------------------------------------------------------------------
755 /** @brief Tells the MD3 loader which skin files to load.
756 *
757 * When loading MD3 files, Assimp checks whether a file
758 * [md3_file_name]_[skin_name].skin is existing. These files are used by
759 * Quake III to be able to assign different skins (e.g. red and blue team)
760 * to models. 'default', 'red', 'blue' are typical skin names.
761 * Property type: String. Default value: "default".
762 */
763 #define AI_CONFIG_IMPORT_MD3_SKIN_NAME \
764 "IMPORT_MD3_SKIN_NAME"
766 // ---------------------------------------------------------------------------
767 /** @brief Specify the Quake 3 shader file to be used for a particular
768 * MD3 file. This can also be a search path.
769 *
770 * By default Assimp's behaviour is as follows: If a MD3 file
771 * <tt>any_path/models/any_q3_subdir/model_name/file_name.md3</tt> is
772 * loaded, the library tries to locate the corresponding shader file in
773 * <tt>any_path/scripts/model_name.shader</tt>. This property overrides this
774 * behaviour. It can either specify a full path to the shader to be loaded
775 * or alternatively the path (relative or absolute) to the directory where
776 * the shaders for all MD3s to be loaded reside. Assimp attempts to open
777 * <tt>IMPORT_MD3_SHADER_SRC/model_name.shader</tt> first, <tt>IMPORT_MD3_SHADER_SRC/file_name.shader</tt>
778 * is the fallback file. Note that IMPORT_MD3_SHADER_SRC should have a terminal (back)slash.
779 * Property type: String. Default value: n/a.
780 */
781 #define AI_CONFIG_IMPORT_MD3_SHADER_SRC \
782 "IMPORT_MD3_SHADER_SRC"
784 // ---------------------------------------------------------------------------
785 /** @brief Configures the LWO loader to load just one layer from the model.
786 *
787 * LWO files consist of layers and in some cases it could be useful to load
788 * only one of them. This property can be either a string - which specifies
789 * the name of the layer - or an integer - the index of the layer. If the
790 * property is not set the whole LWO model is loaded. Loading fails if the
791 * requested layer is not available. The layer index is zero-based and the
792 * layer name may not be empty.<br>
793 * Property type: Integer. Default value: all layers are loaded.
794 */
795 #define AI_CONFIG_IMPORT_LWO_ONE_LAYER_ONLY \
796 "IMPORT_LWO_ONE_LAYER_ONLY"
798 // ---------------------------------------------------------------------------
799 /** @brief Configures the MD5 loader to not load the MD5ANIM file for
800 * a MD5MESH file automatically.
801 *
802 * The default strategy is to look for a file with the same name but the
803 * MD5ANIM extension in the same directory. If it is found, it is loaded
804 * and combined with the MD5MESH file. This configuration option can be
805 * used to disable this behaviour.
806 *
807 * * Property type: bool. Default value: false.
808 */
809 #define AI_CONFIG_IMPORT_MD5_NO_ANIM_AUTOLOAD \
810 "IMPORT_MD5_NO_ANIM_AUTOLOAD"
812 // ---------------------------------------------------------------------------
813 /** @brief Defines the begin of the time range for which the LWS loader
814 * evaluates animations and computes aiNodeAnim's.
815 *
816 * Assimp provides full conversion of LightWave's envelope system, including
817 * pre and post conditions. The loader computes linearly subsampled animation
818 * chanels with the frame rate given in the LWS file. This property defines
819 * the start time. Note: animation channels are only generated if a node
820 * has at least one envelope with more tan one key assigned. This property.
821 * is given in frames, '0' is the first frame. By default, if this property
822 * is not set, the importer takes the animation start from the input LWS
823 * file ('FirstFrame' line)<br>
824 * Property type: Integer. Default value: taken from file.
825 *
826 * @see AI_CONFIG_IMPORT_LWS_ANIM_END - end of the imported time range
827 */
828 #define AI_CONFIG_IMPORT_LWS_ANIM_START \
829 "IMPORT_LWS_ANIM_START"
830 #define AI_CONFIG_IMPORT_LWS_ANIM_END \
831 "IMPORT_LWS_ANIM_END"
833 // ---------------------------------------------------------------------------
834 /** @brief Defines the output frame rate of the IRR loader.
835 *
836 * IRR animations are difficult to convert for Assimp and there will
837 * always be a loss of quality. This setting defines how many keys per second
838 * are returned by the converter.<br>
839 * Property type: integer. Default value: 100
840 */
841 #define AI_CONFIG_IMPORT_IRR_ANIM_FPS \
842 "IMPORT_IRR_ANIM_FPS"
844 // ---------------------------------------------------------------------------
845 /** @brief Ogre Importer will try to find referenced materials from this file.
846 *
847 * Ogre meshes reference with material names, this does not tell Assimp the file
848 * where it is located in. Assimp will try to find the source file in the following
849 * order: <material-name>.material, <mesh-filename-base>.material and
850 * lastly the material name defined by this config property.
851 * <br>
852 * Property type: String. Default value: Scene.material.
853 */
854 #define AI_CONFIG_IMPORT_OGRE_MATERIAL_FILE \
855 "IMPORT_OGRE_MATERIAL_FILE"
857 // ---------------------------------------------------------------------------
858 /** @brief Ogre Importer detect the texture usage from its filename.
859 *
860 * Ogre material texture units do not define texture type, the textures usage
861 * depends on the used shader or Ogre's fixed pipeline. If this config property
862 * is true Assimp will try to detect the type from the textures filename postfix:
863 * _n, _nrm, _nrml, _normal, _normals and _normalmap for normal map, _s, _spec,
864 * _specular and _specularmap for specular map, _l, _light, _lightmap, _occ
865 * and _occlusion for light map, _disp and _displacement for displacement map.
866 * The matching is case insensitive. Post fix is taken between the last
867 * underscore and the last period.
868 * Default behavior is to detect type from lower cased texture unit name by
869 * matching against: normalmap, specularmap, lightmap and displacementmap.
870 * For both cases if no match is found aiTextureType_DIFFUSE is used.
871 * <br>
872 * Property type: Bool. Default value: false.
873 */
874 #define AI_CONFIG_IMPORT_OGRE_TEXTURETYPE_FROM_FILENAME \
875 "IMPORT_OGRE_TEXTURETYPE_FROM_FILENAME"
877 /** @brief Specifies whether the Android JNI asset extraction is supported.
878 *
879 * Turn on this option if you want to manage assets in native
880 * Android application without having to keep the internal directory and asset
881 * manager pointer.
882 */
883 #define AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT "AI_CONFIG_ANDROID_JNI_ASSIMP_MANAGER_SUPPORT"
885 // ---------------------------------------------------------------------------
886 /** @brief Specifies whether the IFC loader skips over IfcSpace elements.
887 *
888 * IfcSpace elements (and their geometric representations) are used to
889 * represent, well, free space in a building storey.<br>
890 * Property type: Bool. Default value: true.
891 */
892 #define AI_CONFIG_IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS "IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS"
894 // ---------------------------------------------------------------------------
895 /** @brief Specifies whether the IFC loader will use its own, custom triangulation
896 * algorithm to triangulate wall and floor meshes.
897 *
898 * If this property is set to false, walls will be either triangulated by
899 * #aiProcess_Triangulate or will be passed through as huge polygons with
900 * faked holes (i.e. holes that are connected with the outer boundary using
901 * a dummy edge). It is highly recommended to set this property to true
902 * if you want triangulated data because #aiProcess_Triangulate is known to
903 * have problems with the kind of polygons that the IFC loader spits out for
904 * complicated meshes.
905 * Property type: Bool. Default value: true.
906 */
907 #define AI_CONFIG_IMPORT_IFC_CUSTOM_TRIANGULATION "IMPORT_IFC_CUSTOM_TRIANGULATION"
909 // ---------------------------------------------------------------------------
910 /** @brief Set the tessellation conic angle for IFC smoothing curves.
911 *
912 * This is used by the IFC importer to determine the tessellation parameter
913 * for smoothing curves.
914 * @note The default value is AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE and the
915 * accepted values are in range [5.0, 120.0].
916 * Property type: Float.
917 */
918 #define AI_CONFIG_IMPORT_IFC_SMOOTHING_ANGLE "IMPORT_IFC_SMOOTHING_ANGLE"
920 // default value for AI_CONFIG_IMPORT_IFC_SMOOTHING_ANGLE
921 #if (!defined AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE)
922 # define AI_IMPORT_IFC_DEFAULT_SMOOTHING_ANGLE 10.0f
923 #endif
925 // ---------------------------------------------------------------------------
926 /** @brief Set the tessellation for IFC cylindrical shapes.
927 *
928 * This is used by the IFC importer to determine the tessellation parameter
929 * for cylindrical shapes, i.e. the number of segments used to approximate a circle.
930 * @note The default value is AI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATION and the
931 * accepted values are in range [3, 180].
932 * Property type: Integer.
933 */
934 #define AI_CONFIG_IMPORT_IFC_CYLINDRICAL_TESSELLATION "IMPORT_IFC_CYLINDRICAL_TESSELLATION"
936 // default value for AI_CONFIG_IMPORT_IFC_CYLINDRICAL_TESSELLATION
937 #if (!defined AI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATION)
938 # define AI_IMPORT_IFC_DEFAULT_CYLINDRICAL_TESSELLATION 32
939 #endif
941 // ---------------------------------------------------------------------------
942 /** @brief Specifies whether the Collada loader will ignore the provided up direction.
943 *
944 * If this property is set to true, the up direction provided in the file header will
945 * be ignored and the file will be loaded as is.
946 * Property type: Bool. Default value: false.
947 */
948 #define AI_CONFIG_IMPORT_COLLADA_IGNORE_UP_DIRECTION "IMPORT_COLLADA_IGNORE_UP_DIRECTION"
950 // ---------------------------------------------------------------------------
951 /** @brief Specifies whether the Collada loader should use Collada names as node names.
952 *
953 * If this property is set to true, the Collada names will be used as the
954 * node name. The default is to use the id tag (resp. sid tag, if no id tag is present)
955 * instead.
956 * Property type: Bool. Default value: false.
957 */
958 #define AI_CONFIG_IMPORT_COLLADA_USE_COLLADA_NAMES "IMPORT_COLLADA_USE_COLLADA_NAMES"
960 // ---------- All the Export defines ------------
962 /** @brief Specifies the xfile use double for real values of float
963 *
964 * Property type: Bool. Default value: false.
965 */
967 #define AI_CONFIG_EXPORT_XFILE_64BIT "EXPORT_XFILE_64BIT"
969 /**
970 *
971 */
972 #define AI_CONFIG_EXPORT_POINT_CLOUDS "EXPORT_POINT_CLOUDS"
974 /**
975 * @brief Specifies a gobal key factor for scale, float value
976 */
977 #define AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY "GLOBAL_SCALE_FACTOR"
979 #if (!defined AI_CONFIG_GLOBAL_SCALE_FACTOR_DEFAULT)
980 # define AI_CONFIG_GLOBAL_SCALE_FACTOR_DEFAULT 1.0f
981 #endif // !! AI_DEBONE_THRESHOLD
983 // ---------- All the Build/Compile-time defines ------------
985 /** @brief Specifies if double precision is supported inside assimp
986 *
987 * Property type: Bool. Default value: undefined.
988 */
990 /* #undef ASSIMP_DOUBLE_PRECISION */
992 #endif // !! AI_CONFIG_H_INC