config.h 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846
  1. /*
  2. ---------------------------------------------------------------------------
  3. Open Asset Import Library (assimp)
  4. ---------------------------------------------------------------------------
  5. Copyright (c) 2006-2012, assimp team
  6. All rights reserved.
  7. Redistribution and use of this software in source and binary forms,
  8. with or without modification, are permitted provided that the following
  9. conditions are met:
  10. * Redistributions of source code must retain the above
  11. copyright notice, this list of conditions and the
  12. following disclaimer.
  13. * Redistributions in binary form must reproduce the above
  14. copyright notice, this list of conditions and the
  15. following disclaimer in the documentation and/or other
  16. materials provided with the distribution.
  17. * Neither the name of the assimp team, nor the names of its
  18. contributors may be used to endorse or promote products
  19. derived from this software without specific prior
  20. written permission of the assimp team.
  21. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  24. A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  25. OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  26. SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  27. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  28. DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  29. THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  30. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  31. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. ---------------------------------------------------------------------------
  33. */
  34. /** @file config.h
  35. * @brief Defines constants for configurable properties for the library
  36. *
  37. * Typically these properties are set via
  38. * #Assimp::Importer::SetPropertyFloat,
  39. * #Assimp::Importer::SetPropertyInteger or
  40. * #Assimp::Importer::SetPropertyString,
  41. * depending on the data type of a property. All properties have a
  42. * default value. See the doc for the mentioned methods for more details.
  43. *
  44. * <br><br>
  45. * The corresponding functions for use with the plain-c API are:
  46. * #aiSetImportPropertyInteger,
  47. * #aiSetImportPropertyFloat,
  48. * #aiSetImportPropertyString
  49. */
  50. #ifndef INCLUDED_AI_CONFIG_H
  51. #define INCLUDED_AI_CONFIG_H
  52. // ###########################################################################
  53. // LIBRARY SETTINGS
  54. // General, global settings
  55. // ###########################################################################
  56. // ---------------------------------------------------------------------------
  57. /** @brief Enables time measurements.
  58. *
  59. * If enabled, measures the time needed for each part of the loading
  60. * process (i.e. IO time, importing, postprocessing, ..) and dumps
  61. * these timings to the DefaultLogger. See the @link perf Performance
  62. * Page@endlink for more information on this topic.
  63. *
  64. * Property type: bool. Default value: false.
  65. */
  66. #define AI_CONFIG_GLOB_MEASURE_TIME \
  67. "GLOB_MEASURE_TIME"
  68. // ---------------------------------------------------------------------------
  69. /** @brief Global setting to disable generation of skeleton dummy meshes
  70. *
  71. * Skeleton dummy meshes are generated as a visualization aid in cases which
  72. * the input data contains no geometry, but only animation data.
  73. * Property data type: bool. Default value: false
  74. */
  75. // ---------------------------------------------------------------------------
  76. #define AI_CONFIG_IMPORT_NO_SKELETON_MESHES \
  77. "IMPORT_NO_SKELETON_MESHES"
  78. # if 0 // not implemented yet
  79. // ---------------------------------------------------------------------------
  80. /** @brief Set Assimp's multithreading policy.
  81. *
  82. * This setting is ignored if Assimp was built without boost.thread
  83. * support (ASSIMP_BUILD_NO_THREADING, which is implied by ASSIMP_BUILD_BOOST_WORKAROUND).
  84. * Possible values are: -1 to let Assimp decide what to do, 0 to disable
  85. * multithreading entirely and any number larger than 0 to force a specific
  86. * number of threads. Assimp is always free to ignore this settings, which is
  87. * merely a hint. Usually, the default value (-1) will be fine. However, if
  88. * Assimp is used concurrently from multiple user threads, it might be useful
  89. * to limit each Importer instance to a specific number of cores.
  90. *
  91. * For more information, see the @link threading Threading page@endlink.
  92. * Property type: int, default value: -1.
  93. */
  94. #define AI_CONFIG_GLOB_MULTITHREADING \
  95. "GLOB_MULTITHREADING"
  96. #endif
  97. // ###########################################################################
  98. // POST PROCESSING SETTINGS
  99. // Various stuff to fine-tune the behavior of a specific post processing step.
  100. // ###########################################################################
  101. // ---------------------------------------------------------------------------
  102. /** @brief Maximum bone count per mesh for the SplitbyBoneCount step.
  103. *
  104. * Meshes are split until the maximum number of bones is reached. The default
  105. * value is AI_SBBC_DEFAULT_MAX_BONES, which may be altered at
  106. * compile-time.
  107. * Property data type: integer.
  108. */
  109. // ---------------------------------------------------------------------------
  110. #define AI_CONFIG_PP_SBBC_MAX_BONES \
  111. "PP_SBBC_MAX_BONES"
  112. // default limit for bone count
  113. #if (!defined AI_SBBC_DEFAULT_MAX_BONES)
  114. # define AI_SBBC_DEFAULT_MAX_BONES 60
  115. #endif
  116. // ---------------------------------------------------------------------------
  117. /** @brief Specifies the maximum angle that may be between two vertex tangents
  118. * that their tangents and bi-tangents are smoothed.
  119. *
  120. * This applies to the CalcTangentSpace-Step. The angle is specified
  121. * in degrees. The maximum value is 175.
  122. * Property type: float. Default value: 45 degrees
  123. */
  124. #define AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE \
  125. "PP_CT_MAX_SMOOTHING_ANGLE"
  126. // ---------------------------------------------------------------------------
  127. /** @brief Source UV channel for tangent space computation.
  128. *
  129. * The specified channel must exist or an error will be raised.
  130. * Property type: integer. Default value: 0
  131. */
  132. // ---------------------------------------------------------------------------
  133. #define AI_CONFIG_PP_CT_TEXTURE_CHANNEL_INDEX \
  134. "PP_CT_TEXTURE_CHANNEL_INDEX"
  135. // ---------------------------------------------------------------------------
  136. /** @brief Specifies the maximum angle that may be between two face normals
  137. * at the same vertex position that their are smoothed together.
  138. *
  139. * Sometimes referred to as 'crease angle'.
  140. * This applies to the GenSmoothNormals-Step. The angle is specified
  141. * in degrees, so 180 is PI. The default value is 175 degrees (all vertex
  142. * normals are smoothed). The maximum value is 175, too. Property type: float.
  143. * Warning: setting this option may cause a severe loss of performance. The
  144. * performance is unaffected if the #AI_CONFIG_FAVOUR_SPEED flag is set but
  145. * the output quality may be reduced.
  146. */
  147. #define AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE \
  148. "PP_GSN_MAX_SMOOTHING_ANGLE"
  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. /** @brief Configures the #aiProcess_RemoveRedundantMaterials step to
  163. * keep materials matching a name in a given list.
  164. *
  165. * This is a list of 1 to n strings, ' ' serves as delimiter character.
  166. * Identifiers containing whitespaces must be enclosed in *single*
  167. * quotation marks. For example:<tt>
  168. * "keep-me and_me_to anotherMaterialToBeKept \'name with whitespace\'"</tt>.
  169. * If a material matches on of these names, it will not be modified or
  170. * removed by the postprocessing step nor will other materials be replaced
  171. * by a reference to it. <br>
  172. * This option might be useful if you are using some magic material names
  173. * to pass additional semantics through the content pipeline. This ensures
  174. * they won't be optimized away, but a general optimization is still
  175. * performed for materials not contained in the list.
  176. * Property type: String. Default value: n/a
  177. * @note Linefeeds, tabs or carriage returns are treated as whitespace.
  178. * Material names are case sensitive.
  179. */
  180. #define AI_CONFIG_PP_RRM_EXCLUDE_LIST \
  181. "PP_RRM_EXCLUDE_LIST"
  182. // ---------------------------------------------------------------------------
  183. /** @brief Configures the #aiProcess_PretransformVertices step to
  184. * keep the scene hierarchy. Meshes are moved to worldspace, but
  185. * no optimization is performed (read: meshes with equal materials are not
  186. * joined. The total number of meshes won't change).
  187. *
  188. * This option could be of use for you if the scene hierarchy contains
  189. * important additional information which you intend to parse.
  190. * For rendering, you can still render all meshes in the scene without
  191. * any transformations.
  192. * Property type: bool. Default value: false.
  193. */
  194. #define AI_CONFIG_PP_PTV_KEEP_HIERARCHY \
  195. "PP_PTV_KEEP_HIERARCHY"
  196. // ---------------------------------------------------------------------------
  197. /** @brief Configures the #aiProcess_PretransformVertices step to normalize
  198. * all vertex components into the [-1,1] range. That is, a bounding box
  199. * for the whole scene is computed, the maximum component is taken and all
  200. * meshes are scaled appropriately (uniformly of course!).
  201. * This might be useful if you don't know the spatial dimension of the input
  202. * data*/
  203. #define AI_CONFIG_PP_PTV_NORMALIZE \
  204. "PP_PTV_NORMALIZE"
  205. // ---------------------------------------------------------------------------
  206. /** @brief Configures the #aiProcess_FindDegenerates step to
  207. * remove degenerated primitives from the import - immediately.
  208. *
  209. * The default behaviour converts degenerated triangles to lines and
  210. * degenerated lines to points. See the documentation to the
  211. * #aiProcess_FindDegenerates step for a detailed example of the various ways
  212. * to get rid of these lines and points if you don't want them.
  213. * Property type: bool. Default value: false.
  214. */
  215. #define AI_CONFIG_PP_FD_REMOVE \
  216. "PP_FD_REMOVE"
  217. // ---------------------------------------------------------------------------
  218. /** @brief Configures the #aiProcess_OptimizeGraph step to preserve nodes
  219. * matching a name in a given list.
  220. *
  221. * This is a list of 1 to n strings, ' ' serves as delimiter character.
  222. * Identifiers containing whitespaces must be enclosed in *single*
  223. * quotation marks. For example:<tt>
  224. * "keep-me and_me_to anotherNodeToBeKept \'name with whitespace\'"</tt>.
  225. * If a node matches on of these names, it will not be modified or
  226. * removed by the postprocessing step.<br>
  227. * This option might be useful if you are using some magic node names
  228. * to pass additional semantics through the content pipeline. This ensures
  229. * they won't be optimized away, but a general optimization is still
  230. * performed for nodes not contained in the list.
  231. * Property type: String. Default value: n/a
  232. * @note Linefeeds, tabs or carriage returns are treated as whitespace.
  233. * Node names are case sensitive.
  234. */
  235. #define AI_CONFIG_PP_OG_EXCLUDE_LIST \
  236. "PP_OG_EXCLUDE_LIST"
  237. // ---------------------------------------------------------------------------
  238. /** @brief Set the maximum number of triangles in a mesh.
  239. *
  240. * This is used by the "SplitLargeMeshes" PostProcess-Step to determine
  241. * whether a mesh must be split or not.
  242. * @note The default value is AI_SLM_DEFAULT_MAX_TRIANGLES
  243. * Property type: integer.
  244. */
  245. #define AI_CONFIG_PP_SLM_TRIANGLE_LIMIT \
  246. "PP_SLM_TRIANGLE_LIMIT"
  247. // default value for AI_CONFIG_PP_SLM_TRIANGLE_LIMIT
  248. #if (!defined AI_SLM_DEFAULT_MAX_TRIANGLES)
  249. # define AI_SLM_DEFAULT_MAX_TRIANGLES 1000000
  250. #endif
  251. // ---------------------------------------------------------------------------
  252. /** @brief Set the maximum number of vertices in a mesh.
  253. *
  254. * This is used by the "SplitLargeMeshes" PostProcess-Step to determine
  255. * whether a mesh must be split or not.
  256. * @note The default value is AI_SLM_DEFAULT_MAX_VERTICES
  257. * Property type: integer.
  258. */
  259. #define AI_CONFIG_PP_SLM_VERTEX_LIMIT \
  260. "PP_SLM_VERTEX_LIMIT"
  261. // default value for AI_CONFIG_PP_SLM_VERTEX_LIMIT
  262. #if (!defined AI_SLM_DEFAULT_MAX_VERTICES)
  263. # define AI_SLM_DEFAULT_MAX_VERTICES 1000000
  264. #endif
  265. // ---------------------------------------------------------------------------
  266. /** @brief Set the maximum number of bones affecting a single vertex
  267. *
  268. * This is used by the #aiProcess_LimitBoneWeights PostProcess-Step.
  269. * @note The default value is AI_LBW_MAX_WEIGHTS
  270. * Property type: integer.*/
  271. #define AI_CONFIG_PP_LBW_MAX_WEIGHTS \
  272. "PP_LBW_MAX_WEIGHTS"
  273. // default value for AI_CONFIG_PP_LBW_MAX_WEIGHTS
  274. #if (!defined AI_LMW_MAX_WEIGHTS)
  275. # define AI_LMW_MAX_WEIGHTS 0x4
  276. #endif // !! AI_LMW_MAX_WEIGHTS
  277. // ---------------------------------------------------------------------------
  278. /** @brief Lower the deboning threshold in order to remove more bones.
  279. *
  280. * This is used by the #aiProcess_Debone PostProcess-Step.
  281. * @note The default value is AI_DEBONE_THRESHOLD
  282. * Property type: float.*/
  283. #define AI_CONFIG_PP_DB_THRESHOLD \
  284. "PP_DB_THRESHOLD"
  285. // default value for AI_CONFIG_PP_LBW_MAX_WEIGHTS
  286. #if (!defined AI_DEBONE_THRESHOLD)
  287. # define AI_DEBONE_THRESHOLD 1.0f
  288. #endif // !! AI_DEBONE_THRESHOLD
  289. // ---------------------------------------------------------------------------
  290. /** @brief Require all bones qualify for deboning before removing any
  291. *
  292. * This is used by the #aiProcess_Debone PostProcess-Step.
  293. * @note The default value is 0
  294. * Property type: bool.*/
  295. #define AI_CONFIG_PP_DB_ALL_OR_NONE \
  296. "PP_DB_ALL_OR_NONE"
  297. /** @brief Default value for the #AI_CONFIG_PP_ICL_PTCACHE_SIZE property
  298. */
  299. #ifndef PP_ICL_PTCACHE_SIZE
  300. # define PP_ICL_PTCACHE_SIZE 12
  301. #endif
  302. // ---------------------------------------------------------------------------
  303. /** @brief Set the size of the post-transform vertex cache to optimize the
  304. * vertices for. This configures the #aiProcess_ImproveCacheLocality step.
  305. *
  306. * The size is given in vertices. Of course you can't know how the vertex
  307. * format will exactly look like after the import returns, but you can still
  308. * guess what your meshes will probably have.
  309. * @note The default value is #PP_ICL_PTCACHE_SIZE. That results in slight
  310. * performance improvements for most nVidia/AMD cards since 2002.
  311. * Property type: integer.
  312. */
  313. #define AI_CONFIG_PP_ICL_PTCACHE_SIZE "PP_ICL_PTCACHE_SIZE"
  314. // ---------------------------------------------------------------------------
  315. /** @brief Enumerates components of the aiScene and aiMesh data structures
  316. * that can be excluded from the import using the #aiPrpcess_RemoveComponent step.
  317. *
  318. * See the documentation to #aiProcess_RemoveComponent for more details.
  319. */
  320. enum aiComponent
  321. {
  322. /** Normal vectors */
  323. #ifdef SWIG
  324. aiComponent_NORMALS = 0x2,
  325. #else
  326. aiComponent_NORMALS = 0x2u,
  327. #endif
  328. /** Tangents and bitangents go always together ... */
  329. #ifdef SWIG
  330. aiComponent_TANGENTS_AND_BITANGENTS = 0x4,
  331. #else
  332. aiComponent_TANGENTS_AND_BITANGENTS = 0x4u,
  333. #endif
  334. /** ALL color sets
  335. * Use aiComponent_COLORn(N) to specify the N'th set */
  336. aiComponent_COLORS = 0x8,
  337. /** ALL texture UV sets
  338. * aiComponent_TEXCOORDn(N) to specify the N'th set */
  339. aiComponent_TEXCOORDS = 0x10,
  340. /** Removes all bone weights from all meshes.
  341. * The scenegraph nodes corresponding to the bones are NOT removed.
  342. * use the #aiProcess_OptimizeGraph step to do this */
  343. aiComponent_BONEWEIGHTS = 0x20,
  344. /** Removes all node animations (aiScene::mAnimations).
  345. * The corresponding scenegraph nodes are NOT removed.
  346. * use the #aiProcess_OptimizeGraph step to do this */
  347. aiComponent_ANIMATIONS = 0x40,
  348. /** Removes all embedded textures (aiScene::mTextures) */
  349. aiComponent_TEXTURES = 0x80,
  350. /** Removes all light sources (aiScene::mLights).
  351. * The corresponding scenegraph nodes are NOT removed.
  352. * use the #aiProcess_OptimizeGraph step to do this */
  353. aiComponent_LIGHTS = 0x100,
  354. /** Removes all cameras (aiScene::mCameras).
  355. * The corresponding scenegraph nodes are NOT removed.
  356. * use the #aiProcess_OptimizeGraph step to do this */
  357. aiComponent_CAMERAS = 0x200,
  358. /** Removes all meshes (aiScene::mMeshes). */
  359. aiComponent_MESHES = 0x400,
  360. /** Removes all materials. One default material will
  361. * be generated, so aiScene::mNumMaterials will be 1. */
  362. aiComponent_MATERIALS = 0x800,
  363. /** This value is not used. It is just there to force the
  364. * compiler to map this enum to a 32 Bit integer. */
  365. #ifndef SWIG
  366. _aiComponent_Force32Bit = 0x9fffffff
  367. #endif
  368. };
  369. // Remove a specific color channel 'n'
  370. #define aiComponent_COLORSn(n) (1u << (n+20u))
  371. // Remove a specific UV channel 'n'
  372. #define aiComponent_TEXCOORDSn(n) (1u << (n+25u))
  373. // ---------------------------------------------------------------------------
  374. /** @brief Input parameter to the #aiProcess_RemoveComponent step:
  375. * Specifies the parts of the data structure to be removed.
  376. *
  377. * See the documentation to this step for further details. The property
  378. * is expected to be an integer, a bitwise combination of the
  379. * #aiComponent flags defined above in this header. The default
  380. * value is 0. Important: if no valid mesh is remaining after the
  381. * step has been executed (e.g you thought it was funny to specify ALL
  382. * of the flags defined above) the import FAILS. Mainly because there is
  383. * no data to work on anymore ...
  384. */
  385. #define AI_CONFIG_PP_RVC_FLAGS \
  386. "PP_RVC_FLAGS"
  387. // ---------------------------------------------------------------------------
  388. /** @brief Input parameter to the #aiProcess_SortByPType step:
  389. * Specifies which primitive types are removed by the step.
  390. *
  391. * This is a bitwise combination of the aiPrimitiveType flags.
  392. * Specifying all of them is illegal, of course. A typical use would
  393. * be to exclude all line and point meshes from the import. This
  394. * is an integer property, its default value is 0.
  395. */
  396. #define AI_CONFIG_PP_SBP_REMOVE \
  397. "PP_SBP_REMOVE"
  398. // ---------------------------------------------------------------------------
  399. /** @brief Input parameter to the #aiProcess_FindInvalidData step:
  400. * Specifies the floating-point accuracy for animation values. The step
  401. * checks for animation tracks where all frame values are absolutely equal
  402. * and removes them. This tweakable controls the epsilon for floating-point
  403. * comparisons - two keys are considered equal if the invariant
  404. * abs(n0-n1)>epsilon holds true for all vector respectively quaternion
  405. * components. The default value is 0.f - comparisons are exact then.
  406. */
  407. #define AI_CONFIG_PP_FID_ANIM_ACCURACY \
  408. "PP_FID_ANIM_ACCURACY"
  409. // TransformUVCoords evaluates UV scalings
  410. #define AI_UVTRAFO_SCALING 0x1
  411. // TransformUVCoords evaluates UV rotations
  412. #define AI_UVTRAFO_ROTATION 0x2
  413. // TransformUVCoords evaluates UV translation
  414. #define AI_UVTRAFO_TRANSLATION 0x4
  415. // Everything baked together -> default value
  416. #define AI_UVTRAFO_ALL (AI_UVTRAFO_SCALING | AI_UVTRAFO_ROTATION | AI_UVTRAFO_TRANSLATION)
  417. // ---------------------------------------------------------------------------
  418. /** @brief Input parameter to the #aiProcess_TransformUVCoords step:
  419. * Specifies which UV transformations are evaluated.
  420. *
  421. * This is a bitwise combination of the AI_UVTRAFO_XXX flags (integer
  422. * property, of course). By default all transformations are enabled
  423. * (AI_UVTRAFO_ALL).
  424. */
  425. #define AI_CONFIG_PP_TUV_EVALUATE \
  426. "PP_TUV_EVALUATE"
  427. // ---------------------------------------------------------------------------
  428. /** @brief A hint to assimp to favour speed against import quality.
  429. *
  430. * Enabling this option may result in faster loading, but it needn't.
  431. * It represents just a hint to loaders and post-processing steps to use
  432. * faster code paths, if possible.
  433. * This property is expected to be an integer, != 0 stands for true.
  434. * The default value is 0.
  435. */
  436. #define AI_CONFIG_FAVOUR_SPEED \
  437. "FAVOUR_SPEED"
  438. // ###########################################################################
  439. // IMPORTER SETTINGS
  440. // Various stuff to fine-tune the behaviour of specific importer plugins.
  441. // ###########################################################################
  442. // ---------------------------------------------------------------------------
  443. /** @brief Set whether the fbx importer will merge all geometry layers present
  444. * in the source file or take only the first.
  445. *
  446. * The default value is true (1)
  447. * Property type: bool
  448. */
  449. #define AI_CONFIG_IMPORT_FBX_READ_ALL_GEOMETRY_LAYERS \
  450. "IMPORT_FBX_READ_ALL_GEOMETRY_LAYERS"
  451. // ---------------------------------------------------------------------------
  452. /** @brief Set whether the fbx importer will read all materials present in the
  453. * source file or take only the referenced materials.
  454. *
  455. * This is void unless IMPORT_FBX_READ_MATERIALS=1.
  456. *
  457. * The default value is false (0)
  458. * Property type: bool
  459. */
  460. #define AI_CONFIG_IMPORT_FBX_READ_ALL_MATERIALS \
  461. "IMPORT_FBX_READ_ALL_MATERIALS"
  462. // ---------------------------------------------------------------------------
  463. /** @brief Set whether the fbx importer will read materials.
  464. *
  465. * The default value is true (1)
  466. * Property type: bool
  467. */
  468. #define AI_CONFIG_IMPORT_FBX_READ_MATERIALS \
  469. "IMPORT_FBX_READ_MATERIALS"
  470. // ---------------------------------------------------------------------------
  471. /** @brief Set whether the fbx importer will read cameras.
  472. *
  473. * The default value is true (1)
  474. * Property type: bool
  475. */
  476. #define AI_CONFIG_IMPORT_FBX_READ_CAMERAS \
  477. "IMPORT_FBX_READ_CAMERAS"
  478. // ---------------------------------------------------------------------------
  479. /** @brief Set whether the fbx importer will read light sources.
  480. *
  481. * The default value is true (1)
  482. * Property type: bool
  483. */
  484. #define AI_CONFIG_IMPORT_FBX_READ_LIGHTS \
  485. "IMPORT_FBX_READ_LIGHTS"
  486. // ---------------------------------------------------------------------------
  487. /** @brief Set whether the fbx importer will read animations.
  488. *
  489. * The default value is true (1)
  490. * Property type: bool
  491. */
  492. #define AI_CONFIG_IMPORT_FBX_READ_ANIMATIONS \
  493. "IMPORT_FBX_READ_ANIMATIONS"
  494. // ---------------------------------------------------------------------------
  495. /** @brief Set whether the fbx importer will act in strict mode in which only
  496. * FBX 2013 is supported and any other sub formats are rejected. FBX 2013
  497. * is the primary target for the importer, so this format is best
  498. * supported and well-tested.
  499. *
  500. * The default value is false (0)
  501. * Property type: bool
  502. */
  503. #define AI_CONFIG_IMPORT_FBX_STRICT_MODE \
  504. "IMPORT_FBX_STRICT_MODE"
  505. // ---------------------------------------------------------------------------
  506. /** @brief Set whether the fbx importer will preserve pivot points for
  507. * transformations (as extra nodes). If set to false, pivots and offsets
  508. * will be evaluated whenever possible.
  509. *
  510. * The default value is true (1)
  511. * Property type: bool
  512. */
  513. #define AI_CONFIG_IMPORT_FBX_PRESERVE_PIVOTS \
  514. "IMPORT_FBX_PRESERVE_PIVOTS"
  515. // ---------------------------------------------------------------------------
  516. /** @brief Specifies whether the importer will drop empty animation curves or
  517. * animation curves which match the bind pose transformation over their
  518. * entire defined range.
  519. *
  520. * The default value is true (1)
  521. * Property type: bool
  522. */
  523. #define AI_CONFIG_IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES \
  524. "IMPORT_FBX_OPTIMIZE_EMPTY_ANIMATION_CURVES"
  525. // ---------------------------------------------------------------------------
  526. /** @brief Set the vertex animation keyframe to be imported
  527. *
  528. * ASSIMP does not support vertex keyframes (only bone animation is supported).
  529. * The library reads only one frame of models with vertex animations.
  530. * By default this is the first frame.
  531. * \note The default value is 0. This option applies to all importers.
  532. * However, it is also possible to override the global setting
  533. * for a specific loader. You can use the AI_CONFIG_IMPORT_XXX_KEYFRAME
  534. * options (where XXX is a placeholder for the file format for which you
  535. * want to override the global setting).
  536. * Property type: integer.
  537. */
  538. #define AI_CONFIG_IMPORT_GLOBAL_KEYFRAME "IMPORT_GLOBAL_KEYFRAME"
  539. #define AI_CONFIG_IMPORT_MD3_KEYFRAME "IMPORT_MD3_KEYFRAME"
  540. #define AI_CONFIG_IMPORT_MD2_KEYFRAME "IMPORT_MD2_KEYFRAME"
  541. #define AI_CONFIG_IMPORT_MDL_KEYFRAME "IMPORT_MDL_KEYFRAME"
  542. #define AI_CONFIG_IMPORT_MDC_KEYFRAME "IMPORT_MDC_KEYFRAME"
  543. #define AI_CONFIG_IMPORT_SMD_KEYFRAME "IMPORT_SMD_KEYFRAME"
  544. #define AI_CONFIG_IMPORT_UNREAL_KEYFRAME "IMPORT_UNREAL_KEYFRAME"
  545. // ---------------------------------------------------------------------------
  546. /** @brief Configures the AC loader to collect all surfaces which have the
  547. * "Backface cull" flag set in separate meshes.
  548. *
  549. * Property type: bool. Default value: true.
  550. */
  551. #define AI_CONFIG_IMPORT_AC_SEPARATE_BFCULL \
  552. "IMPORT_AC_SEPARATE_BFCULL"
  553. // ---------------------------------------------------------------------------
  554. /** @brief Configures whether the AC loader evaluates subdivision surfaces (
  555. * indicated by the presence of the 'subdiv' attribute in the file). By
  556. * default, Assimp performs the subdivision using the standard
  557. * Catmull-Clark algorithm
  558. *
  559. * * Property type: bool. Default value: true.
  560. */
  561. #define AI_CONFIG_IMPORT_AC_EVAL_SUBDIVISION \
  562. "IMPORT_AC_EVAL_SUBDIVISION"
  563. // ---------------------------------------------------------------------------
  564. /** @brief Configures the UNREAL 3D loader to separate faces with different
  565. * surface flags (e.g. two-sided vs. single-sided).
  566. *
  567. * * Property type: bool. Default value: true.
  568. */
  569. #define AI_CONFIG_IMPORT_UNREAL_HANDLE_FLAGS \
  570. "UNREAL_HANDLE_FLAGS"
  571. // ---------------------------------------------------------------------------
  572. /** @brief Configures the terragen import plugin to compute uv's for
  573. * terrains, if not given. Furthermore a default texture is assigned.
  574. *
  575. * UV coordinates for terrains are so simple to compute that you'll usually
  576. * want to compute them on your own, if you need them. This option is intended
  577. * for model viewers which want to offer an easy way to apply textures to
  578. * terrains.
  579. * * Property type: bool. Default value: false.
  580. */
  581. #define AI_CONFIG_IMPORT_TER_MAKE_UVS \
  582. "IMPORT_TER_MAKE_UVS"
  583. // ---------------------------------------------------------------------------
  584. /** @brief Configures the ASE loader to always reconstruct normal vectors
  585. * basing on the smoothing groups loaded from the file.
  586. *
  587. * Some ASE files have carry invalid normals, other don't.
  588. * * Property type: bool. Default value: true.
  589. */
  590. #define AI_CONFIG_IMPORT_ASE_RECONSTRUCT_NORMALS \
  591. "IMPORT_ASE_RECONSTRUCT_NORMALS"
  592. // ---------------------------------------------------------------------------
  593. /** @brief Configures the M3D loader to detect and process multi-part
  594. * Quake player models.
  595. *
  596. * These models usually consist of 3 files, lower.md3, upper.md3 and
  597. * head.md3. If this property is set to true, Assimp will try to load and
  598. * combine all three files if one of them is loaded.
  599. * Property type: bool. Default value: true.
  600. */
  601. #define AI_CONFIG_IMPORT_MD3_HANDLE_MULTIPART \
  602. "IMPORT_MD3_HANDLE_MULTIPART"
  603. // ---------------------------------------------------------------------------
  604. /** @brief Tells the MD3 loader which skin files to load.
  605. *
  606. * When loading MD3 files, Assimp checks whether a file
  607. * <md3_file_name>_<skin_name>.skin is existing. These files are used by
  608. * Quake III to be able to assign different skins (e.g. red and blue team)
  609. * to models. 'default', 'red', 'blue' are typical skin names.
  610. * Property type: String. Default value: "default".
  611. */
  612. #define AI_CONFIG_IMPORT_MD3_SKIN_NAME \
  613. "IMPORT_MD3_SKIN_NAME"
  614. // ---------------------------------------------------------------------------
  615. /** @brief Specify the Quake 3 shader file to be used for a particular
  616. * MD3 file. This can also be a search path.
  617. *
  618. * By default Assimp's behaviour is as follows: If a MD3 file
  619. * <tt><any_path>/models/<any_q3_subdir>/<model_name>/<file_name>.md3</tt> is
  620. * loaded, the library tries to locate the corresponding shader file in
  621. * <tt><any_path>/scripts/<model_name>.shader</tt>. This property overrides this
  622. * behaviour. It can either specify a full path to the shader to be loaded
  623. * or alternatively the path (relative or absolute) to the directory where
  624. * the shaders for all MD3s to be loaded reside. Assimp attempts to open
  625. * <tt><dir>/<model_name>.shader</tt> first, <tt><dir>/<file_name>.shader</tt>
  626. * is the fallback file. Note that <dir> should have a terminal (back)slash.
  627. * Property type: String. Default value: n/a.
  628. */
  629. #define AI_CONFIG_IMPORT_MD3_SHADER_SRC \
  630. "IMPORT_MD3_SHADER_SRC"
  631. // ---------------------------------------------------------------------------
  632. /** @brief Configures the LWO loader to load just one layer from the model.
  633. *
  634. * LWO files consist of layers and in some cases it could be useful to load
  635. * only one of them. This property can be either a string - which specifies
  636. * the name of the layer - or an integer - the index of the layer. If the
  637. * property is not set the whole LWO model is loaded. Loading fails if the
  638. * requested layer is not available. The layer index is zero-based and the
  639. * layer name may not be empty.<br>
  640. * Property type: Integer. Default value: all layers are loaded.
  641. */
  642. #define AI_CONFIG_IMPORT_LWO_ONE_LAYER_ONLY \
  643. "IMPORT_LWO_ONE_LAYER_ONLY"
  644. // ---------------------------------------------------------------------------
  645. /** @brief Configures the MD5 loader to not load the MD5ANIM file for
  646. * a MD5MESH file automatically.
  647. *
  648. * The default strategy is to look for a file with the same name but the
  649. * MD5ANIM extension in the same directory. If it is found, it is loaded
  650. * and combined with the MD5MESH file. This configuration option can be
  651. * used to disable this behaviour.
  652. *
  653. * * Property type: bool. Default value: false.
  654. */
  655. #define AI_CONFIG_IMPORT_MD5_NO_ANIM_AUTOLOAD \
  656. "IMPORT_MD5_NO_ANIM_AUTOLOAD"
  657. // ---------------------------------------------------------------------------
  658. /** @brief Defines the begin of the time range for which the LWS loader
  659. * evaluates animations and computes aiNodeAnim's.
  660. *
  661. * Assimp provides full conversion of LightWave's envelope system, including
  662. * pre and post conditions. The loader computes linearly subsampled animation
  663. * chanels with the frame rate given in the LWS file. This property defines
  664. * the start time. Note: animation channels are only generated if a node
  665. * has at least one envelope with more tan one key assigned. This property.
  666. * is given in frames, '0' is the first frame. By default, if this property
  667. * is not set, the importer takes the animation start from the input LWS
  668. * file ('FirstFrame' line)<br>
  669. * Property type: Integer. Default value: taken from file.
  670. *
  671. * @see AI_CONFIG_IMPORT_LWS_ANIM_END - end of the imported time range
  672. */
  673. #define AI_CONFIG_IMPORT_LWS_ANIM_START \
  674. "IMPORT_LWS_ANIM_START"
  675. #define AI_CONFIG_IMPORT_LWS_ANIM_END \
  676. "IMPORT_LWS_ANIM_END"
  677. // ---------------------------------------------------------------------------
  678. /** @brief Defines the output frame rate of the IRR loader.
  679. *
  680. * IRR animations are difficult to convert for Assimp and there will
  681. * always be a loss of quality. This setting defines how many keys per second
  682. * are returned by the converter.<br>
  683. * Property type: integer. Default value: 100
  684. */
  685. #define AI_CONFIG_IMPORT_IRR_ANIM_FPS \
  686. "IMPORT_IRR_ANIM_FPS"
  687. // ---------------------------------------------------------------------------
  688. /** @brief Ogre Importer will try to load this Materialfile.
  689. *
  690. * Ogre Meshes contain only the MaterialName, not the MaterialFile. If there
  691. * is no material file with the same name as the material, Ogre Importer will
  692. * try to load this file and search the material in it.
  693. * <br>
  694. * Property type: String. Default value: guessed.
  695. */
  696. #define AI_CONFIG_IMPORT_OGRE_MATERIAL_FILE "IMPORT_OGRE_MATERIAL_FILE"
  697. // ---------------------------------------------------------------------------
  698. /** @brief Ogre Importer detect the texture usage from its filename
  699. *
  700. * Normally, a texture is loaded as a colormap, if no target is specified in the
  701. * materialfile. Is this switch is enabled, texture names ending with _n, _l, _s
  702. * are used as normalmaps, lightmaps or specularmaps.
  703. * <br>
  704. * Property type: Bool. Default value: false.
  705. */
  706. #define AI_CONFIG_IMPORT_OGRE_TEXTURETYPE_FROM_FILENAME "IMPORT_OGRE_TEXTURETYPE_FROM_FILENAME"
  707. /** @brief Specifies whether the IFC loader skips over IfcSpace elements.
  708. *
  709. * IfcSpace elements (and their geometric representations) are used to
  710. * represent, well, free space in a building storey.<br>
  711. * Property type: Bool. Default value: true.
  712. */
  713. #define AI_CONFIG_IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS "IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS"
  714. // ---------------------------------------------------------------------------
  715. /** @brief Specifies whether the IFC loader skips over
  716. * shape representations of type 'Curve2D'.
  717. *
  718. * A lot of files contain both a faceted mesh representation and a outline
  719. * with a presentation type of 'Curve2D'. Currently Assimp doesn't convert those,
  720. * so turning this option off just clutters the log with errors.<br>
  721. * Property type: Bool. Default value: true.
  722. */
  723. #define AI_CONFIG_IMPORT_IFC_SKIP_CURVE_REPRESENTATIONS "IMPORT_IFC_SKIP_CURVE_REPRESENTATIONS"
  724. // ---------------------------------------------------------------------------
  725. /** @brief Specifies whether the IFC loader will use its own, custom triangulation
  726. * algorithm to triangulate wall and floor meshes.
  727. *
  728. * If this property is set to false, walls will be either triangulated by
  729. * #aiProcess_Triangulate or will be passed through as huge polygons with
  730. * faked holes (i.e. holes that are connected with the outer boundary using
  731. * a dummy edge). It is highly recommended to set this property to true
  732. * if you want triangulated data because #aiProcess_Triangulate is known to
  733. * have problems with the kind of polygons that the IFC loader spits out for
  734. * complicated meshes.
  735. * Property type: Bool. Default value: true.
  736. */
  737. #define AI_CONFIG_IMPORT_IFC_CUSTOM_TRIANGULATION "IMPORT_IFC_CUSTOM_TRIANGULATION"
  738. #define AI_CONFIG_IMPORT_COLLADA_IGNORE_UP_DIRECTION "IMPORT_COLLADA_IGNORE_UP_DIRECTION"
  739. #endif // !! AI_CONFIG_H_INC