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