1 /*
2 Open Asset Import Library (assimp)
3 ----------------------------------------------------------------------
4 
5 Copyright (c) 2006-2012, assimp team
6 All rights reserved.
7 
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:
11 
12 * Redistributions of source code must retain the above
13   copyright notice, this list of conditions and the
14   following disclaimer.
15 
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.
20 
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.
25 
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.
37 
38 ----------------------------------------------------------------------
39 */
40 
41 /** @file aiPostProcess.h
42  *  @brief Definitions for import post processing steps
43  */
44 #ifndef AI_POSTPROCESS_H_INC
45 #define AI_POSTPROCESS_H_INC
46 
47 #include "types.h"
48 
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
52 
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 {
64 
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. Thanks.
74 	 */
75 	aiProcess_CalcTangentSpace = 0x1,
76 
77 	// -------------------------------------------------------------------------
78 	/** <hr>Identifies and joins identical vertex data sets within all
79 	 *  imported meshes.
80 	 *
81 	 * After this step is run each mesh does contain only unique vertices anymore,
82 	 * so a vertex is possibly 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,
89 
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 	 * for example OpenGL prefers. In this space, +X points to the right,
95 	 * +Z points towards the viewer and 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,
105 
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 all higher faces to triangles.
112 	 * 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,
121 
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. Especially vertex
129 	 * colors are rarely used today ... . Calling this step to remove unrequired
130 	 * stuff from the pipeline as early as possible results in an increased
131 	 * performance and a better 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, it has per-face vertex colors. Vertex positions can't be
140 	 * shared, thus the #aiProcess_JoinIdenticalVertices step fails to
141 	 * optimize the data. Just because 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 optimzations.
145 	 */
146 	aiProcess_RemoveComponent = 0x10,
147 
148 	// -------------------------------------------------------------------------
149 	/** <hr>Generates normals for all faces of all meshes.
150 	 *
151 	 * This is ignored if normals are already there at the time where 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 in
155 	 * other words, enforces 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,
161 
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 where 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 (of course) 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 a 'hard' seam between two faces.
174 	* Using a decent angle here (e.g. 80�) results in very good visual
175 	* appearance.
176 	*/
177 	aiProcess_GenSmoothNormals = 0x40,
178 
179 	// -------------------------------------------------------------------------
180 	/** <hr>Splits large meshes into smaller submeshes
181 	*
182 	* This is quite useful for realtime rendering where the number of triangles
183 	* which can be maximally processed in a single draw-call is usually 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 not if there's
194 	* nothing to split. The use of this step is recommended for most users.
195 	*/
196 	aiProcess_SplitLargeMeshes = 0x80,
197 
198 	// -------------------------------------------------------------------------
199 	/** <hr>Removes the node graph and pre-transforms all vertices with
200 	* the local transformation matrices of their nodes. The output
201 	* scene does still contain nodes, however, there is only a
202 	* root node with children, each one referencing only one mesh,
203 	* each mesh referencing one material. For rendering, you can
204 	* simply render all meshes in order, you don't need to pay
205 	* attention to local transformations and the node hierarchy.
206 	* Animations are removed during this step.
207 	* This step is intended for applications without a scenegraph.
208 	* The step CAN cause some problems: if e.g. a mesh of the asset
209 	* contains normals and another, using the same material index, does not,
210 	* they will be brought together, but the first meshes's part of
211 	* the normal list is zeroed. However, these artifacts are rare.
212 	* @note The <tt>#AI_CONFIG_PP_PTV_NORMALIZE</tt> configuration property
213 	* can be set to normalize the scene's spatial dimension to the -1...1
214 	* range.
215 	*/
216 	aiProcess_PreTransformVertices = 0x100,
217 
218 	// -------------------------------------------------------------------------
219 	/** <hr>Limits the number of bones simultaneously affecting a single vertex
220 	*  to a maximum value.
221 	*
222 	* If any vertex is affected by more than that number of bones, the least
223 	* important vertex weights are removed and the remaining vertex weights are
224 	* renormalized so that the weights still sum up to 1.
225 	* The default bone weight limit is 4 (defined as <tt>#AI_LMW_MAX_WEIGHTS</tt> in
226 	* config.h), but you can use the <tt>#AI_CONFIG_PP_LBW_MAX_WEIGHTS</tt> setting to
227 	* supply your own limit to the post processing step.
228 	*
229 	* If you intend to perform the skinning in hardware, this post processing
230 	* step might be of interest for you.
231 	*/
232 	aiProcess_LimitBoneWeights = 0x200,
233 
234 	// -------------------------------------------------------------------------
235 	/** <hr>Validates the imported scene data structure
236 	 * This makes sure that all indices are valid, all animations and
237 	 * bones are linked correctly, all material references are correct .. etc.
238 	 *
239 	 * It is recommended to capture Assimp's log output if you use this flag,
240 	 * so you can easily find ot what's actually wrong if a file fails the
241 	 * validation. The validator is quite rude and will find *all*
242 	 * inconsistencies in the data structure ... plugin developers are
243 	 * recommended to use it to debug their loaders. There are two types of
244 	 * validation failures:
245 	 * <ul>
246 	 * <li>Error: There's something wrong with the imported data. Further
247 	 *   postprocessing is not possible and the data is not usable at all.
248 	 *   The import fails. #Importer::GetErrorString() or #aiGetErrorString()
249 	 *   carry the error message around.</li>
250 	 * <li>Warning: There are some minor issues (e.g. 1000000 animation
251 	 *   keyframes with the same time), but further postprocessing and use
252 	 *   of the data structure is still safe. Warning details are written
253 	 *   to the log file, <tt>#AI_SCENE_FLAGS_VALIDATION_WARNING</tt> is set
254 	 *   in #aiScene::mFlags</li>
255 	 * </ul>
256 	 *
257 	 * This post-processing step is not time-consuming. It's use is not
258 	 * compulsory, but recommended.
259 	*/
260 	aiProcess_ValidateDataStructure = 0x400,
261 
262 	// -------------------------------------------------------------------------
263 	/** <hr>Reorders triangles for better vertex cache locality.
264 	 *
265 	 * The step tries to improve the ACMR (average post-transform vertex cache
266 	 * miss ratio) for all meshes. The implementation runs in O(n) and is
267 	 * roughly based on the 'tipsify' algorithm (see <a href="
268 	 * http://www.cs.princeton.edu/gfx/pubs/Sander_2007_%3ETR/tipsy.pdf">this
269 	 * paper</a>).
270 	 *
271 	 * If you intend to render huge models in hardware, this step might
272 	 * be of interest for you. The <tt>#AI_CONFIG_PP_ICL_PTCACHE_SIZE</tt>config
273 	 * setting can be used to fine-tune the cache optimization.
274 	 */
275 	aiProcess_ImproveCacheLocality = 0x800,
276 
277 	// -------------------------------------------------------------------------
278 	/** <hr>Searches for redundant/unreferenced materials and removes them.
279 	 *
280 	 * This is especially useful in combination with the
281 	 * #aiProcess_PretransformVertices and #aiProcess_OptimizeMeshes flags.
282 	 * Both join small meshes with equal characteristics, but they can't do
283 	 * their work if two meshes have different materials. Because several
284 	 * material settings are always lost during Assimp's import filters,
285 	 * (and because many exporters don't check for redundant materials), huge
286 	 * models often have materials which are are defined several times with
287 	 * exactly the same settings ..
288 	 *
289 	 * Several material settings not contributing to the final appearance of
290 	 * a surface are ignored in all comparisons ... the material name is
291 	 * one of them. So, if you're passing additional information through the
292 	 * content pipeline (probably using *magic* material names), don't
293 	 * specify this flag. Alternatively take a look at the
294 	 * <tt>#AI_CONFIG_PP_RRM_EXCLUDE_LIST</tt> setting.
295 	 */
296 	aiProcess_RemoveRedundantMaterials = 0x1000,
297 
298 	// -------------------------------------------------------------------------
299 	/** <hr>This step tries to determine which meshes have normal vectors
300 	 * that are facing inwards. The algorithm is simple but effective:
301 	 * the bounding box of all vertices + their normals is compared against
302 	 * the volume of the bounding box of all vertices without their normals.
303 	 * This works well for most objects, problems might occur with planar
304 	 * surfaces. However, the step tries to filter such cases.
305 	 * The step inverts all in-facing normals. Generally it is recommended
306 	 * to enable this step, although the result is not always correct.
307 	*/
308 	aiProcess_FixInfacingNormals = 0x2000,
309 
310 	// -------------------------------------------------------------------------
311 	/** <hr>This step splits meshes with more than one primitive type in
312 	 *  homogeneous submeshes.
313 	 *
314 	 *  The step is executed after the triangulation step. After the step
315 	 *  returns, just one bit is set in aiMesh::mPrimitiveTypes. This is
316 	 *  especially useful for real-time rendering where point and line
317 	 *  primitives are often ignored or rendered separately.
318 	 *  You can use the <tt>#AI_CONFIG_PP_SBP_REMOVE</tt> option to specify which
319 	 *  primitive types you need. This can be used to easily exclude
320 	 *  lines and points, which are rarely used, from the import.
321 	*/
322 	aiProcess_SortByPType = 0x8000,
323 
324 	// -------------------------------------------------------------------------
325 	/** <hr>This step searches all meshes for degenerated primitives and
326 	 *  converts them to proper lines or points.
327 	 *
328 	 * A face is 'degenerated' if one or more of its points are identical.
329 	 * To have the degenerated stuff not only detected and collapsed but
330 	 * also removed, try one of the following procedures:
331 	 * <br><b>1.</b> (if you support lines&points for rendering but don't
332 	 *    want the degenerates)</br>
333 	 * <ul>
334 	 *   <li>Specify the #aiProcess_FindDegenerates flag.
335 	 *   </li>
336 	 *   <li>Set the <tt>AI_CONFIG_PP_FD_REMOVE</tt> option to 1. This will
337 	 *       cause the step to remove degenerated triangles from the import
338 	 *       as soon as they're detected. They won't pass any further
339 	 *       pipeline steps.
340 	 *   </li>
341 	 * </ul>
342 	 * <br><b>2.</b>(if you don't support lines&points at all ...)</br>
343 	 * <ul>
344 	 *   <li>Specify the #aiProcess_FindDegenerates flag.
345 	 *   </li>
346 	 *   <li>Specify the #aiProcess_SortByPType flag. This moves line and
347 	 *     point primitives to separate meshes.
348 	 *   </li>
349 	 *   <li>Set the <tt>AI_CONFIG_PP_SBP_REMOVE</tt> option to
350 	 *       @code aiPrimitiveType_POINTS | aiPrimitiveType_LINES
351 	 *       @endcode to cause SortByPType to reject point
352 	 *       and line meshes from the scene.
353 	 *   </li>
354 	 * </ul>
355 	 * @note Degenerated polygons are not necessarily evil and that's why
356 	 * they're not removed by default. There are several file formats which
357 	 * don't support lines or points ... some exporters bypass the
358 	 * format specification and write them as degenerated triangle instead.
359 	*/
360 	aiProcess_FindDegenerates = 0x10000,
361 
362 	// -------------------------------------------------------------------------
363 	/** <hr>This step searches all meshes for invalid data, such as zeroed
364 	 *  normal vectors or invalid UV coords and removes/fixes them. This is
365 	 *  intended to get rid of some common exporter errors.
366 	 *
367 	 * This is especially useful for normals. If they are invalid, and
368 	 * the step recognizes this, they will be removed and can later
369 	 * be recomputed, i.e. by the #aiProcess_GenSmoothNormals flag.<br>
370 	 * The step will also remove meshes that are infinitely small and reduce
371 	 * animation tracks consisting of hundreds if redundant keys to a single
372 	 * key. The <tt>AI_CONFIG_PP_FID_ANIM_ACCURACY</tt> config property decides
373 	 * the accuracy of the check for duplicate animation tracks.
374 	*/
375 	aiProcess_FindInvalidData = 0x20000,
376 
377 	// -------------------------------------------------------------------------
378 	/** <hr>This step converts non-UV mappings (such as spherical or
379 	 *  cylindrical mapping) to proper texture coordinate channels.
380 	 *
381 	 * Most applications will support UV mapping only, so you will
382 	 * probably want to specify this step in every case. Note tha Assimp is not
383 	 * always able to match the original mapping implementation of the
384 	 * 3d app which produced a model perfectly. It's always better to let the
385 	 * father app compute the UV channels, at least 3ds max, maja, blender,
386 	 * lightwave, modo, ... are able to achieve this.
387 	 *
388 	 * @note If this step is not requested, you'll need to process the
389 	 * <tt>#AI_MATKEY_MAPPING</tt> material property in order to display all assets
390 	 * properly.
391 	 */
392 	aiProcess_GenUVCoords = 0x40000,
393 
394 	// -------------------------------------------------------------------------
395 	/** <hr>This step applies per-texture UV transformations and bakes
396 	 *  them to stand-alone vtexture coordinate channelss.
397 	 *
398 	 * UV transformations are specified per-texture - see the
399 	 * <tt>#AI_MATKEY_UVTRANSFORM</tt> material key for more information.
400 	 * This step processes all textures with
401 	 * transformed input UV coordinates and generates new (pretransformed) UV channel
402 	 * which replace the old channel. Most applications won't support UV
403 	 * transformations, so you will probably want to specify this step.
404      *
405 	 * @note UV transformations are usually implemented in realtime apps by
406 	 * transforming texture coordinates at vertex shader stage with a 3x3
407 	 * (homogenous) transformation matrix.
408 	*/
409 	aiProcess_TransformUVCoords = 0x80000,
410 
411 	// -------------------------------------------------------------------------
412 	/** <hr>This step searches for duplicate meshes and replaces duplicates
413 	 *  with references to the first mesh.
414 	 *
415 	 *  This step takes a while, don't use it if you have no time.
416 	 *  Its main purpose is to workaround the limitation that many export
417 	 *  file formats don't support instanced meshes, so exporters need to
418 	 *  duplicate meshes. This step removes the duplicates again. Please
419  	 *  note that Assimp does currently not support per-node material
420 	 *  assignment to meshes, which means that identical meshes with
421 	 *  differnent materials are currently *not* joined, although this is
422 	 *  planned for future versions.
423 	 */
424 	aiProcess_FindInstances = 0x100000,
425 
426 	// -------------------------------------------------------------------------
427 	/** <hr>A postprocessing step to reduce the number of meshes.
428 	 *
429 	 *  In fact, it will reduce the number of drawcalls.
430 	 *
431 	 *  This is a very effective optimization and is recommended to be used
432 	 *  together with #aiProcess_OptimizeGraph, if possible. The flag is fully
433 	 *  compatible with both #aiProcess_SplitLargeMeshes and #aiProcess_SortByPType.
434 	*/
435 	aiProcess_OptimizeMeshes  = 0x200000,
436 
437 
438 	// -------------------------------------------------------------------------
439 	/** <hr>A postprocessing step to optimize the scene hierarchy.
440 	 *
441 	 *  Nodes with no animations, bones, lights or cameras assigned are
442 	 *  collapsed and joined.
443 	 *
444 	 *  Node names can be lost during this step. If you use special 'tag nodes'
445 	 *  to pass additional information through your content pipeline, use the
446 	 *  <tt>#AI_CONFIG_PP_OG_EXCLUDE_LIST</tt> setting to specify a list of node
447 	 *  names you want to be kept. Nodes matching one of the names in this list won't
448 	 *  be touched or modified.
449 	 *
450 	 *  Use this flag with caution. Most simple files will be collapsed to a
451 	 *  single node, complex hierarchies are usually completely lost. That's not
452 	 *  the right choice for editor environments, but probably a very effective
453 	 *  optimization if you just want to get the model data, convert it to your
454 	 *  own format and render it as fast as possible.
455 	 *
456 	 *  This flag is designed to be used with #aiProcess_OptimizeMeshes for best
457 	 *  results.
458 	 *
459 	 *  @note 'crappy' scenes with thousands of extremely small meshes packed
460 	 *  in deeply nested nodes exist for almost all file formats.
461 	 *  #aiProcess_OptimizeMeshes in combination with #aiProcess_OptimizeGraph
462 	 *  usually fixes them all and makes them renderable.
463 	*/
464 	aiProcess_OptimizeGraph  = 0x400000,
465 
466 	// -------------------------------------------------------------------------
467 	/** <hr>This step flips all UV coordinates along the y-axis and adjusts
468 	 * material settings and bitangents accordingly.
469 	 * <br><b>Output UV coordinate system:</b>
470 	 * @code
471 	 * 0y|0y ---------- 1x|0y
472      * |                 |
473      * |                 |
474      * |                 |
475      * 0x|1y ---------- 1x|1y
476 	 * @endcode
477 	 *
478 	 * You'll probably want to consider this flag if you use Direct3D for
479 	 * rendering. The #aiProcess_ConvertToLeftHanded flag supersedes this
480 	 * setting and bundles all conversions typically required for D3D-based
481 	 * applications.
482 	*/
483 	aiProcess_FlipUVs = 0x800000,
484 
485 	// -------------------------------------------------------------------------
486 	/** <hr>This step adjusts the output face winding order to be cw.
487 	 *
488 	 * The default face winding order is counter clockwise.
489 	 * <br><b>Output face order:</b>
490 	 * @code
491 	 *       x2
492 	 *
493 	 *                         x0
494 	 *  x1
495 	 * @endcode
496 	*/
497 	aiProcess_FlipWindingOrder  = 0x1000000,
498 
499 	// -------------------------------------------------------------------------
500 	/** <hr>This step splits meshes with many bones into submeshes so that each
501 	 * submesh has fewer or as many bones as a given limit.
502     */
503 	aiProcess_SplitByBoneCount  = 0x2000000,
504 
505 	// -------------------------------------------------------------------------
506 	/** <hr>This step removes bones losslessly or according to some threshold.
507 	 *  In some cases (i.e. format that require it) exporters are forced to
508 	 *  assign dummy bone weights to otherwise static meshes assigned to
509 	 *  animated meshes. Since full, weight-based skinning is expensive but
510 	 *  animating nodes is extremely cheap, this step is offered to cleanup
511 	 *  the data in that regard.
512 	 *
513 	 *  Use <tt>#AI_CONFIG_PP_DB_THRESHOLD</tt> to control this.
514 	 *  Use <tt>#AI_CONFIG_PP_DB_ALL_OR_NONE</tt> if you want bones removed if and
515 	 *	only if all bones within the scene qualify for removal.
516     */
517 	aiProcess_Debone  = 0x4000000
518 
519 	// aiProcess_GenEntityMeshes = 0x100000,
520 	// aiProcess_OptimizeAnimations = 0x200000
521 	// aiProcess_FixTexturePaths = 0x200000
522 };
523 
524 
525 // ---------------------------------------------------------------------------------------
526 /** @def aiProcess_ConvertToLeftHanded
527  *  @brief Shortcut flag for Direct3D-based applications.
528  *
529  *  Supersedes the #aiProcess_MakeLeftHanded and #aiProcess_FlipUVs and
530  *  #aiProcess_FlipWindingOrder flags.
531  *  The output data matches Direct3D's conventions: left-handed geometry, upper-left
532  *  origin for UV coordinates and finally clockwise face order, suitable for CCW culling.
533  *
534  *  @deprecated
535  */
536 #define aiProcess_ConvertToLeftHanded ( \
537 	aiProcess_MakeLeftHanded     | \
538 	aiProcess_FlipUVs            | \
539 	aiProcess_FlipWindingOrder   | \
540 	0 )
541 
542 
543 // ---------------------------------------------------------------------------------------
544 /** @def aiProcessPreset_TargetRealtimeUse_Fast
545  *  @brief Default postprocess configuration optimizing the data for real-time rendering.
546  *
547  *  Applications would want to use this preset to load models on end-user PCs,
548  *  maybe for direct use in game.
549  *
550  * If you're using DirectX, don't forget to combine this value with
551  * the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations
552  * in your application apply the #aiProcess_TransformUVCoords step, too.
553  *  @note Please take the time to read the doc to the steps enabled by this preset.
554  *  Some of them offer further configurable properties, some of them might not be of
555  *  use for you so it might be better to not specify them.
556  */
557 #define aiProcessPreset_TargetRealtime_Fast ( \
558 	aiProcess_CalcTangentSpace		|  \
559 	aiProcess_GenNormals			|  \
560 	aiProcess_JoinIdenticalVertices |  \
561 	aiProcess_Triangulate			|  \
562 	aiProcess_GenUVCoords           |  \
563 	aiProcess_SortByPType           |  \
564 	0 )
565 
566  // ---------------------------------------------------------------------------------------
567  /** @def aiProcessPreset_TargetRealtime_Quality
568   *  @brief Default postprocess configuration optimizing the data for real-time rendering.
569   *
570   *  Unlike #aiProcessPreset_TargetRealtime_Fast, this configuration
571   *  performs some extra optimizations to improve rendering speed and
572   *  to minimize memory usage. It could be a good choice for a level editor
573   *  environment where import speed is not so important.
574   *
575   *  If you're using DirectX, don't forget to combine this value with
576   *  the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations
577   *  in your application apply the #aiProcess_TransformUVCoords step, too.
578   *  @note Please take the time to read the doc for the steps enabled by this preset.
579   *  Some of them offer further configurable properties, some of them might not be of
580   *  use for you so it might be better to not specify them.
581   */
582 #define aiProcessPreset_TargetRealtime_Quality ( \
583 	aiProcess_CalcTangentSpace				|  \
584 	aiProcess_GenSmoothNormals				|  \
585 	aiProcess_JoinIdenticalVertices			|  \
586 	aiProcess_ImproveCacheLocality			|  \
587 	aiProcess_LimitBoneWeights				|  \
588 	aiProcess_RemoveRedundantMaterials      |  \
589 	aiProcess_SplitLargeMeshes				|  \
590 	aiProcess_Triangulate					|  \
591 	aiProcess_GenUVCoords                   |  \
592 	aiProcess_SortByPType                   |  \
593 	aiProcess_FindDegenerates               |  \
594 	aiProcess_FindInvalidData               |  \
595 	0 )
596 
597  // ---------------------------------------------------------------------------------------
598  /** @def aiProcessPreset_TargetRealtime_MaxQuality
599   *  @brief Default postprocess configuration optimizing the data for real-time rendering.
600   *
601   *  This preset enables almost every optimization step to achieve perfectly
602   *  optimized data. It's your choice for level editor environments where import speed
603   *  is not important.
604   *
605   *  If you're using DirectX, don't forget to combine this value with
606   *  the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations
607   *  in your application, apply the #aiProcess_TransformUVCoords step, too.
608   *  @note Please take the time to read the doc for the steps enabled by this preset.
609   *  Some of them offer further configurable properties, some of them might not be of
610   *  use for you so it might be better to not specify them.
611   */
612 #define aiProcessPreset_TargetRealtime_MaxQuality ( \
613 	aiProcessPreset_TargetRealtime_Quality   |  \
614 	aiProcess_FindInstances                  |  \
615 	aiProcess_ValidateDataStructure          |  \
616 	aiProcess_OptimizeMeshes                 |  \
617 	aiProcess_Debone						 |  \
618 	0 )
619 
620 
621 #ifdef __cplusplus
622 } // end of extern "C"
623 #endif
624 
625 #endif // AI_POSTPROCESS_H_INC
626