vrshoot

view libs/assimp/assimp/postprocess.h @ 0:b2f14e535253

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