config.h 39 KB

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