config.h 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738
  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. # if 0 // not implemented yet
  69. // ---------------------------------------------------------------------------
  70. /** @brief Set Assimp's multithreading policy.
  71. *
  72. * This setting is ignored if Assimp was built without boost.thread
  73. * support (ASSIMP_BUILD_NO_THREADING, which is implied by ASSIMP_BUILD_BOOST_WORKAROUND).
  74. * Possible values are: -1 to let Assimp decide what to do, 0 to disable
  75. * multithreading entirely and any number larger than 0 to force a specific
  76. * number of threads. Assimp is always free to ignore this settings, which is
  77. * merely a hint. Usually, the default value (-1) will be fine. However, if
  78. * Assimp is used concurrently from multiple user threads, it might be useful
  79. * to limit each Importer instance to a specific number of cores.
  80. *
  81. * For more information, see the @link threading Threading page@endlink.
  82. * Property type: int, default value: -1.
  83. */
  84. #define AI_CONFIG_GLOB_MULTITHREADING \
  85. "GLOB_MULTITHREADING"
  86. #endif
  87. // ###########################################################################
  88. // POST PROCESSING SETTINGS
  89. // Various stuff to fine-tune the behavior of a specific post processing step.
  90. // ###########################################################################
  91. // ---------------------------------------------------------------------------
  92. /** @brief Maximum bone count per mesh for the SplitbyBoneCount step.
  93. *
  94. * Meshes are split until the maximum number of bones is reached. The default
  95. * value is AI_SBBC_DEFAULT_MAX_BONES, which may be altered at
  96. * compile-time.
  97. * Property data type: integer.
  98. */
  99. // ---------------------------------------------------------------------------
  100. #define AI_CONFIG_PP_SBBC_MAX_BONES \
  101. "PP_SBBC_MAX_BONES"
  102. // default limit for bone count
  103. #if (!defined AI_SBBC_DEFAULT_MAX_BONES)
  104. # define AI_SBBC_DEFAULT_MAX_BONES 60
  105. #endif
  106. // ---------------------------------------------------------------------------
  107. /** @brief Specifies the maximum angle that may be between two vertex tangents
  108. * that their tangents and bi-tangents are smoothed.
  109. *
  110. * This applies to the CalcTangentSpace-Step. The angle is specified
  111. * in degrees. The maximum value is 175.
  112. * Property type: float. Default value: 45 degrees
  113. */
  114. #define AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE \
  115. "PP_CT_MAX_SMOOTHING_ANGLE"
  116. // ---------------------------------------------------------------------------
  117. /** @brief Source UV channel for tangent space computation.
  118. *
  119. * The specified channel must exist or an error will be raised.
  120. * Property type: integer. Default value: 0
  121. */
  122. // ---------------------------------------------------------------------------
  123. #define AI_CONFIG_PP_CT_TEXTURE_CHANNEL_INDEX \
  124. "PP_CT_TEXTURE_CHANNEL_INDEX"
  125. // ---------------------------------------------------------------------------
  126. /** @brief Specifies the maximum angle that may be between two face normals
  127. * at the same vertex position that their are smoothed together.
  128. *
  129. * Sometimes referred to as 'crease angle'.
  130. * This applies to the GenSmoothNormals-Step. The angle is specified
  131. * in degrees, so 180 is PI. The default value is 175 degrees (all vertex
  132. * normals are smoothed). The maximum value is 175, too. Property type: float.
  133. * Warning: setting this option may cause a severe loss of performance. The
  134. * performance is unaffected if the #AI_CONFIG_FAVOUR_SPEED flag is set but
  135. * the output quality may be reduced.
  136. */
  137. #define AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE \
  138. "PP_GSN_MAX_SMOOTHING_ANGLE"
  139. // ---------------------------------------------------------------------------
  140. /** @brief Sets the colormap (= palette) to be used to decode embedded
  141. * textures in MDL (Quake or 3DGS) files.
  142. *
  143. * This must be a valid path to a file. The file is 768 (256*3) bytes
  144. * large and contains RGB triplets for each of the 256 palette entries.
  145. * The default value is colormap.lmp. If the file is not found,
  146. * a default palette (from Quake 1) is used.
  147. * Property type: string.
  148. */
  149. #define AI_CONFIG_IMPORT_MDL_COLORMAP \
  150. "IMPORT_MDL_COLORMAP"
  151. // ---------------------------------------------------------------------------
  152. /** @brief Configures the #aiProcess_RemoveRedundantMaterials step to
  153. * keep materials matching a name in a given list.
  154. *
  155. * This is a list of 1 to n strings, ' ' serves as delimiter character.
  156. * Identifiers containing whitespaces must be enclosed in *single*
  157. * quotation marks. For example:<tt>
  158. * "keep-me and_me_to anotherMaterialToBeKept \'name with whitespace\'"</tt>.
  159. * If a material matches on of these names, it will not be modified or
  160. * removed by the postprocessing step nor will other materials be replaced
  161. * by a reference to it. <br>
  162. * This option might be useful if you are using some magic material names
  163. * to pass additional semantics through the content pipeline. This ensures
  164. * they won't be optimized away, but a general optimization is still
  165. * performed for materials not contained in the list.
  166. * Property type: String. Default value: n/a
  167. * @note Linefeeds, tabs or carriage returns are treated as whitespace.
  168. * Material names are case sensitive.
  169. */
  170. #define AI_CONFIG_PP_RRM_EXCLUDE_LIST \
  171. "PP_RRM_EXCLUDE_LIST"
  172. // ---------------------------------------------------------------------------
  173. /** @brief Configures the #aiProcess_PretransformVertices step to
  174. * keep the scene hierarchy. Meshes are moved to worldspace, but
  175. * no optimization is performed (read: meshes with equal materials are not
  176. * joined. The total number of meshes won't change).
  177. *
  178. * This option could be of use for you if the scene hierarchy contains
  179. * important additional information which you intend to parse.
  180. * For rendering, you can still render all meshes in the scene without
  181. * any transformations.
  182. * Property type: bool. Default value: false.
  183. */
  184. #define AI_CONFIG_PP_PTV_KEEP_HIERARCHY \
  185. "PP_PTV_KEEP_HIERARCHY"
  186. // ---------------------------------------------------------------------------
  187. /** @brief Configures the #aiProcess_PretransformVertices step to normalize
  188. * all vertex components into the [-1,1] range. That is, a bounding box
  189. * for the whole scene is computed, the maximum component is taken and all
  190. * meshes are scaled appropriately (uniformly of course!).
  191. * This might be useful if you don't know the spatial dimension of the input
  192. * data*/
  193. #define AI_CONFIG_PP_PTV_NORMALIZE \
  194. "PP_PTV_NORMALIZE"
  195. // ---------------------------------------------------------------------------
  196. /** @brief Configures the #aiProcess_FindDegenerates step to
  197. * remove degenerated primitives from the import - immediately.
  198. *
  199. * The default behaviour converts degenerated triangles to lines and
  200. * degenerated lines to points. See the documentation to the
  201. * #aiProcess_FindDegenerates step for a detailed example of the various ways
  202. * to get rid of these lines and points if you don't want them.
  203. * Property type: bool. Default value: false.
  204. */
  205. #define AI_CONFIG_PP_FD_REMOVE \
  206. "PP_FD_REMOVE"
  207. // ---------------------------------------------------------------------------
  208. /** @brief Configures the #aiProcess_OptimizeGraph step to preserve nodes
  209. * matching a name in a given list.
  210. *
  211. * This is a list of 1 to n strings, ' ' serves as delimiter character.
  212. * Identifiers containing whitespaces must be enclosed in *single*
  213. * quotation marks. For example:<tt>
  214. * "keep-me and_me_to anotherNodeToBeKept \'name with whitespace\'"</tt>.
  215. * If a node matches on of these names, it will not be modified or
  216. * removed by the postprocessing step.<br>
  217. * This option might be useful if you are using some magic node names
  218. * to pass additional semantics through the content pipeline. This ensures
  219. * they won't be optimized away, but a general optimization is still
  220. * performed for nodes not contained in the list.
  221. * Property type: String. Default value: n/a
  222. * @note Linefeeds, tabs or carriage returns are treated as whitespace.
  223. * Node names are case sensitive.
  224. */
  225. #define AI_CONFIG_PP_OG_EXCLUDE_LIST \
  226. "PP_OG_EXCLUDE_LIST"
  227. // ---------------------------------------------------------------------------
  228. /** @brief Set the maximum number of triangles in a mesh.
  229. *
  230. * This is used by the "SplitLargeMeshes" PostProcess-Step to determine
  231. * whether a mesh must be split or not.
  232. * @note The default value is AI_SLM_DEFAULT_MAX_TRIANGLES
  233. * Property type: integer.
  234. */
  235. #define AI_CONFIG_PP_SLM_TRIANGLE_LIMIT \
  236. "PP_SLM_TRIANGLE_LIMIT"
  237. // default value for AI_CONFIG_PP_SLM_TRIANGLE_LIMIT
  238. #if (!defined AI_SLM_DEFAULT_MAX_TRIANGLES)
  239. # define AI_SLM_DEFAULT_MAX_TRIANGLES 1000000
  240. #endif
  241. // ---------------------------------------------------------------------------
  242. /** @brief Set the maximum number of vertices in a mesh.
  243. *
  244. * This is used by the "SplitLargeMeshes" PostProcess-Step to determine
  245. * whether a mesh must be split or not.
  246. * @note The default value is AI_SLM_DEFAULT_MAX_VERTICES
  247. * Property type: integer.
  248. */
  249. #define AI_CONFIG_PP_SLM_VERTEX_LIMIT \
  250. "PP_SLM_VERTEX_LIMIT"
  251. // default value for AI_CONFIG_PP_SLM_VERTEX_LIMIT
  252. #if (!defined AI_SLM_DEFAULT_MAX_VERTICES)
  253. # define AI_SLM_DEFAULT_MAX_VERTICES 1000000
  254. #endif
  255. // ---------------------------------------------------------------------------
  256. /** @brief Set the maximum number of bones affecting a single vertex
  257. *
  258. * This is used by the #aiProcess_LimitBoneWeights PostProcess-Step.
  259. * @note The default value is AI_LBW_MAX_WEIGHTS
  260. * Property type: integer.*/
  261. #define AI_CONFIG_PP_LBW_MAX_WEIGHTS \
  262. "PP_LBW_MAX_WEIGHTS"
  263. // default value for AI_CONFIG_PP_LBW_MAX_WEIGHTS
  264. #if (!defined AI_LMW_MAX_WEIGHTS)
  265. # define AI_LMW_MAX_WEIGHTS 0x4
  266. #endif // !! AI_LMW_MAX_WEIGHTS
  267. // ---------------------------------------------------------------------------
  268. /** @brief Lower the deboning threshold in order to remove more bones.
  269. *
  270. * This is used by the #aiProcess_Debone PostProcess-Step.
  271. * @note The default value is AI_DEBONE_THRESHOLD
  272. * Property type: float.*/
  273. #define AI_CONFIG_PP_DB_THRESHOLD \
  274. "PP_DB_THRESHOLD"
  275. // default value for AI_CONFIG_PP_LBW_MAX_WEIGHTS
  276. #if (!defined AI_DEBONE_THRESHOLD)
  277. # define AI_DEBONE_THRESHOLD 1.0f
  278. #endif // !! AI_DEBONE_THRESHOLD
  279. // ---------------------------------------------------------------------------
  280. /** @brief Require all bones qualify for deboning before removing any
  281. *
  282. * This is used by the #aiProcess_Debone PostProcess-Step.
  283. * @note The default value is 0
  284. * Property type: bool.*/
  285. #define AI_CONFIG_PP_DB_ALL_OR_NONE \
  286. "PP_DB_ALL_OR_NONE"
  287. /** @brief Default value for the #AI_CONFIG_PP_ICL_PTCACHE_SIZE property
  288. */
  289. #ifndef PP_ICL_PTCACHE_SIZE
  290. # define PP_ICL_PTCACHE_SIZE 12
  291. #endif
  292. // ---------------------------------------------------------------------------
  293. /** @brief Set the size of the post-transform vertex cache to optimize the
  294. * vertices for. This configures the #aiProcess_ImproveCacheLocality step.
  295. *
  296. * The size is given in vertices. Of course you can't know how the vertex
  297. * format will exactly look like after the import returns, but you can still
  298. * guess what your meshes will probably have.
  299. * @note The default value is #PP_ICL_PTCACHE_SIZE. That results in slight
  300. * performance improvements for most nVidia/AMD cards since 2002.
  301. * Property type: integer.
  302. */
  303. #define AI_CONFIG_PP_ICL_PTCACHE_SIZE "PP_ICL_PTCACHE_SIZE"
  304. // ---------------------------------------------------------------------------
  305. /** @brief Enumerates components of the aiScene and aiMesh data structures
  306. * that can be excluded from the import using the #aiPrpcess_RemoveComponent step.
  307. *
  308. * See the documentation to #aiProcess_RemoveComponent for more details.
  309. */
  310. enum aiComponent
  311. {
  312. /** Normal vectors */
  313. #ifdef SWIG
  314. aiComponent_NORMALS = 0x2,
  315. #else
  316. aiComponent_NORMALS = 0x2u,
  317. #endif
  318. /** Tangents and bitangents go always together ... */
  319. #ifdef SWIG
  320. aiComponent_TANGENTS_AND_BITANGENTS = 0x4,
  321. #else
  322. aiComponent_TANGENTS_AND_BITANGENTS = 0x4u,
  323. #endif
  324. /** ALL color sets
  325. * Use aiComponent_COLORn(N) to specify the N'th set */
  326. aiComponent_COLORS = 0x8,
  327. /** ALL texture UV sets
  328. * aiComponent_TEXCOORDn(N) to specify the N'th set */
  329. aiComponent_TEXCOORDS = 0x10,
  330. /** Removes all bone weights from all meshes.
  331. * The scenegraph nodes corresponding to the bones are NOT removed.
  332. * use the #aiProcess_OptimizeGraph step to do this */
  333. aiComponent_BONEWEIGHTS = 0x20,
  334. /** Removes all node animations (aiScene::mAnimations).
  335. * The corresponding scenegraph nodes are NOT removed.
  336. * use the #aiProcess_OptimizeGraph step to do this */
  337. aiComponent_ANIMATIONS = 0x40,
  338. /** Removes all embedded textures (aiScene::mTextures) */
  339. aiComponent_TEXTURES = 0x80,
  340. /** Removes all light sources (aiScene::mLights).
  341. * The corresponding scenegraph nodes are NOT removed.
  342. * use the #aiProcess_OptimizeGraph step to do this */
  343. aiComponent_LIGHTS = 0x100,
  344. /** Removes all light sources (aiScene::mCameras).
  345. * The corresponding scenegraph nodes are NOT removed.
  346. * use the #aiProcess_OptimizeGraph step to do this */
  347. aiComponent_CAMERAS = 0x200,
  348. /** Removes all meshes (aiScene::mMeshes). */
  349. aiComponent_MESHES = 0x400,
  350. /** Removes all materials. One default material will
  351. * be generated, so aiScene::mNumMaterials will be 1. */
  352. aiComponent_MATERIALS = 0x800,
  353. /** This value is not used. It is just there to force the
  354. * compiler to map this enum to a 32 Bit integer. */
  355. #ifndef SWIG
  356. _aiComponent_Force32Bit = 0x9fffffff
  357. #endif
  358. };
  359. // Remove a specific color channel 'n'
  360. #define aiComponent_COLORSn(n) (1u << (n+20u))
  361. // Remove a specific UV channel 'n'
  362. #define aiComponent_TEXCOORDSn(n) (1u << (n+25u))
  363. // ---------------------------------------------------------------------------
  364. /** @brief Input parameter to the #aiProcess_RemoveComponent step:
  365. * Specifies the parts of the data structure to be removed.
  366. *
  367. * See the documentation to this step for further details. The property
  368. * is expected to be an integer, a bitwise combination of the
  369. * #aiComponent flags defined above in this header. The default
  370. * value is 0. Important: if no valid mesh is remaining after the
  371. * step has been executed (e.g you thought it was funny to specify ALL
  372. * of the flags defined above) the import FAILS. Mainly because there is
  373. * no data to work on anymore ...
  374. */
  375. #define AI_CONFIG_PP_RVC_FLAGS \
  376. "PP_RVC_FLAGS"
  377. // ---------------------------------------------------------------------------
  378. /** @brief Input parameter to the #aiProcess_SortByPType step:
  379. * Specifies which primitive types are removed by the step.
  380. *
  381. * This is a bitwise combination of the aiPrimitiveType flags.
  382. * Specifying all of them is illegal, of course. A typical use would
  383. * be to exclude all line and point meshes from the import. This
  384. * is an integer property, its default value is 0.
  385. */
  386. #define AI_CONFIG_PP_SBP_REMOVE \
  387. "PP_SBP_REMOVE"
  388. // ---------------------------------------------------------------------------
  389. /** @brief Input parameter to the #aiProcess_FindInvalidData step:
  390. * Specifies the floating-point accuracy for animation values. The step
  391. * checks for animation tracks where all frame values are absolutely equal
  392. * and removes them. This tweakable controls the epsilon for floating-point
  393. * comparisons - two keys are considered equal if the invariant
  394. * abs(n0-n1)>epsilon holds true for all vector respectively quaternion
  395. * components. The default value is 0.f - comparisons are exact then.
  396. */
  397. #define AI_CONFIG_PP_FID_ANIM_ACCURACY \
  398. "PP_FID_ANIM_ACCURACY"
  399. // TransformUVCoords evaluates UV scalings
  400. #define AI_UVTRAFO_SCALING 0x1
  401. // TransformUVCoords evaluates UV rotations
  402. #define AI_UVTRAFO_ROTATION 0x2
  403. // TransformUVCoords evaluates UV translation
  404. #define AI_UVTRAFO_TRANSLATION 0x4
  405. // Everything baked together -> default value
  406. #define AI_UVTRAFO_ALL (AI_UVTRAFO_SCALING | AI_UVTRAFO_ROTATION | AI_UVTRAFO_TRANSLATION)
  407. // ---------------------------------------------------------------------------
  408. /** @brief Input parameter to the #aiProcess_TransformUVCoords step:
  409. * Specifies which UV transformations are evaluated.
  410. *
  411. * This is a bitwise combination of the AI_UVTRAFO_XXX flags (integer
  412. * property, of course). By default all transformations are enabled
  413. * (AI_UVTRAFO_ALL).
  414. */
  415. #define AI_CONFIG_PP_TUV_EVALUATE \
  416. "PP_TUV_EVALUATE"
  417. // ---------------------------------------------------------------------------
  418. /** @brief A hint to assimp to favour speed against import quality.
  419. *
  420. * Enabling this option may result in faster loading, but it needn't.
  421. * It represents just a hint to loaders and post-processing steps to use
  422. * faster code paths, if possible.
  423. * This property is expected to be an integer, != 0 stands for true.
  424. * The default value is 0.
  425. */
  426. #define AI_CONFIG_FAVOUR_SPEED \
  427. "FAVOUR_SPEED"
  428. // ###########################################################################
  429. // IMPORTER SETTINGS
  430. // Various stuff to fine-tune the behaviour of specific importer plugins.
  431. // ###########################################################################
  432. // ---------------------------------------------------------------------------
  433. /** @brief Set the vertex animation keyframe to be imported
  434. *
  435. * ASSIMP does not support vertex keyframes (only bone animation is supported).
  436. * The library reads only one frame of models with vertex animations.
  437. * By default this is the first frame.
  438. * \note The default value is 0. This option applies to all importers.
  439. * However, it is also possible to override the global setting
  440. * for a specific loader. You can use the AI_CONFIG_IMPORT_XXX_KEYFRAME
  441. * options (where XXX is a placeholder for the file format for which you
  442. * want to override the global setting).
  443. * Property type: integer.
  444. */
  445. #define AI_CONFIG_IMPORT_GLOBAL_KEYFRAME "IMPORT_GLOBAL_KEYFRAME"
  446. #define AI_CONFIG_IMPORT_MD3_KEYFRAME "IMPORT_MD3_KEYFRAME"
  447. #define AI_CONFIG_IMPORT_MD2_KEYFRAME "IMPORT_MD2_KEYFRAME"
  448. #define AI_CONFIG_IMPORT_MDL_KEYFRAME "IMPORT_MDL_KEYFRAME"
  449. #define AI_CONFIG_IMPORT_MDC_KEYFRAME "IMPORT_MDC_KEYFRAME"
  450. #define AI_CONFIG_IMPORT_SMD_KEYFRAME "IMPORT_SMD_KEYFRAME"
  451. #define AI_CONFIG_IMPORT_UNREAL_KEYFRAME "IMPORT_UNREAL_KEYFRAME"
  452. // ---------------------------------------------------------------------------
  453. /** @brief Configures the AC loader to collect all surfaces which have the
  454. * "Backface cull" flag set in separate meshes.
  455. *
  456. * Property type: bool. Default value: true.
  457. */
  458. #define AI_CONFIG_IMPORT_AC_SEPARATE_BFCULL \
  459. "IMPORT_AC_SEPARATE_BFCULL"
  460. // ---------------------------------------------------------------------------
  461. /** @brief Configures whether the AC loader evaluates subdivision surfaces (
  462. * indicated by the presence of the 'subdiv' attribute in the file). By
  463. * default, Assimp performs the subdivision using the standard
  464. * Catmull-Clark algorithm
  465. *
  466. * * Property type: bool. Default value: true.
  467. */
  468. #define AI_CONFIG_IMPORT_AC_EVAL_SUBDIVISION \
  469. "IMPORT_AC_EVAL_SUBDIVISION"
  470. // ---------------------------------------------------------------------------
  471. /** @brief Configures the UNREAL 3D loader to separate faces with different
  472. * surface flags (e.g. two-sided vs. single-sided).
  473. *
  474. * * Property type: bool. Default value: true.
  475. */
  476. #define AI_CONFIG_IMPORT_UNREAL_HANDLE_FLAGS \
  477. "UNREAL_HANDLE_FLAGS"
  478. // ---------------------------------------------------------------------------
  479. /** @brief Configures the terragen import plugin to compute uv's for
  480. * terrains, if not given. Furthermore a default texture is assigned.
  481. *
  482. * UV coordinates for terrains are so simple to compute that you'll usually
  483. * want to compute them on your own, if you need them. This option is intended
  484. * for model viewers which want to offer an easy way to apply textures to
  485. * terrains.
  486. * * Property type: bool. Default value: false.
  487. */
  488. #define AI_CONFIG_IMPORT_TER_MAKE_UVS \
  489. "IMPORT_TER_MAKE_UVS"
  490. // ---------------------------------------------------------------------------
  491. /** @brief Configures the ASE loader to always reconstruct normal vectors
  492. * basing on the smoothing groups loaded from the file.
  493. *
  494. * Some ASE files have carry invalid normals, other don't.
  495. * * Property type: bool. Default value: true.
  496. */
  497. #define AI_CONFIG_IMPORT_ASE_RECONSTRUCT_NORMALS \
  498. "IMPORT_ASE_RECONSTRUCT_NORMALS"
  499. // ---------------------------------------------------------------------------
  500. /** @brief Configures the M3D loader to detect and process multi-part
  501. * Quake player models.
  502. *
  503. * These models usually consist of 3 files, lower.md3, upper.md3 and
  504. * head.md3. If this property is set to true, Assimp will try to load and
  505. * combine all three files if one of them is loaded.
  506. * Property type: bool. Default value: true.
  507. */
  508. #define AI_CONFIG_IMPORT_MD3_HANDLE_MULTIPART \
  509. "IMPORT_MD3_HANDLE_MULTIPART"
  510. // ---------------------------------------------------------------------------
  511. /** @brief Tells the MD3 loader which skin files to load.
  512. *
  513. * When loading MD3 files, Assimp checks whether a file
  514. * <md3_file_name>_<skin_name>.skin is existing. These files are used by
  515. * Quake III to be able to assign different skins (e.g. red and blue team)
  516. * to models. 'default', 'red', 'blue' are typical skin names.
  517. * Property type: String. Default value: "default".
  518. */
  519. #define AI_CONFIG_IMPORT_MD3_SKIN_NAME \
  520. "IMPORT_MD3_SKIN_NAME"
  521. // ---------------------------------------------------------------------------
  522. /** @brief Specify the Quake 3 shader file to be used for a particular
  523. * MD3 file. This can also be a search path.
  524. *
  525. * By default Assimp's behaviour is as follows: If a MD3 file
  526. * <tt><any_path>/models/<any_q3_subdir>/<model_name>/<file_name>.md3</tt> is
  527. * loaded, the library tries to locate the corresponding shader file in
  528. * <tt><any_path>/scripts/<model_name>.shader</tt>. This property overrides this
  529. * behaviour. It can either specify a full path to the shader to be loaded
  530. * or alternatively the path (relative or absolute) to the directory where
  531. * the shaders for all MD3s to be loaded reside. Assimp attempts to open
  532. * <tt><dir>/<model_name>.shader</tt> first, <tt><dir>/<file_name>.shader</tt>
  533. * is the fallback file. Note that <dir> should have a terminal (back)slash.
  534. * Property type: String. Default value: n/a.
  535. */
  536. #define AI_CONFIG_IMPORT_MD3_SHADER_SRC \
  537. "IMPORT_MD3_SHADER_SRC"
  538. // ---------------------------------------------------------------------------
  539. /** @brief Configures the LWO loader to load just one layer from the model.
  540. *
  541. * LWO files consist of layers and in some cases it could be useful to load
  542. * only one of them. This property can be either a string - which specifies
  543. * the name of the layer - or an integer - the index of the layer. If the
  544. * property is not set the whole LWO model is loaded. Loading fails if the
  545. * requested layer is not available. The layer index is zero-based and the
  546. * layer name may not be empty.<br>
  547. * Property type: Integer. Default value: all layers are loaded.
  548. */
  549. #define AI_CONFIG_IMPORT_LWO_ONE_LAYER_ONLY \
  550. "IMPORT_LWO_ONE_LAYER_ONLY"
  551. // ---------------------------------------------------------------------------
  552. /** @brief Configures the MD5 loader to not load the MD5ANIM file for
  553. * a MD5MESH file automatically.
  554. *
  555. * The default strategy is to look for a file with the same name but the
  556. * MD5ANIM extension in the same directory. If it is found, it is loaded
  557. * and combined with the MD5MESH file. This configuration option can be
  558. * used to disable this behaviour.
  559. *
  560. * * Property type: bool. Default value: false.
  561. */
  562. #define AI_CONFIG_IMPORT_MD5_NO_ANIM_AUTOLOAD \
  563. "IMPORT_MD5_NO_ANIM_AUTOLOAD"
  564. // ---------------------------------------------------------------------------
  565. /** @brief Defines the begin of the time range for which the LWS loader
  566. * evaluates animations and computes aiNodeAnim's.
  567. *
  568. * Assimp provides full conversion of LightWave's envelope system, including
  569. * pre and post conditions. The loader computes linearly subsampled animation
  570. * chanels with the frame rate given in the LWS file. This property defines
  571. * the start time. Note: animation channels are only generated if a node
  572. * has at least one envelope with more tan one key assigned. This property.
  573. * is given in frames, '0' is the first frame. By default, if this property
  574. * is not set, the importer takes the animation start from the input LWS
  575. * file ('FirstFrame' line)<br>
  576. * Property type: Integer. Default value: taken from file.
  577. *
  578. * @see AI_CONFIG_IMPORT_LWS_ANIM_END - end of the imported time range
  579. */
  580. #define AI_CONFIG_IMPORT_LWS_ANIM_START \
  581. "IMPORT_LWS_ANIM_START"
  582. #define AI_CONFIG_IMPORT_LWS_ANIM_END \
  583. "IMPORT_LWS_ANIM_END"
  584. // ---------------------------------------------------------------------------
  585. /** @brief Defines the output frame rate of the IRR loader.
  586. *
  587. * IRR animations are difficult to convert for Assimp and there will
  588. * always be a loss of quality. This setting defines how many keys per second
  589. * are returned by the converter.<br>
  590. * Property type: integer. Default value: 100
  591. */
  592. #define AI_CONFIG_IMPORT_IRR_ANIM_FPS \
  593. "IMPORT_IRR_ANIM_FPS"
  594. // ---------------------------------------------------------------------------
  595. /** @brief Ogre Importer will try to load this Materialfile.
  596. *
  597. * Ogre Meshes contain only the MaterialName, not the MaterialFile. If there
  598. * is no material file with the same name as the material, Ogre Importer will
  599. * try to load this file and search the material in it.
  600. * <br>
  601. * Property type: String. Default value: guessed.
  602. */
  603. #define AI_CONFIG_IMPORT_OGRE_MATERIAL_FILE "IMPORT_OGRE_MATERIAL_FILE"
  604. // ---------------------------------------------------------------------------
  605. /** @brief Ogre Importer detect the texture usage from its filename
  606. *
  607. * Normally, a texture is loaded as a colormap, if no target is specified in the
  608. * materialfile. Is this switch is enabled, texture names ending with _n, _l, _s
  609. * are used as normalmaps, lightmaps or specularmaps.
  610. * <br>
  611. * Property type: Bool. Default value: false.
  612. */
  613. #define AI_CONFIG_IMPORT_OGRE_TEXTURETYPE_FROM_FILENAME "IMPORT_OGRE_TEXTURETYPE_FROM_FILENAME"
  614. // ---------------------------------------------------------------------------
  615. /** @brief Specifies whether the IFC loader skips over IfcSpace elements.
  616. *
  617. * IfcSpace elements (and their geometric representations) are used to
  618. * represent, well, free space in a building storey.<br>
  619. * Property type: Bool. Default value: true.
  620. */
  621. #define AI_CONFIG_IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS "IMPORT_IFC_SKIP_SPACE_REPRESENTATIONS"
  622. // ---------------------------------------------------------------------------
  623. /** @brief Specifies whether the IFC loader skips over
  624. * shape representations of type 'Curve2D'.
  625. *
  626. * A lot of files contain both a faceted mesh representation and a outline
  627. * with a presentation type of 'Curve2D'. Currently Assimp doesn't convert those,
  628. * so turning this option off just clutters the log with errors.<br>
  629. * Property type: Bool. Default value: true.
  630. */
  631. #define AI_CONFIG_IMPORT_IFC_SKIP_CURVE_REPRESENTATIONS "IMPORT_IFC_SKIP_CURVE_REPRESENTATIONS"
  632. // ---------------------------------------------------------------------------
  633. /** @brief Specifies whether the IFC loader will use its own, custom triangulation
  634. * algorithm to triangulate wall and floor meshes.
  635. *
  636. * If this property is set to false, walls will be either triangulated by
  637. * #aiProcess_Triangulate or will be passed through as huge polygons with
  638. * faked holes (i.e. holes that are connected with the outer boundary using
  639. * a dummy edge). It is highly recommended to set this property to true
  640. * if you want triangulated data because #aiProcess_Triangulate is known to
  641. * have problems with the kind of polygons that the IFC loader spits out for
  642. * complicated meshes.
  643. * Property type: Bool. Default value: true.
  644. */
  645. #define AI_CONFIG_IMPORT_IFC_CUSTOM_TRIANGULATION "IMPORT_IFC_CUSTOM_TRIANGULATION"
  646. #endif // !! AI_CONFIG_H_INC