Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

634 linhas
28 KiB

  1. /*
  2. Open Asset Import Library (assimp)
  3. ----------------------------------------------------------------------
  4. Copyright (c) 2006-2012, assimp team
  5. All rights reserved.
  6. Redistribution and use of this software in source and binary forms,
  7. with or without modification, are permitted provided that the
  8. following conditions are met:
  9. * Redistributions of source code must retain the above
  10. copyright notice, this list of conditions and the
  11. following disclaimer.
  12. * Redistributions in binary form must reproduce the above
  13. copyright notice, this list of conditions and the
  14. following disclaimer in the documentation and/or other
  15. materials provided with the distribution.
  16. * Neither the name of the assimp team, nor the names of its
  17. contributors may be used to endorse or promote products
  18. derived from this software without specific prior
  19. written permission of the assimp team.
  20. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  21. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  22. LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  23. A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  24. OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  25. SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  26. LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  27. DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  28. THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  29. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  30. OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  31. ----------------------------------------------------------------------
  32. */
  33. /** @file postprocess.h
  34. * @brief Definitions for import post processing steps
  35. */
  36. #ifndef AI_POSTPROCESS_H_INC
  37. #define AI_POSTPROCESS_H_INC
  38. #include "types.h"
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42. // -----------------------------------------------------------------------------------
  43. /** @enum aiPostProcessSteps
  44. * @brief Defines the flags for all possible post processing steps.
  45. *
  46. * @note Some steps are influenced by properties set on the Assimp::Importer itself
  47. *
  48. * @see Assimp::Importer::ReadFile()
  49. * @see Assimp::Importer::SetPropertyInteger()
  50. * @see aiImportFile
  51. * @see aiImportFileEx
  52. */
  53. // -----------------------------------------------------------------------------------
  54. enum aiPostProcessSteps
  55. {
  56. // -------------------------------------------------------------------------
  57. /** <hr>Calculates the tangents and bitangents for the imported meshes.
  58. *
  59. * Does nothing if a mesh does not have normals. You might want this post
  60. * processing step to be executed if you plan to use tangent space calculations
  61. * such as normal mapping applied to the meshes. There's an importer property,
  62. * <tt>#AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE</tt>, which allows you to specify
  63. * a maximum smoothing angle for the algorithm. However, usually you'll
  64. * want to leave it at the default value.
  65. */
  66. aiProcess_CalcTangentSpace = 0x1,
  67. // -------------------------------------------------------------------------
  68. /** <hr>Identifies and joins identical vertex data sets within all
  69. * imported meshes.
  70. *
  71. * After this step is run, each mesh contains unique vertices,
  72. * so a vertex may be used by multiple faces. You usually want
  73. * to use this post processing step. If your application deals with
  74. * indexed geometry, this step is compulsory or you'll just waste rendering
  75. * time. <b>If this flag is not specified</b>, no vertices are referenced by
  76. * more than one face and <b>no index buffer is required</b> for rendering.
  77. */
  78. aiProcess_JoinIdenticalVertices = 0x2,
  79. // -------------------------------------------------------------------------
  80. /** <hr>Converts all the imported data to a left-handed coordinate space.
  81. *
  82. * By default the data is returned in a right-handed coordinate space (which
  83. * OpenGL prefers). In this space, +X points to the right,
  84. * +Z points towards the viewer, and +Y points upwards. In the DirectX
  85. * coordinate space +X points to the right, +Y points upwards, and +Z points
  86. * away from the viewer.
  87. *
  88. * You'll probably want to consider this flag if you use Direct3D for
  89. * rendering. The #aiProcess_ConvertToLeftHanded flag supersedes this
  90. * setting and bundles all conversions typically required for D3D-based
  91. * applications.
  92. */
  93. aiProcess_MakeLeftHanded = 0x4,
  94. // -------------------------------------------------------------------------
  95. /** <hr>Triangulates all faces of all meshes.
  96. *
  97. * By default the imported mesh data might contain faces with more than 3
  98. * indices. For rendering you'll usually want all faces to be triangles.
  99. * This post processing step splits up faces with more than 3 indices into
  100. * triangles. Line and point primitives are *not* modified! If you want
  101. * 'triangles only' with no other kinds of primitives, try the following
  102. * solution:
  103. * <ul>
  104. * <li>Specify both #aiProcess_Triangulate and #aiProcess_SortByPType </li>
  105. * <li>Ignore all point and line meshes when you process assimp's output</li>
  106. * </ul>
  107. */
  108. aiProcess_Triangulate = 0x8,
  109. // -------------------------------------------------------------------------
  110. /** <hr>Removes some parts of the data structure (animations, materials,
  111. * light sources, cameras, textures, vertex components).
  112. *
  113. * The components to be removed are specified in a separate
  114. * importer property, <tt>#AI_CONFIG_PP_RVC_FLAGS</tt>. This is quite useful
  115. * if you don't need all parts of the output structure. Vertex colors
  116. * are rarely used today for example... Calling this step to remove unneeded
  117. * data from the pipeline as early as possible results in increased
  118. * performance and a more optimized output data structure.
  119. * This step is also useful if you want to force Assimp to recompute
  120. * normals or tangents. The corresponding steps don't recompute them if
  121. * they're already there (loaded from the source asset). By using this
  122. * step you can make sure they are NOT there.
  123. *
  124. * This flag is a poor one, mainly because its purpose is usually
  125. * misunderstood. Consider the following case: a 3D model has been exported
  126. * from a CAD app, and it has per-face vertex colors. Vertex positions can't be
  127. * shared, thus the #aiProcess_JoinIdenticalVertices step fails to
  128. * optimize the data because of these nasty little vertex colors.
  129. * Most apps don't even process them, so it's all for nothing. By using
  130. * this step, unneeded components are excluded as early as possible
  131. * thus opening more room for internal optimizations.
  132. */
  133. aiProcess_RemoveComponent = 0x10,
  134. // -------------------------------------------------------------------------
  135. /** <hr>Generates normals for all faces of all meshes.
  136. *
  137. * This is ignored if normals are already there at the time this flag
  138. * is evaluated. Model importers try to load them from the source file, so
  139. * they're usually already there. Face normals are shared between all points
  140. * of a single face, so a single point can have multiple normals, which
  141. * forces the library to duplicate vertices in some cases.
  142. * #aiProcess_JoinIdenticalVertices is *senseless* then.
  143. *
  144. * This flag may not be specified together with #aiProcess_GenSmoothNormals.
  145. */
  146. aiProcess_GenNormals = 0x20,
  147. // -------------------------------------------------------------------------
  148. /** <hr>Generates smooth normals for all vertices in the mesh.
  149. *
  150. * This is ignored if normals are already there at the time this flag
  151. * is evaluated. Model importers try to load them from the source file, so
  152. * they're usually already there.
  153. *
  154. * This flag may not be specified together with
  155. * #aiProcess_GenNormals. There's a importer property,
  156. * <tt>#AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE</tt> which allows you to specify
  157. * an angle maximum for the normal smoothing algorithm. Normals exceeding
  158. * this limit are not smoothed, resulting in a 'hard' seam between two faces.
  159. * Using a decent angle here (e.g. 80 degrees) results in very good visual
  160. * appearance.
  161. */
  162. aiProcess_GenSmoothNormals = 0x40,
  163. // -------------------------------------------------------------------------
  164. /** <hr>Splits large meshes into smaller sub-meshes.
  165. *
  166. * This is quite useful for real-time rendering, where the number of triangles
  167. * which can be maximally processed in a single draw-call is limited
  168. * by the video driver/hardware. The maximum vertex buffer is usually limited
  169. * too. Both requirements can be met with this step: you may specify both a
  170. * triangle and vertex limit for a single mesh.
  171. *
  172. * The split limits can (and should!) be set through the
  173. * <tt>#AI_CONFIG_PP_SLM_VERTEX_LIMIT</tt> and <tt>#AI_CONFIG_PP_SLM_TRIANGLE_LIMIT</tt>
  174. * importer properties. The default values are <tt>#AI_SLM_DEFAULT_MAX_VERTICES</tt> and
  175. * <tt>#AI_SLM_DEFAULT_MAX_TRIANGLES</tt>.
  176. *
  177. * Note that splitting is generally a time-consuming task, but only if there's
  178. * something to split. The use of this step is recommended for most users.
  179. */
  180. aiProcess_SplitLargeMeshes = 0x80,
  181. // -------------------------------------------------------------------------
  182. /** <hr>Removes the node graph and pre-transforms all vertices with
  183. * the local transformation matrices of their nodes.
  184. *
  185. * The output scene still contains nodes, however there is only a
  186. * root node with children, each one referencing only one mesh,
  187. * and each mesh referencing one material. For rendering, you can
  188. * simply render all meshes in order - you don't need to pay
  189. * attention to local transformations and the node hierarchy.
  190. * Animations are removed during this step.
  191. * This step is intended for applications without a scenegraph.
  192. * The step CAN cause some problems: if e.g. a mesh of the asset
  193. * contains normals and another, using the same material index, does not,
  194. * they will be brought together, but the first meshes's part of
  195. * the normal list is zeroed. However, these artifacts are rare.
  196. * @note The <tt>#AI_CONFIG_PP_PTV_NORMALIZE</tt> configuration property
  197. * can be set to normalize the scene's spatial dimension to the -1...1
  198. * range.
  199. */
  200. aiProcess_PreTransformVertices = 0x100,
  201. // -------------------------------------------------------------------------
  202. /** <hr>Limits the number of bones simultaneously affecting a single vertex
  203. * to a maximum value.
  204. *
  205. * If any vertex is affected by more than the maximum number of bones, the least
  206. * important vertex weights are removed and the remaining vertex weights are
  207. * renormalized so that the weights still sum up to 1.
  208. * The default bone weight limit is 4 (defined as <tt>#AI_LMW_MAX_WEIGHTS</tt> in
  209. * config.h), but you can use the <tt>#AI_CONFIG_PP_LBW_MAX_WEIGHTS</tt> importer
  210. * property to supply your own limit to the post processing step.
  211. *
  212. * If you intend to perform the skinning in hardware, this post processing
  213. * step might be of interest to you.
  214. */
  215. aiProcess_LimitBoneWeights = 0x200,
  216. // -------------------------------------------------------------------------
  217. /** <hr>Validates the imported scene data structure.
  218. * This makes sure that all indices are valid, all animations and
  219. * bones are linked correctly, all material references are correct .. etc.
  220. *
  221. * It is recommended that you capture Assimp's log output if you use this flag,
  222. * so you can easily find out what's wrong if a file fails the
  223. * validation. The validator is quite strict and will find *all*
  224. * inconsistencies in the data structure... It is recommended that plugin
  225. * developers use it to debug their loaders. There are two types of
  226. * validation failures:
  227. * <ul>
  228. * <li>Error: There's something wrong with the imported data. Further
  229. * postprocessing is not possible and the data is not usable at all.
  230. * The import fails. #Importer::GetErrorString() or #aiGetErrorString()
  231. * carry the error message around.</li>
  232. * <li>Warning: There are some minor issues (e.g. 1000000 animation
  233. * keyframes with the same time), but further postprocessing and use
  234. * of the data structure is still safe. Warning details are written
  235. * to the log file, <tt>#AI_SCENE_FLAGS_VALIDATION_WARNING</tt> is set
  236. * in #aiScene::mFlags</li>
  237. * </ul>
  238. *
  239. * This post-processing step is not time-consuming. Its use is not
  240. * compulsory, but recommended.
  241. */
  242. aiProcess_ValidateDataStructure = 0x400,
  243. // -------------------------------------------------------------------------
  244. /** <hr>Reorders triangles for better vertex cache locality.
  245. *
  246. * The step tries to improve the ACMR (average post-transform vertex cache
  247. * miss ratio) for all meshes. The implementation runs in O(n) and is
  248. * roughly based on the 'tipsify' algorithm (see <a href="
  249. * http://www.cs.princeton.edu/gfx/pubs/Sander_2007_%3ETR/tipsy.pdf">this
  250. * paper</a>).
  251. *
  252. * If you intend to render huge models in hardware, this step might
  253. * be of interest to you. The <tt>#AI_CONFIG_PP_ICL_PTCACHE_SIZE</tt>
  254. * importer property can be used to fine-tune the cache optimization.
  255. */
  256. aiProcess_ImproveCacheLocality = 0x800,
  257. // -------------------------------------------------------------------------
  258. /** <hr>Searches for redundant/unreferenced materials and removes them.
  259. *
  260. * This is especially useful in combination with the
  261. * #aiProcess_PretransformVertices and #aiProcess_OptimizeMeshes flags.
  262. * Both join small meshes with equal characteristics, but they can't do
  263. * their work if two meshes have different materials. Because several
  264. * material settings are lost during Assimp's import filters,
  265. * (and because many exporters don't check for redundant materials), huge
  266. * models often have materials which are are defined several times with
  267. * exactly the same settings.
  268. *
  269. * Several material settings not contributing to the final appearance of
  270. * a surface are ignored in all comparisons (e.g. the material name).
  271. * So, if you're passing additional information through the
  272. * content pipeline (probably using *magic* material names), don't
  273. * specify this flag. Alternatively take a look at the
  274. * <tt>#AI_CONFIG_PP_RRM_EXCLUDE_LIST</tt> importer property.
  275. */
  276. aiProcess_RemoveRedundantMaterials = 0x1000,
  277. // -------------------------------------------------------------------------
  278. /** <hr>This step tries to determine which meshes have normal vectors
  279. * that are facing inwards and inverts them.
  280. *
  281. * The algorithm is simple but effective:
  282. * the bounding box of all vertices + their normals is compared against
  283. * the volume of the bounding box of all vertices without their normals.
  284. * This works well for most objects, problems might occur with planar
  285. * surfaces. However, the step tries to filter such cases.
  286. * The step inverts all in-facing normals. Generally it is recommended
  287. * to enable this step, although the result is not always correct.
  288. */
  289. aiProcess_FixInfacingNormals = 0x2000,
  290. // -------------------------------------------------------------------------
  291. /** <hr>This step splits meshes with more than one primitive type in
  292. * homogeneous sub-meshes.
  293. *
  294. * The step is executed after the triangulation step. After the step
  295. * returns, just one bit is set in aiMesh::mPrimitiveTypes. This is
  296. * especially useful for real-time rendering where point and line
  297. * primitives are often ignored or rendered separately.
  298. * You can use the <tt>#AI_CONFIG_PP_SBP_REMOVE</tt> importer property to
  299. * specify which primitive types you need. This can be used to easily
  300. * exclude lines and points, which are rarely used, from the import.
  301. */
  302. aiProcess_SortByPType = 0x8000,
  303. // -------------------------------------------------------------------------
  304. /** <hr>This step searches all meshes for degenerate primitives and
  305. * converts them to proper lines or points.
  306. *
  307. * A face is 'degenerate' if one or more of its points are identical.
  308. * To have the degenerate stuff not only detected and collapsed but
  309. * removed, try one of the following procedures:
  310. * <br><b>1.</b> (if you support lines and points for rendering but don't
  311. * want the degenerates)</br>
  312. * <ul>
  313. * <li>Specify the #aiProcess_FindDegenerates flag.
  314. * </li>
  315. * <li>Set the <tt>#AI_CONFIG_PP_FD_REMOVE</tt> importer property to
  316. * 1. This will cause the step to remove degenerate triangles from the
  317. * import as soon as they're detected. They won't pass any further
  318. * pipeline steps.
  319. * </li>
  320. * </ul>
  321. * <br><b>2.</b>(if you don't support lines and points at all)</br>
  322. * <ul>
  323. * <li>Specify the #aiProcess_FindDegenerates flag.
  324. * </li>
  325. * <li>Specify the #aiProcess_SortByPType flag. This moves line and
  326. * point primitives to separate meshes.
  327. * </li>
  328. * <li>Set the <tt>#AI_CONFIG_PP_SBP_REMOVE</tt> importer property to
  329. * @code aiPrimitiveType_POINTS | aiPrimitiveType_LINES
  330. * @endcode to cause SortByPType to reject point
  331. * and line meshes from the scene.
  332. * </li>
  333. * </ul>
  334. * @note Degenerate polygons are not necessarily evil and that's why
  335. * they're not removed by default. There are several file formats which
  336. * don't support lines or points, and some exporters bypass the
  337. * format specification and write them as degenerate triangles instead.
  338. */
  339. aiProcess_FindDegenerates = 0x10000,
  340. // -------------------------------------------------------------------------
  341. /** <hr>This step searches all meshes for invalid data, such as zeroed
  342. * normal vectors or invalid UV coords and removes/fixes them. This is
  343. * intended to get rid of some common exporter errors.
  344. *
  345. * This is especially useful for normals. If they are invalid, and
  346. * the step recognizes this, they will be removed and can later
  347. * be recomputed, i.e. by the #aiProcess_GenSmoothNormals flag.<br>
  348. * The step will also remove meshes that are infinitely small and reduce
  349. * animation tracks consisting of hundreds if redundant keys to a single
  350. * key. The <tt>AI_CONFIG_PP_FID_ANIM_ACCURACY</tt> config property decides
  351. * the accuracy of the check for duplicate animation tracks.
  352. */
  353. aiProcess_FindInvalidData = 0x20000,
  354. // -------------------------------------------------------------------------
  355. /** <hr>This step converts non-UV mappings (such as spherical or
  356. * cylindrical mapping) to proper texture coordinate channels.
  357. *
  358. * Most applications will support UV mapping only, so you will
  359. * probably want to specify this step in every case. Note that Assimp is not
  360. * always able to match the original mapping implementation of the
  361. * 3D app which produced a model perfectly. It's always better to let the
  362. * modelling app compute the UV channels - 3ds max, Maya, Blender,
  363. * LightWave, and Modo do this for example.
  364. *
  365. * @note If this step is not requested, you'll need to process the
  366. * <tt>#AI_MATKEY_MAPPING</tt> material property in order to display all assets
  367. * properly.
  368. */
  369. aiProcess_GenUVCoords = 0x40000,
  370. // -------------------------------------------------------------------------
  371. /** <hr>This step applies per-texture UV transformations and bakes
  372. * them into stand-alone vtexture coordinate channels.
  373. *
  374. * UV transformations are specified per-texture - see the
  375. * <tt>#AI_MATKEY_UVTRANSFORM</tt> material key for more information.
  376. * This step processes all textures with
  377. * transformed input UV coordinates and generates a new (pre-transformed) UV channel
  378. * which replaces the old channel. Most applications won't support UV
  379. * transformations, so you will probably want to specify this step.
  380. *
  381. * @note UV transformations are usually implemented in real-time apps by
  382. * transforming texture coordinates at vertex shader stage with a 3x3
  383. * (homogenous) transformation matrix.
  384. */
  385. aiProcess_TransformUVCoords = 0x80000,
  386. // -------------------------------------------------------------------------
  387. /** <hr>This step searches for duplicate meshes and replaces them
  388. * with references to the first mesh.
  389. *
  390. * This step takes a while, so don't use it if speed is a concern.
  391. * Its main purpose is to workaround the fact that many export
  392. * file formats don't support instanced meshes, so exporters need to
  393. * duplicate meshes. This step removes the duplicates again. Please
  394. * note that Assimp does not currently support per-node material
  395. * assignment to meshes, which means that identical meshes with
  396. * different materials are currently *not* joined, although this is
  397. * planned for future versions.
  398. */
  399. aiProcess_FindInstances = 0x100000,
  400. // -------------------------------------------------------------------------
  401. /** <hr>A postprocessing step to reduce the number of meshes.
  402. *
  403. * This will, in fact, reduce the number of draw calls.
  404. *
  405. * This is a very effective optimization and is recommended to be used
  406. * together with #aiProcess_OptimizeGraph, if possible. The flag is fully
  407. * compatible with both #aiProcess_SplitLargeMeshes and #aiProcess_SortByPType.
  408. */
  409. aiProcess_OptimizeMeshes = 0x200000,
  410. // -------------------------------------------------------------------------
  411. /** <hr>A postprocessing step to optimize the scene hierarchy.
  412. *
  413. * Nodes without animations, bones, lights or cameras assigned are
  414. * collapsed and joined.
  415. *
  416. * Node names can be lost during this step. If you use special 'tag nodes'
  417. * to pass additional information through your content pipeline, use the
  418. * <tt>#AI_CONFIG_PP_OG_EXCLUDE_LIST</tt> importer property to specify a
  419. * list of node names you want to be kept. Nodes matching one of the names
  420. * in this list won't be touched or modified.
  421. *
  422. * Use this flag with caution. Most simple files will be collapsed to a
  423. * single node, so complex hierarchies are usually completely lost. This is not
  424. * useful for editor environments, but probably a very effective
  425. * optimization if you just want to get the model data, convert it to your
  426. * own format, and render it as fast as possible.
  427. *
  428. * This flag is designed to be used with #aiProcess_OptimizeMeshes for best
  429. * results.
  430. *
  431. * @note 'Crappy' scenes with thousands of extremely small meshes packed
  432. * in deeply nested nodes exist for almost all file formats.
  433. * #aiProcess_OptimizeMeshes in combination with #aiProcess_OptimizeGraph
  434. * usually fixes them all and makes them renderable.
  435. */
  436. aiProcess_OptimizeGraph = 0x400000,
  437. // -------------------------------------------------------------------------
  438. /** <hr>This step flips all UV coordinates along the y-axis and adjusts
  439. * material settings and bitangents accordingly.
  440. *
  441. * <b>Output UV coordinate system:</b>
  442. * @code
  443. * 0y|0y ---------- 1x|0y
  444. * | |
  445. * | |
  446. * | |
  447. * 0x|1y ---------- 1x|1y
  448. * @endcode
  449. *
  450. * You'll probably want to consider this flag if you use Direct3D for
  451. * rendering. The #aiProcess_ConvertToLeftHanded flag supersedes this
  452. * setting and bundles all conversions typically required for D3D-based
  453. * applications.
  454. */
  455. aiProcess_FlipUVs = 0x800000,
  456. // -------------------------------------------------------------------------
  457. /** <hr>This step adjusts the output face winding order to be CW.
  458. *
  459. * The default face winding order is counter clockwise (CCW).
  460. *
  461. * <b>Output face order:</b>
  462. * @code
  463. * x2
  464. *
  465. * x0
  466. * x1
  467. * @endcode
  468. */
  469. aiProcess_FlipWindingOrder = 0x1000000,
  470. // -------------------------------------------------------------------------
  471. /** <hr>This step splits meshes with many bones into sub-meshes so that each
  472. * su-bmesh has fewer or as many bones as a given limit.
  473. */
  474. aiProcess_SplitByBoneCount = 0x2000000,
  475. // -------------------------------------------------------------------------
  476. /** <hr>This step removes bones losslessly or according to some threshold.
  477. *
  478. * In some cases (i.e. formats that require it) exporters are forced to
  479. * assign dummy bone weights to otherwise static meshes assigned to
  480. * animated meshes. Full, weight-based skinning is expensive while
  481. * animating nodes is extremely cheap, so this step is offered to clean up
  482. * the data in that regard.
  483. *
  484. * Use <tt>#AI_CONFIG_PP_DB_THRESHOLD</tt> to control this.
  485. * Use <tt>#AI_CONFIG_PP_DB_ALL_OR_NONE</tt> if you want bones removed if and
  486. * only if all bones within the scene qualify for removal.
  487. */
  488. aiProcess_Debone = 0x4000000
  489. // aiProcess_GenEntityMeshes = 0x100000,
  490. // aiProcess_OptimizeAnimations = 0x200000
  491. // aiProcess_FixTexturePaths = 0x200000
  492. };
  493. // ---------------------------------------------------------------------------------------
  494. /** @def aiProcess_ConvertToLeftHanded
  495. * @brief Shortcut flag for Direct3D-based applications.
  496. *
  497. * Supersedes the #aiProcess_MakeLeftHanded and #aiProcess_FlipUVs and
  498. * #aiProcess_FlipWindingOrder flags.
  499. * The output data matches Direct3D's conventions: left-handed geometry, upper-left
  500. * origin for UV coordinates and finally clockwise face order, suitable for CCW culling.
  501. *
  502. * @deprecated
  503. */
  504. #define aiProcess_ConvertToLeftHanded ( \
  505. aiProcess_MakeLeftHanded | \
  506. aiProcess_FlipUVs | \
  507. aiProcess_FlipWindingOrder | \
  508. 0 )
  509. // ---------------------------------------------------------------------------------------
  510. /** @def aiProcessPreset_TargetRealtimeUse_Fast
  511. * @brief Default postprocess configuration optimizing the data for real-time rendering.
  512. *
  513. * Applications would want to use this preset to load models on end-user PCs,
  514. * maybe for direct use in game.
  515. *
  516. * If you're using DirectX, don't forget to combine this value with
  517. * the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations
  518. * in your application apply the #aiProcess_TransformUVCoords step, too.
  519. * @note Please take the time to read the docs for the steps enabled by this preset.
  520. * Some of them offer further configurable properties, while some of them might not be of
  521. * use for you so it might be better to not specify them.
  522. */
  523. #define aiProcessPreset_TargetRealtime_Fast ( \
  524. aiProcess_CalcTangentSpace | \
  525. aiProcess_GenNormals | \
  526. aiProcess_JoinIdenticalVertices | \
  527. aiProcess_Triangulate | \
  528. aiProcess_GenUVCoords | \
  529. aiProcess_SortByPType | \
  530. 0 )
  531. // ---------------------------------------------------------------------------------------
  532. /** @def aiProcessPreset_TargetRealtime_Quality
  533. * @brief Default postprocess configuration optimizing the data for real-time rendering.
  534. *
  535. * Unlike #aiProcessPreset_TargetRealtime_Fast, this configuration
  536. * performs some extra optimizations to improve rendering speed and
  537. * to minimize memory usage. It could be a good choice for a level editor
  538. * environment where import speed is not so important.
  539. *
  540. * If you're using DirectX, don't forget to combine this value with
  541. * the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations
  542. * in your application apply the #aiProcess_TransformUVCoords step, too.
  543. * @note Please take the time to read the docs for the steps enabled by this preset.
  544. * Some of them offer further configurable properties, while some of them might not be
  545. * of use for you so it might be better to not specify them.
  546. */
  547. #define aiProcessPreset_TargetRealtime_Quality ( \
  548. aiProcess_CalcTangentSpace | \
  549. aiProcess_GenSmoothNormals | \
  550. aiProcess_JoinIdenticalVertices | \
  551. aiProcess_ImproveCacheLocality | \
  552. aiProcess_LimitBoneWeights | \
  553. aiProcess_RemoveRedundantMaterials | \
  554. aiProcess_SplitLargeMeshes | \
  555. aiProcess_Triangulate | \
  556. aiProcess_GenUVCoords | \
  557. aiProcess_SortByPType | \
  558. aiProcess_FindDegenerates | \
  559. aiProcess_FindInvalidData | \
  560. 0 )
  561. // ---------------------------------------------------------------------------------------
  562. /** @def aiProcessPreset_TargetRealtime_MaxQuality
  563. * @brief Default postprocess configuration optimizing the data for real-time rendering.
  564. *
  565. * This preset enables almost every optimization step to achieve perfectly
  566. * optimized data. It's your choice for level editor environments where import speed
  567. * is not important.
  568. *
  569. * If you're using DirectX, don't forget to combine this value with
  570. * the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations
  571. * in your application, apply the #aiProcess_TransformUVCoords step, too.
  572. * @note Please take the time to read the docs for the steps enabled by this preset.
  573. * Some of them offer further configurable properties, while some of them might not be
  574. * of use for you so it might be better to not specify them.
  575. */
  576. #define aiProcessPreset_TargetRealtime_MaxQuality ( \
  577. aiProcessPreset_TargetRealtime_Quality | \
  578. aiProcess_FindInstances | \
  579. aiProcess_ValidateDataStructure | \
  580. aiProcess_OptimizeMeshes | \
  581. 0 )
  582. #ifdef __cplusplus
  583. } // end of extern "C"
  584. #endif
  585. #endif // AI_POSTPROCESS_H_INC