config.h.in 39 KB

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