You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

598 lines
26 KiB

  1. /*
  2. ---------------------------------------------------------------------------
  3. Open Asset Import Library (ASSIMP)
  4. ---------------------------------------------------------------------------
  5. Copyright (c) 2006-2009, ASSIMP Development 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 Development 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. /**
  35. * Definitions for import post processing steps.
  36. */
  37. module assimp.postprocess;
  38. extern ( C ) {
  39. /**
  40. * Defines the flags for all possible post processing steps.
  41. *
  42. * See: <code>aiImportFile</code>, <code>aiImportFileEx</code>
  43. */
  44. enum aiPostProcessSteps {
  45. /**
  46. * Calculates the tangents and bitangents for the imported meshes.
  47. *
  48. * Does nothing if a mesh does not have normals. You might want this post
  49. * processing step to be executed if you plan to use tangent space
  50. * calculations such as normal mapping applied to the meshes. There is a
  51. * config setting, <code>AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE</code>,
  52. * which allows you to specify a maximum smoothing angle for the
  53. * algorithm. However, usually you will want to use the default value.
  54. */
  55. CalcTangentSpace = 0x1,
  56. /**
  57. * Identifies and joins identical vertex data sets within all imported
  58. * meshes.
  59. *
  60. * After this step is run each mesh does contain only unique vertices
  61. * anymore, so a vertex is possibly used by multiple faces. You usually
  62. * want to use this post processing step. If your application deals with
  63. * indexed geometry, this step is compulsory or you will just waste
  64. * rendering time. <em>If this flag is not specified</em>, no vertices
  65. * are referenced by more than one face and <em>no index buffer is
  66. * required</em> for rendering.
  67. */
  68. JoinIdenticalVertices = 0x2,
  69. /**
  70. * Converts all the imported data to a left-handed coordinate space.
  71. *
  72. * By default the data is returned in a right-handed coordinate space
  73. * which for example OpenGL prefers. In this space, +X points to the
  74. * right, +Z points towards the viewer and and +Y points upwards. In the
  75. * DirectX coordinate space +X points to the right, +Y points upwards and
  76. * +Z points away from the viewer.
  77. *
  78. * You will probably want to consider this flag if you use Direct3D for
  79. * rendering. The <code>ConvertToLeftHanded</code> flag supersedes this
  80. * setting and bundles all conversions typically required for D3D-based
  81. * applications.
  82. */
  83. MakeLeftHanded = 0x4,
  84. /**
  85. * Triangulates all faces of all meshes.
  86. *
  87. * By default the imported mesh data might contain faces with more than 3
  88. * indices. For rendering you'll usually want all faces to be triangles.
  89. * This post processing step splits up all higher faces to triangles.
  90. * Line and point primitives are <em>not</em> modified!.
  91. *
  92. * If you want »triangles only« with no other kinds of primitives,
  93. * specify both <code>Triangulate</code> and <code>SortByPType</code> and
  94. * ignore all point and line meshes when you process Assimp's output.
  95. */
  96. Triangulate = 0x8,
  97. /**
  98. * Removes some parts of the data structure (animations, materials, light
  99. * sources, cameras, textures, vertex components).
  100. *
  101. * The components to be removed are specified in a separate configuration
  102. * option, <code>AI_CONFIG_PP_RVC_FLAGS</code>. This is quite useful if
  103. * you don't need all parts of the output structure. Especially vertex
  104. * colors are rarely used today.
  105. *
  106. * Calling this step to remove unrequired stuff from the pipeline as
  107. * early as possible results in an increased performance and a better
  108. * optimized output data structure.
  109. *
  110. * This step is also useful if you want to force Assimp to recompute
  111. * normals or tangents since the corresponding steps don't recompute them
  112. * if they have already been loaded from the source asset.
  113. *
  114. * This flag is a poor one, mainly because its purpose is usually
  115. * misunderstood. Consider the following case: a 3d model has been exported
  116. * from a CAD app, it has per-face vertex colors. Because of the vertex
  117. * colors (which are not even used by most apps),
  118. * <code>JoinIdenticalVertices</code> cannot join vertices at the same
  119. * position. By using this step, unneeded components are excluded as
  120. * early as possible thus opening more room for internal optimzations.
  121. */
  122. RemoveComponent = 0x10,
  123. /**
  124. * Generates normals for all faces of all meshes.
  125. *
  126. * This is ignored if normals are already there at the time where this
  127. * flag is evaluated. Model importers try to load them from the source
  128. * file, so they are usually already there. Face normals are shared
  129. * between all points of a single face, so a single point can have
  130. * multiple normals, which, in other words, enforces the library to
  131. * duplicate vertices in some cases. <code>JoinIdenticalVertices</code>
  132. * is <em>useless</em> then.
  133. *
  134. * This flag may not be specified together with
  135. * <code>GenSmoothNormals</code>.
  136. */
  137. GenNormals = 0x20,
  138. /**
  139. * Generates smooth normals for all vertices in the mesh.
  140. *
  141. * This is ignored if normals are already there at the time where this
  142. * flag is evaluated. Model importers try to load them from the source file, so
  143. * they are usually already there.
  144. *
  145. * There is a configuration option,
  146. * <code>AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE</code> which allows you to
  147. * specify an angle maximum for the normal smoothing algorithm. Normals
  148. * exceeding this limit are not smoothed, resulting in a »hard« seam
  149. * between two faces. Using a decent angle here (e.g. 80°) results in
  150. * very good visual appearance.
  151. */
  152. GenSmoothNormals = 0x40,
  153. /**
  154. * Splits large meshes into smaller submeshes.
  155. *
  156. * This is quite useful for realtime rendering where the number of triangles
  157. * which can be maximally processed in a single draw-call is usually limited
  158. * by the video driver/hardware. The maximum vertex buffer is usually limited,
  159. * too. Both requirements can be met with this step: you may specify both a
  160. * triangle and vertex limit for a single mesh.
  161. *
  162. * The split limits can (and should!) be set through the
  163. * <code>AI_CONFIG_PP_SLM_VERTEX_LIMIT</code> and
  164. * <code>AI_CONFIG_PP_SLM_TRIANGLE_LIMIT</code> settings. The default
  165. * values are <code>AI_SLM_DEFAULT_MAX_VERTICES</code> and
  166. * <code>AI_SLM_DEFAULT_MAX_TRIANGLES</code>.
  167. *
  168. * Note that splitting is generally a time-consuming task, but not if
  169. * there's nothing to split. The use of this step is recommended for most
  170. * users.
  171. */
  172. SplitLargeMeshes = 0x80,
  173. /**
  174. * Removes the node graph and pre-transforms all vertices with the local
  175. * transformation matrices of their nodes.
  176. *
  177. * The output scene does still contain nodes, however, there is only a
  178. * root node with children, each one referencing only one mesh, each
  179. * mesh referencing one material. For rendering, you can simply render
  180. * all meshes in order, you don't need to pay attention to local
  181. * transformations and the node hierarchy. Animations are removed during
  182. * this step.
  183. *
  184. * This step is intended for applications that have no scenegraph.
  185. *
  186. * The step <em>can</em> cause some problems: if e.g. a mesh of the asset
  187. * contains normals and another, using the same material index, does not,
  188. * they will be brought together, but the first meshes's part of the
  189. * normal list is zeroed. However, these artifacts are rare.
  190. *
  191. * Note: The <code>AI_CONFIG_PP_PTV_NORMALIZE</code> configuration
  192. * property can be set to normalize the scene's spatial dimension
  193. * to the -1...1 range.
  194. */
  195. PreTransformVertices = 0x100,
  196. /**
  197. * Limits the number of bones simultaneously affecting a single vertex to
  198. * a maximum value.
  199. *
  200. * If any vertex is affected by more than that number of bones, the least
  201. * important vertex weights are removed and the remaining vertex weights
  202. * are renormalized so that the weights still sum up to 1.
  203. *
  204. * The default bone weight limit is 4 (<code>AI_LMW_MAX_WEIGHTS</code>),
  205. * but you can use the <code>#AI_CONFIG_PP_LBW_MAX_WEIGHTS</code> setting
  206. * to supply your own limit to the post processing step.
  207. *
  208. * If you intend to perform the skinning in hardware, this post processing
  209. * step might be of interest for you.
  210. */
  211. LimitBoneWeights = 0x200,
  212. /**
  213. * Validates the imported scene data structure.
  214. *
  215. * This makes sure that all indices are valid, all animations and
  216. * bones are linked correctly, all material references are correct, etc.
  217. *
  218. * It is recommended to capture Assimp's log output if you use this flag,
  219. * so you can easily find ot what's actually wrong if a file fails the
  220. * validation. The validator is quite rude and will find <em>all</em>
  221. * inconsistencies in the data structure.
  222. *
  223. * Plugin developers are recommended to use it to debug their loaders.
  224. *
  225. * There are two types of validation failures:
  226. * <ul>
  227. * <li>Error: There's something wrong with the imported data. Further
  228. * postprocessing is not possible and the data is not usable at all.
  229. * The import fails, see <code>aiGetErrorString()</code> for the
  230. * error message.</li>
  231. * <li>Warning: There are some minor issues (e.g. 1000000 animation
  232. * keyframes with the same time), but further postprocessing and use
  233. * of the data structure is still safe. Warning details are written
  234. * to the log file, <code>AI_SCENE_FLAGS_VALIDATION_WARNING</code> is
  235. * set in <code>aiScene::mFlags</code></li>
  236. * </ul>
  237. *
  238. * This post-processing step is not time-consuming. It's use is not
  239. * compulsory, but recommended.
  240. */
  241. ValidateDataStructure = 0x400,
  242. /**
  243. * Reorders triangles for better vertex cache locality.
  244. *
  245. * The step tries to improve the ACMR (average post-transform vertex cache
  246. * miss ratio) for all meshes. The implementation runs in O(n) and is
  247. * roughly based on the 'tipsify' algorithm (see
  248. * <tt>http://www.cs.princeton.edu/gfx/pubs/Sander_2007_%3ETR/tipsy.pdf</tt>).
  249. *
  250. * If you intend to render huge models in hardware, this step might
  251. * be of interest for you. The <code>AI_CONFIG_PP_ICL_PTCACHE_SIZE</code>
  252. * config setting can be used to fine-tune the cache optimization.
  253. */
  254. ImproveCacheLocality = 0x800,
  255. /**
  256. * Searches for redundant/unreferenced materials and removes them.
  257. *
  258. * This is especially useful in combination with the
  259. * <code>PretransformVertices</code> and <code>OptimizeMeshes</code>
  260. * flags. Both join small meshes with equal characteristics, but they
  261. * can't do their work if two meshes have different materials. Because
  262. * several material settings are always lost during Assimp's import
  263. * filters, (and because many exporters don't check for redundant
  264. * materials), huge models often have materials which are are defined
  265. * several times with exactly the same settings.
  266. *
  267. * Several material settings not contributing to the final appearance of
  268. * a surface are ignored in all comparisons; the material name is one of
  269. * them. So, if you are passing additional information through the
  270. * content pipeline (probably using »magic« material names), don't
  271. * specify this flag. Alternatively take a look at the
  272. * <code>AI_CONFIG_PP_RRM_EXCLUDE_LIST</code> setting.
  273. */
  274. RemoveRedundantMaterials = 0x1000,
  275. /**
  276. * This step tries to determine which meshes have normal vectors that are
  277. * acing inwards.
  278. *
  279. * The algorithm is simple but effective: The bounding box of all
  280. * vertices and their normals is compared against the volume of the
  281. * bounding box of all vertices without their normals. This works well
  282. * for most objects, problems might occur with planar surfaces. However,
  283. * the step tries to filter such cases.
  284. *
  285. * The step inverts all in-facing normals. Generally it is recommended to
  286. * enable this step, although the result is not always correct.
  287. */
  288. FixInfacingNormals = 0x2000,
  289. /**
  290. * This step splits meshes with more than one primitive type in
  291. * homogeneous submeshes.
  292. *
  293. * The step is executed after the triangulation step. After the step
  294. * returns, just one bit is set in <code>aiMesh.mPrimitiveTypes</code>.
  295. * This is especially useful for real-time rendering where point and line
  296. * primitives are often ignored or rendered separately.
  297. *
  298. * You can use the <code>AI_CONFIG_PP_SBP_REMOVE</code> option 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. SortByPType = 0x8000,
  303. /**
  304. * This step searches all meshes for degenerated primitives and converts
  305. * them to proper lines or points.
  306. *
  307. * A face is »degenerated« if one or more of its points are identical.
  308. * To have the degenerated stuff not only detected and collapsed but also
  309. * removed, try one of the following procedures:
  310. *
  311. * <b>1.</b> (if you support lines and points for rendering but don't
  312. * want the degenerates)
  313. * <ul>
  314. * <li>Specify the <code>FindDegenerates</code> flag.</li>
  315. * <li>Set the <code>AI_CONFIG_PP_FD_REMOVE</code> option to 1. This will
  316. * cause the step to remove degenerated triangles from the import
  317. * as soon as they're detected. They won't pass any further
  318. * pipeline steps.</li>
  319. * </ul>
  320. *
  321. * <b>2.</b>(if you don't support lines and points at all ...)
  322. * <ul>
  323. * <li>Specify the <code>FindDegenerates</code> flag.</li>
  324. * <li>Specify the <code>SortByPType</code> flag. This moves line and
  325. * point primitives to separate meshes.</li>
  326. * <li>Set the <code>AI_CONFIG_PP_SBP_REMOVE</codet> option to
  327. * <code>aiPrimitiveType_POINTS | aiPrimitiveType_LINES</code>
  328. * to cause SortByPType to reject point and line meshes from the
  329. * scene.</li>
  330. * </ul>
  331. *
  332. * Note: Degenerated polygons are not necessarily bad and that's why
  333. * they're not removed by default. There are several file formats
  334. * which don't support lines or points. Some exporters bypass the
  335. * format specification and write them as degenerated triangle
  336. * instead.
  337. */
  338. FindDegenerates = 0x10000,
  339. /**
  340. * This step searches all meshes for invalid data, such as zeroed normal
  341. * vectors or invalid UV coords and removes/fixes them. This is intended
  342. * to get rid of some common exporter errors.
  343. *
  344. * This is especially useful for normals. If they are invalid, and the
  345. * step recognizes this, they will be removed and can later be
  346. * recomputed, e.g. by the <code>GenSmoothNormals</code> step.
  347. *
  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 <code>AI_CONFIG_PP_FID_ANIM_ACCURACY</code> config property
  351. * decides the accuracy of the check for duplicate animation tracks.
  352. */
  353. FindInvalidData = 0x20000,
  354. /**
  355. * This step converts non-UV mappings (such as spherical or cylindrical
  356. * mapping) to proper texture coordinate channels.
  357. *
  358. * Most applications will support UV mapping only, so you will probably
  359. * want to specify this step in every case. Note tha Assimp is not always
  360. * able to match the original mapping implementation of the 3d app which
  361. * produced a model perfectly. It's always better to let the father app
  362. * compute the UV channels, at least 3ds max, maja, blender, lightwave,
  363. * modo, ... are able to achieve this.
  364. *
  365. * Note: If this step is not requested, you'll need to process the
  366. * <code>AI_MATKEY_MAPPING</code> material property in order to
  367. * display all assets properly.
  368. */
  369. GenUVCoords = 0x40000,
  370. /**
  371. * This step applies per-texture UV transformations and bakes them to
  372. * stand-alone vtexture coordinate channelss.
  373. *
  374. * UV transformations are specified per-texture – see the
  375. * <code>AI_MATKEY_UVTRANSFORM</code> material key for more information.
  376. * This step processes all textures with transformed input UV coordinates
  377. * and generates new (pretransformed) UV channel which replace the old
  378. * channel. Most applications won't support UV transformations, so you
  379. * will probably want to specify this step.
  380. *
  381. * Note: UV transformations are usually implemented in realtime apps by
  382. * transforming texture coordinates at vertex shader stage with a 3x3
  383. * (homogenous) transformation matrix.
  384. */
  385. TransformUVCoords = 0x80000,
  386. /**
  387. * This step searches for duplicate meshes and replaces duplicates with
  388. * references to the first mesh.
  389. *
  390. * This step takes a while, don't use it if you have no time. Its main
  391. * purpose is to workaround the limitation that many export file formats
  392. * don't support instanced meshes, so exporters need to duplicate meshes.
  393. * This step removes the duplicates again. Please note that Assimp does
  394. * currently not support per-node material assignment to meshes, which
  395. * means that identical meshes with differnent materials are currently
  396. * <em>not</em> joined, although this is planned for future versions.
  397. */
  398. FindInstances = 0x100000,
  399. /**
  400. * A postprocessing step to reduce the number of meshes.
  401. *
  402. * In fact, it will reduce the number of drawcalls.
  403. *
  404. * This is a very effective optimization and is recommended to be used
  405. * together with <code>OptimizeGraph</code>, if possible. The flag is
  406. * fully compatible with both <code>SplitLargeMeshes</code> and
  407. * <code>SortByPType</code>.
  408. */
  409. OptimizeMeshes = 0x200000,
  410. /**
  411. * A postprocessing step to optimize the scene hierarchy.
  412. *
  413. * Nodes with no 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. * <code>AI_CONFIG_PP_OG_EXCLUDE_LIST</code> setting to specify a list of
  419. * node names you want to be kept. Nodes matching one of the names in
  420. * 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, complex hierarchies are usually completely lost. That's
  424. * note the right choice for editor environments, but probably a very
  425. * effective optimization if you just want to get the model data, convert
  426. * it to your own format and render it as fast as possible.
  427. *
  428. * This flag is designed to be used with <code>OptimizeMeshes</code> for
  429. * best 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. * <code>OptimizeMeshes</code> in combination with
  434. * <code>OptimizeGraph</code> usually fixes them all and makes them
  435. * renderable.
  436. */
  437. OptimizeGraph = 0x400000,
  438. /** This step flips all UV coordinates along the y-axis and adjusts
  439. * material settings and bitangents accordingly.
  440. *
  441. * Output UV coordinate system:
  442. * <pre> 0y|0y ---------- 1x|0y
  443. * | |
  444. * | |
  445. * | |
  446. * 0x|1y ---------- 1x|1y</pre>
  447. * You'll probably want to consider this flag if you use Direct3D for
  448. * rendering. The <code>AI_PROCESS_CONVERT_TO_LEFT_HANDED</code> flag
  449. * supersedes this setting and bundles all conversions typically required
  450. * for D3D-based applications.
  451. */
  452. FlipUVs = 0x800000,
  453. /**
  454. * This step adjusts the output face winding order to be clockwise.
  455. *
  456. * The default face winding order is counter clockwise.
  457. *
  458. * Output face order:
  459. * <pre> x2
  460. *
  461. * x0
  462. * x1</pre>
  463. */
  464. FlipWindingOrder = 0x1000000
  465. }
  466. /**
  467. * Abbrevation for convenience.
  468. */
  469. alias aiPostProcessSteps aiProcess;
  470. /**
  471. * Shortcut flag for Direct3D-based applications.
  472. *
  473. * Combines the <code>MakeLeftHanded</code>, <code>FlipUVs</code> and
  474. * <code>FlipWindingOrder</code> flags. The output data matches Direct3D's
  475. * conventions: left-handed geometry, upper-left origin for UV coordinates
  476. * and clockwise face order, suitable for CCW culling.
  477. */
  478. const aiPostProcessSteps AI_PROCESS_CONVERT_TO_LEFT_HANDED =
  479. aiProcess.MakeLeftHanded |
  480. aiProcess.FlipUVs |
  481. aiProcess.FlipWindingOrder;
  482. /**
  483. * Default postprocess configuration optimizing the data for real-time rendering.
  484. *
  485. * Applications would want to use this preset to load models on end-user
  486. * PCs, maybe for direct use in game.
  487. *
  488. * If you're using DirectX, don't forget to combine this value with
  489. * the <code>ConvertToLeftHanded</code> step. If you don't support UV
  490. * transformations in your application, apply the
  491. * <code>TransformUVCoords</code> step, too.
  492. *
  493. * Note: Please take the time to read the doc for the steps enabled by this
  494. * preset. Some of them offer further configurable properties, some of
  495. * them might not be of use for you so it might be better to not specify
  496. * them.
  497. */
  498. const aiPostProcessSteps AI_PROCESS_PRESET_TARGET_REALTIME_FAST =
  499. aiProcess.CalcTangentSpace |
  500. aiProcess.GenNormals |
  501. aiProcess.JoinIdenticalVertices |
  502. aiProcess.Triangulate |
  503. aiProcess.GenUVCoords |
  504. aiProcess.SortByPType;
  505. /**
  506. * Default postprocess configuration optimizing the data for real-time
  507. * rendering.
  508. *
  509. * Unlike <code>AI_PROCESS_PRESET_TARGET_REALTIME_FAST</code>, this
  510. * configuration performs some extra optimizations to improve rendering
  511. * speed and to minimize memory usage. It could be a good choice for a
  512. * level editor environment where import speed is not so important.
  513. *
  514. * If you're using DirectX, don't forget to combine this value with
  515. * the <code>ConvertToLeftHanded</code> step. If you don't support UV
  516. * transformations in your application, apply the
  517. * <code>TransformUVCoords</code> step, too.
  518. *
  519. * Note: Please take the time to read the doc for the steps enabled by this
  520. * preset. Some of them offer further configurable properties, some of
  521. * them might not be of use for you so it might be better to not specify
  522. * them.
  523. */
  524. const aiPostProcessSteps AI_PROCESS_PRESET_TARGET_REALTIME_QUALITY =
  525. aiProcess.CalcTangentSpace |
  526. aiProcess.GenSmoothNormals |
  527. aiProcess.JoinIdenticalVertices |
  528. aiProcess.ImproveCacheLocality |
  529. aiProcess.LimitBoneWeights |
  530. aiProcess.RemoveRedundantMaterials |
  531. aiProcess.SplitLargeMeshes |
  532. aiProcess.Triangulate |
  533. aiProcess.GenUVCoords |
  534. aiProcess.SortByPType |
  535. aiProcess.FindDegenerates |
  536. aiProcess.FindInvalidData;
  537. /**
  538. * Default postprocess configuration optimizing the data for real-time
  539. * rendering.
  540. *
  541. * This preset enables almost every optimization step to achieve perfectly
  542. * optimized data. It's your choice for level editor environments where
  543. * import speed is not important.
  544. *
  545. * If you're using DirectX, don't forget to combine this value with
  546. * the <code>ConvertToLeftHanded</code> step. If you don't support UV
  547. * transformations in your application, apply the
  548. * <code>TransformUVCoords</code> step, too.
  549. *
  550. * Note: Please take the time to read the doc for the steps enabled by this
  551. * preset. Some of them offer further configurable properties, some of
  552. * them might not be of use for you so it might be better to not specify
  553. * them.
  554. */
  555. const aiPostProcessSteps AI_PROCESS_PRESET_TARGET_REALTIME_MAX_QUALITY =
  556. AI_PROCESS_PRESET_TARGET_REALTIME_QUALITY |
  557. aiProcess.FindInstances |
  558. aiProcess.ValidateDataStructure |
  559. aiProcess.OptimizeMeshes;
  560. }