Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-15 09:02:15

0001 /*
0002 Open Asset Import Library (assimp)
0003 ----------------------------------------------------------------------
0004 
0005 Copyright (c) 2006-2024, assimp team
0006 
0007 
0008 All rights reserved.
0009 
0010 Redistribution and use of this software in source and binary forms,
0011 with or without modification, are permitted provided that the
0012 following conditions are met:
0013 
0014 * Redistributions of source code must retain the above
0015   copyright notice, this list of conditions and the
0016   following disclaimer.
0017 
0018 * Redistributions in binary form must reproduce the above
0019   copyright notice, this list of conditions and the
0020   following disclaimer in the documentation and/or other
0021   materials provided with the distribution.
0022 
0023 * Neither the name of the assimp team, nor the names of its
0024   contributors may be used to endorse or promote products
0025   derived from this software without specific prior
0026   written permission of the assimp team.
0027 
0028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
0029 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
0030 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
0031 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
0032 OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
0033 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
0034 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
0035 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
0036 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0037 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
0038 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0039 
0040 ----------------------------------------------------------------------
0041 */
0042 
0043 /** @file postprocess.h
0044  *  @brief Definitions for import post processing steps
0045  */
0046 #pragma once
0047 #ifndef AI_POSTPROCESS_H_INC
0048 #define AI_POSTPROCESS_H_INC
0049 
0050 #include <assimp/types.h>
0051 
0052 #ifdef __GNUC__
0053 #   pragma GCC system_header
0054 #endif
0055 
0056 #ifdef __cplusplus
0057 extern "C" {
0058 #endif
0059 
0060 // -----------------------------------------------------------------------------------
0061 /** @enum  aiPostProcessSteps
0062  *  @brief Defines the flags for all possible post processing steps.
0063  *
0064  *  @note Some steps are influenced by properties set on the Assimp::Importer itself
0065  *
0066  *  @see Assimp::Importer::ReadFile()
0067  *  @see Assimp::Importer::SetPropertyInteger()
0068  *  @see aiImportFile
0069  *  @see aiImportFileEx
0070  */
0071 // -----------------------------------------------------------------------------------
0072 enum aiPostProcessSteps
0073 {
0074 
0075     // -------------------------------------------------------------------------
0076     /** <hr>Calculates the tangents and bitangents for the imported meshes.
0077      *
0078      * Does nothing if a mesh does not have normals. You might want this post
0079      * processing step to be executed if you plan to use tangent space calculations
0080      * such as normal mapping  applied to the meshes. There's an importer property,
0081      * <tt>#AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE</tt>, which allows you to specify
0082      * a maximum smoothing angle for the algorithm. However, usually you'll
0083      * want to leave it at the default value.
0084      */
0085     aiProcess_CalcTangentSpace = 0x1,
0086 
0087     // -------------------------------------------------------------------------
0088     /** <hr>Identifies and joins identical vertex data sets within all
0089      *  imported meshes.
0090      *
0091      * After this step is run, each mesh contains unique vertices,
0092      * so a vertex may be used by multiple faces. You usually want
0093      * to use this post processing step. If your application deals with
0094      * indexed geometry, this step is compulsory or you'll just waste rendering
0095      * time. <b>If this flag is not specified</b>, no vertices are referenced by
0096      * more than one face and <b>no index buffer is required</b> for rendering.
0097      * Unless the importer (like ply) had to split vertices. Then you need one regardless.
0098      */
0099     aiProcess_JoinIdenticalVertices = 0x2,
0100 
0101     // -------------------------------------------------------------------------
0102     /** <hr>Converts all the imported data to a left-handed coordinate space.
0103      *
0104      * By default the data is returned in a right-handed coordinate space (which
0105      * OpenGL prefers). In this space, +X points to the right,
0106      * +Z points towards the viewer, and +Y points upwards. In the DirectX
0107      * coordinate space +X points to the right, +Y points upwards, and +Z points
0108      * away from the viewer.
0109      *
0110      * You'll probably want to consider this flag if you use Direct3D for
0111      * rendering. The #aiProcess_ConvertToLeftHanded flag supersedes this
0112      * setting and bundles all conversions typically required for D3D-based
0113      * applications.
0114      */
0115     aiProcess_MakeLeftHanded = 0x4,
0116 
0117     // -------------------------------------------------------------------------
0118     /** <hr>Triangulates all faces of all meshes.
0119      *
0120      * By default the imported mesh data might contain faces with more than 3
0121      * indices. For rendering you'll usually want all faces to be triangles.
0122      * This post processing step splits up faces with more than 3 indices into
0123      * triangles. Line and point primitives are *not* modified! If you want
0124      * 'triangles only' with no other kinds of primitives, try the following
0125      * solution:
0126      * <ul>
0127      * <li>Specify both #aiProcess_Triangulate and #aiProcess_SortByPType </li>
0128      * <li>Ignore all point and line meshes when you process assimp's output</li>
0129      * </ul>
0130      */
0131     aiProcess_Triangulate = 0x8,
0132 
0133     // -------------------------------------------------------------------------
0134     /** <hr>Removes some parts of the data structure (animations, materials,
0135      *  light sources, cameras, textures, vertex components).
0136      *
0137      * The  components to be removed are specified in a separate
0138      * importer property, <tt>#AI_CONFIG_PP_RVC_FLAGS</tt>. This is quite useful
0139      * if you don't need all parts of the output structure. Vertex colors
0140      * are rarely used today for example... Calling this step to remove unneeded
0141      * data from the pipeline as early as possible results in increased
0142      * performance and a more optimized output data structure.
0143      * This step is also useful if you want to force Assimp to recompute
0144      * normals or tangents. The corresponding steps don't recompute them if
0145      * they're already there (loaded from the source asset). By using this
0146      * step you can make sure they are NOT there.
0147      *
0148      * This flag is a poor one, mainly because its purpose is usually
0149      * misunderstood. Consider the following case: a 3D model has been exported
0150      * from a CAD app, and it has per-face vertex colors. Vertex positions can't be
0151      * shared, thus the #aiProcess_JoinIdenticalVertices step fails to
0152      * optimize the data because of these nasty little vertex colors.
0153      * Most apps don't even process them, so it's all for nothing. By using
0154      * this step, unneeded components are excluded as early as possible
0155      * thus opening more room for internal optimizations.
0156      */
0157     aiProcess_RemoveComponent = 0x10,
0158 
0159     // -------------------------------------------------------------------------
0160     /** <hr>Generates normals for all faces of all meshes.
0161      *
0162      * This is ignored if normals are already there at the time this flag
0163      * is evaluated. Model importers try to load them from the source file, so
0164      * they're usually already there. Face normals are shared between all points
0165      * of a single face, so a single point can have multiple normals, which
0166      * forces the library to duplicate vertices in some cases.
0167      * #aiProcess_JoinIdenticalVertices is *senseless* then.
0168      *
0169      * This flag may not be specified together with #aiProcess_GenSmoothNormals.
0170      */
0171     aiProcess_GenNormals = 0x20,
0172 
0173     // -------------------------------------------------------------------------
0174     /** <hr>Generates smooth normals for all vertices in the mesh.
0175     *
0176     * This is ignored if normals are already there at the time this flag
0177     * is evaluated. Model importers try to load them from the source file, so
0178     * they're usually already there.
0179     *
0180     * This flag may not be specified together with
0181     * #aiProcess_GenNormals. There's a importer property,
0182     * <tt>#AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE</tt> which allows you to specify
0183     * an angle maximum for the normal smoothing algorithm. Normals exceeding
0184     * this limit are not smoothed, resulting in a 'hard' seam between two faces.
0185     * Using a decent angle here (e.g. 80 degrees) results in very good visual
0186     * appearance.
0187     */
0188     aiProcess_GenSmoothNormals = 0x40,
0189 
0190     // -------------------------------------------------------------------------
0191     /** <hr>Splits large meshes into smaller sub-meshes.
0192     *
0193     * This is quite useful for real-time rendering, where the number of triangles
0194     * which can be maximally processed in a single draw-call is limited
0195     * by the video driver/hardware. The maximum vertex buffer is usually limited
0196     * too. Both requirements can be met with this step: you may specify both a
0197     * triangle and vertex limit for a single mesh.
0198     *
0199     * The split limits can (and should!) be set through the
0200     * <tt>#AI_CONFIG_PP_SLM_VERTEX_LIMIT</tt> and <tt>#AI_CONFIG_PP_SLM_TRIANGLE_LIMIT</tt>
0201     * importer properties. The default values are <tt>#AI_SLM_DEFAULT_MAX_VERTICES</tt> and
0202     * <tt>#AI_SLM_DEFAULT_MAX_TRIANGLES</tt>.
0203     *
0204     * Note that splitting is generally a time-consuming task, but only if there's
0205     * something to split. The use of this step is recommended for most users.
0206     */
0207     aiProcess_SplitLargeMeshes = 0x80,
0208 
0209     // -------------------------------------------------------------------------
0210     /** <hr>Removes the node graph and pre-transforms all vertices with
0211     * the local transformation matrices of their nodes.
0212     *
0213     * If the resulting scene can be reduced to a single mesh, with a single
0214     * material, no lights, and no cameras, then the output scene will contain
0215     * only a root node (with no children) that references the single mesh.
0216     * Otherwise, the output scene will be reduced to a root node with a single
0217     * level of child nodes, each one referencing one mesh, and each mesh
0218     * referencing one material.
0219     *
0220     * In either case, for rendering, you can
0221     * simply render all meshes in order - you don't need to pay
0222     * attention to local transformations and the node hierarchy.
0223     * Animations are removed during this step.
0224     * This step is intended for applications without a scenegraph.
0225     * The step CAN cause some problems: if e.g. a mesh of the asset
0226     * contains normals and another, using the same material index, does not,
0227     * they will be brought together, but the first meshes's part of
0228     * the normal list is zeroed. However, these artifacts are rare.
0229     * @note The <tt>#AI_CONFIG_PP_PTV_NORMALIZE</tt> configuration property
0230     * can be set to normalize the scene's spatial dimension to the -1...1
0231     * range.
0232     */
0233     aiProcess_PreTransformVertices = 0x100,
0234 
0235     // -------------------------------------------------------------------------
0236     /** <hr>Limits the number of bones simultaneously affecting a single vertex
0237     *  to a maximum value.
0238     *
0239     * If any vertex is affected by more than the maximum number of bones, the least
0240     * important vertex weights are removed and the remaining vertex weights are
0241     * renormalized so that the weights still sum up to 1.
0242     * The default bone weight limit is 4 (defined as <tt>#AI_LMW_MAX_WEIGHTS</tt> in
0243     * config.h), but you can use the <tt>#AI_CONFIG_PP_LBW_MAX_WEIGHTS</tt> importer
0244     * property to supply your own limit to the post processing step.
0245     *
0246     * If you intend to perform the skinning in hardware, this post processing
0247     * step might be of interest to you.
0248     */
0249     aiProcess_LimitBoneWeights = 0x200,
0250 
0251     // -------------------------------------------------------------------------
0252     /** <hr>Validates the imported scene data structure.
0253      * This makes sure that all indices are valid, all animations and
0254      * bones are linked correctly, all material references are correct .. etc.
0255      *
0256      * It is recommended that you capture Assimp's log output if you use this flag,
0257      * so you can easily find out what's wrong if a file fails the
0258      * validation. The validator is quite strict and will find *all*
0259      * inconsistencies in the data structure... It is recommended that plugin
0260      * developers use it to debug their loaders. There are two types of
0261      * validation failures:
0262      * <ul>
0263      * <li>Error: There's something wrong with the imported data. Further
0264      *   postprocessing is not possible and the data is not usable at all.
0265      *   The import fails. #Importer::GetErrorString() or #aiGetErrorString()
0266      *   carry the error message around.</li>
0267      * <li>Warning: There are some minor issues (e.g. 1000000 animation
0268      *   keyframes with the same time), but further postprocessing and use
0269      *   of the data structure is still safe. Warning details are written
0270      *   to the log file, <tt>#AI_SCENE_FLAGS_VALIDATION_WARNING</tt> is set
0271      *   in #aiScene::mFlags</li>
0272      * </ul>
0273      *
0274      * This post-processing step is not time-consuming. Its use is not
0275      * compulsory, but recommended.
0276     */
0277     aiProcess_ValidateDataStructure = 0x400,
0278 
0279     // -------------------------------------------------------------------------
0280     /** <hr>Reorders triangles for better vertex cache locality.
0281      *
0282      * The step tries to improve the ACMR (average post-transform vertex cache
0283      * miss ratio) for all meshes. The implementation runs in O(n) and is
0284      * roughly based on the 'tipsify' algorithm (see <a href="
0285      * http://www.cs.princeton.edu/gfx/pubs/Sander_2007_%3ETR/tipsy.pdf">this
0286      * paper</a>).
0287      *
0288      * If you intend to render huge models in hardware, this step might
0289      * be of interest to you. The <tt>#AI_CONFIG_PP_ICL_PTCACHE_SIZE</tt>
0290      * importer property can be used to fine-tune the cache optimization.
0291      */
0292     aiProcess_ImproveCacheLocality = 0x800,
0293 
0294     // -------------------------------------------------------------------------
0295     /** <hr>Searches for redundant/unreferenced materials and removes them.
0296      *
0297      * This is especially useful in combination with the
0298      * #aiProcess_PreTransformVertices and #aiProcess_OptimizeMeshes flags.
0299      * Both join small meshes with equal characteristics, but they can't do
0300      * their work if two meshes have different materials. Because several
0301      * material settings are lost during Assimp's import filters,
0302      * (and because many exporters don't check for redundant materials), huge
0303      * models often have materials which are are defined several times with
0304      * exactly the same settings.
0305      *
0306      * Several material settings not contributing to the final appearance of
0307      * a surface are ignored in all comparisons (e.g. the material name).
0308      * So, if you're passing additional information through the
0309      * content pipeline (probably using *magic* material names), don't
0310      * specify this flag. Alternatively take a look at the
0311      * <tt>#AI_CONFIG_PP_RRM_EXCLUDE_LIST</tt> importer property.
0312      */
0313     aiProcess_RemoveRedundantMaterials = 0x1000,
0314 
0315     // -------------------------------------------------------------------------
0316     /** <hr>This step tries to determine which meshes have normal vectors
0317      * that are facing inwards and inverts them.
0318      *
0319      * The algorithm is simple but effective:
0320      * the bounding box of all vertices + their normals is compared against
0321      * the volume of the bounding box of all vertices without their normals.
0322      * This works well for most objects, problems might occur with planar
0323      * surfaces. However, the step tries to filter such cases.
0324      * The step inverts all in-facing normals. Generally it is recommended
0325      * to enable this step, although the result is not always correct.
0326     */
0327     aiProcess_FixInfacingNormals = 0x2000,
0328 
0329 
0330 
0331     // -------------------------------------------------------------------------
0332     /**
0333      * This step generically populates aiBone->mArmature and aiBone->mNode generically
0334      * The point of these is it saves you later having to calculate these elements
0335      * This is useful when handling rest information or skin information
0336      * If you have multiple armatures on your models we strongly recommend enabling this
0337      * Instead of writing your own multi-root, multi-armature lookups we have done the
0338      * hard work for you :)
0339    */
0340     aiProcess_PopulateArmatureData = 0x4000,
0341 
0342     // -------------------------------------------------------------------------
0343     /** <hr>This step splits meshes with more than one primitive type in
0344      *  homogeneous sub-meshes.
0345      *
0346      *  The step is executed after the triangulation step. After the step
0347      *  returns, just one bit is set in aiMesh::mPrimitiveTypes. This is
0348      *  especially useful for real-time rendering where point and line
0349      *  primitives are often ignored or rendered separately.
0350      *  You can use the <tt>#AI_CONFIG_PP_SBP_REMOVE</tt> importer property to
0351      *  specify which primitive types you need. This can be used to easily
0352      *  exclude lines and points, which are rarely used, from the import.
0353     */
0354     aiProcess_SortByPType = 0x8000,
0355 
0356     // -------------------------------------------------------------------------
0357     /** <hr>This step searches all meshes for degenerate primitives and
0358      *  converts them to proper lines or points.
0359      *
0360      * A face is 'degenerate' if one or more of its points are identical.
0361      * To have the degenerate stuff not only detected and collapsed but
0362      * removed, try one of the following procedures:
0363      * <br><b>1.</b> (if you support lines and points for rendering but don't
0364      *    want the degenerates)<br>
0365      * <ul>
0366      *   <li>Specify the #aiProcess_FindDegenerates flag.
0367      *   </li>
0368      *   <li>Set the <tt>#AI_CONFIG_PP_FD_REMOVE</tt> importer property to
0369      *       1. This will cause the step to remove degenerate triangles from the
0370      *       import as soon as they're detected. They won't pass any further
0371      *       pipeline steps.
0372      *   </li>
0373      * </ul>
0374      * <br><b>2.</b>(if you don't support lines and points at all)<br>
0375      * <ul>
0376      *   <li>Specify the #aiProcess_FindDegenerates flag.
0377      *   </li>
0378      *   <li>Specify the #aiProcess_SortByPType flag. This moves line and
0379      *     point primitives to separate meshes.
0380      *   </li>
0381      *   <li>Set the <tt>#AI_CONFIG_PP_SBP_REMOVE</tt> importer property to
0382      *       @code aiPrimitiveType_POINTS | aiPrimitiveType_LINES
0383      *       @endcode to cause SortByPType to reject point
0384      *       and line meshes from the scene.
0385      *   </li>
0386      * </ul>
0387      *
0388      * This step also removes very small triangles with a surface area smaller
0389      * than 10^-6. If you rely on having these small triangles, or notice holes
0390      * in your model, set the property <tt>#AI_CONFIG_PP_FD_CHECKAREA</tt> to
0391      * false.
0392      * @note Degenerate polygons are not necessarily evil and that's why
0393      * they're not removed by default. There are several file formats which
0394      * don't support lines or points, and some exporters bypass the
0395      * format specification and write them as degenerate triangles instead.
0396     */
0397     aiProcess_FindDegenerates = 0x10000,
0398 
0399     // -------------------------------------------------------------------------
0400     /** <hr>This step searches all meshes for invalid data, such as zeroed
0401      *  normal vectors or invalid UV coords and removes/fixes them. This is
0402      *  intended to get rid of some common exporter errors.
0403      *
0404      * This is especially useful for normals. If they are invalid, and
0405      * the step recognizes this, they will be removed and can later
0406      * be recomputed, i.e. by the #aiProcess_GenSmoothNormals flag.<br>
0407      * The step will also remove meshes that are infinitely small and reduce
0408      * animation tracks consisting of hundreds if redundant keys to a single
0409      * key. The <tt>AI_CONFIG_PP_FID_ANIM_ACCURACY</tt> config property decides
0410      * the accuracy of the check for duplicate animation tracks.
0411     */
0412     aiProcess_FindInvalidData = 0x20000,
0413 
0414     // -------------------------------------------------------------------------
0415     /** <hr>This step converts non-UV mappings (such as spherical or
0416      *  cylindrical mapping) to proper texture coordinate channels.
0417      *
0418      * Most applications will support UV mapping only, so you will
0419      * probably want to specify this step in every case. Note that Assimp is not
0420      * always able to match the original mapping implementation of the
0421      * 3D app which produced a model perfectly. It's always better to let the
0422      * modelling app compute the UV channels - 3ds max, Maya, Blender,
0423      * LightWave, and Modo do this for example.
0424      *
0425      * @note If this step is not requested, you'll need to process the
0426      * <tt>#AI_MATKEY_MAPPING</tt> material property in order to display all assets
0427      * properly.
0428      */
0429     aiProcess_GenUVCoords = 0x40000,
0430 
0431     // -------------------------------------------------------------------------
0432     /** <hr>This step applies per-texture UV transformations and bakes
0433      *  them into stand-alone vtexture coordinate channels.
0434      *
0435      * UV transformations are specified per-texture - see the
0436      * <tt>#AI_MATKEY_UVTRANSFORM</tt> material key for more information.
0437      * This step processes all textures with
0438      * transformed input UV coordinates and generates a new (pre-transformed) UV channel
0439      * which replaces the old channel. Most applications won't support UV
0440      * transformations, so you will probably want to specify this step.
0441      *
0442      * @note UV transformations are usually implemented in real-time apps by
0443      * transforming texture coordinates at vertex shader stage with a 3x3
0444      * (homogeneous) transformation matrix.
0445     */
0446     aiProcess_TransformUVCoords = 0x80000,
0447 
0448     // -------------------------------------------------------------------------
0449     /** <hr>This step searches for duplicate meshes and replaces them
0450      *  with references to the first mesh.
0451      *
0452      *  This step takes a while, so don't use it if speed is a concern.
0453      *  Its main purpose is to workaround the fact that many export
0454      *  file formats don't support instanced meshes, so exporters need to
0455      *  duplicate meshes. This step removes the duplicates again. Please
0456      *  note that Assimp does not currently support per-node material
0457      *  assignment to meshes, which means that identical meshes with
0458      *  different materials are currently *not* joined, although this is
0459      *  planned for future versions.
0460      */
0461     aiProcess_FindInstances = 0x100000,
0462 
0463     // -------------------------------------------------------------------------
0464     /** <hr>A post-processing step to reduce the number of meshes.
0465      *
0466      *  This will, in fact, reduce the number of draw calls.
0467      *
0468      *  This is a very effective optimization and is recommended to be used
0469      *  together with #aiProcess_OptimizeGraph, if possible. The flag is fully
0470      *  compatible with both #aiProcess_SplitLargeMeshes and #aiProcess_SortByPType.
0471     */
0472     aiProcess_OptimizeMeshes  = 0x200000,
0473 
0474 
0475     // -------------------------------------------------------------------------
0476     /** <hr>A post-processing step to optimize the scene hierarchy.
0477      *
0478      *  Nodes without animations, bones, lights or cameras assigned are
0479      *  collapsed and joined.
0480      *
0481      *  Node names can be lost during this step. If you use special 'tag nodes'
0482      *  to pass additional information through your content pipeline, use the
0483      *  <tt>#AI_CONFIG_PP_OG_EXCLUDE_LIST</tt> importer property to specify a
0484      *  list of node names you want to be kept. Nodes matching one of the names
0485      *  in this list won't be touched or modified.
0486      *
0487      *  Use this flag with caution. Most simple files will be collapsed to a
0488      *  single node, so complex hierarchies are usually completely lost. This is not
0489      *  useful for editor environments, but probably a very effective
0490      *  optimization if you just want to get the model data, convert it to your
0491      *  own format, and render it as fast as possible.
0492      *
0493      *  This flag is designed to be used with #aiProcess_OptimizeMeshes for best
0494      *  results.
0495      *
0496      *  @note 'Crappy' scenes with thousands of extremely small meshes packed
0497      *  in deeply nested nodes exist for almost all file formats.
0498      *  #aiProcess_OptimizeMeshes in combination with #aiProcess_OptimizeGraph
0499      *  usually fixes them all and makes them renderable.
0500     */
0501     aiProcess_OptimizeGraph  = 0x400000,
0502 
0503     // -------------------------------------------------------------------------
0504     /** <hr>This step flips all UV coordinates along the y-axis and adjusts
0505      * material settings and bitangents accordingly.
0506      *
0507      * <b>Output UV coordinate system:</b>
0508      * @code
0509      * 0y|0y ---------- 1x|0y
0510      * |                 |
0511      * |                 |
0512      * |                 |
0513      * 0x|1y ---------- 1x|1y
0514      * @endcode
0515      *
0516      * You'll probably want to consider this flag if you use Direct3D for
0517      * rendering. The #aiProcess_ConvertToLeftHanded flag supersedes this
0518      * setting and bundles all conversions typically required for D3D-based
0519      * applications.
0520     */
0521     aiProcess_FlipUVs = 0x800000,
0522 
0523     // -------------------------------------------------------------------------
0524     /** <hr>This step adjusts the output face winding order to be CW.
0525      *
0526      * The default face winding order is counter clockwise (CCW).
0527      *
0528      * <b>Output face order:</b>
0529      * @code
0530      *       x2
0531      *
0532      *                         x0
0533      *  x1
0534      * @endcode
0535     */
0536     aiProcess_FlipWindingOrder  = 0x1000000,
0537 
0538     // -------------------------------------------------------------------------
0539     /** <hr>This step splits meshes with many bones into sub-meshes so that each
0540      * sub-mesh has fewer or as many bones as a given limit.
0541     */
0542     aiProcess_SplitByBoneCount  = 0x2000000,
0543 
0544     // -------------------------------------------------------------------------
0545     /** <hr>This step removes bones losslessly or according to some threshold.
0546      *
0547      *  In some cases (i.e. formats that require it) exporters are forced to
0548      *  assign dummy bone weights to otherwise static meshes assigned to
0549      *  animated meshes. Full, weight-based skinning is expensive while
0550      *  animating nodes is extremely cheap, so this step is offered to clean up
0551      *  the data in that regard.
0552      *
0553      *  Use <tt>#AI_CONFIG_PP_DB_THRESHOLD</tt> to control this.
0554      *  Use <tt>#AI_CONFIG_PP_DB_ALL_OR_NONE</tt> if you want bones removed if and
0555      *  only if all bones within the scene qualify for removal.
0556     */
0557     aiProcess_Debone  = 0x4000000,
0558 
0559 
0560 
0561     // -------------------------------------------------------------------------
0562     /** <hr>This step will perform a global scale of the model.
0563     *
0564     *  Some importers are providing a mechanism to define a scaling unit for the
0565     *  model. This post processing step can be used to do so. You need to get the
0566     *  global scaling from your importer settings like in FBX. Use the flag
0567     *  AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table to configure this.
0568     *
0569     *  Use <tt>#AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY</tt> to setup the global scaling factor.
0570     */
0571     aiProcess_GlobalScale = 0x8000000,
0572 
0573     // -------------------------------------------------------------------------
0574     /** <hr>A postprocessing step to embed of textures.
0575      *
0576      *  This will remove external data dependencies for textures.
0577      *  If a texture's file does not exist at the specified path
0578      *  (due, for instance, to an absolute path generated on another system),
0579      *  it will check if a file with the same name exists at the root folder
0580      *  of the imported model. And if so, it uses that.
0581      */
0582     aiProcess_EmbedTextures  = 0x10000000,
0583 
0584     // aiProcess_GenEntityMeshes = 0x100000,
0585     // aiProcess_OptimizeAnimations = 0x200000
0586     // aiProcess_FixTexturePaths = 0x200000
0587 
0588 
0589     aiProcess_ForceGenNormals = 0x20000000,
0590 
0591     // -------------------------------------------------------------------------
0592     /** <hr>Drops normals for all faces of all meshes.
0593      *
0594      * This is ignored if no normals are present.
0595      * Face normals are shared between all points of a single face,
0596      * so a single point can have multiple normals, which
0597      * forces the library to duplicate vertices in some cases.
0598      * #aiProcess_JoinIdenticalVertices is *senseless* then.
0599      * This process gives sense back to aiProcess_JoinIdenticalVertices
0600      */
0601     aiProcess_DropNormals = 0x40000000,
0602 
0603     // -------------------------------------------------------------------------
0604     /**
0605      */
0606     aiProcess_GenBoundingBoxes = 0x80000000
0607 };
0608 
0609 
0610 // ---------------------------------------------------------------------------------------
0611 /** @def aiProcess_ConvertToLeftHanded
0612  *  @brief Shortcut flag for Direct3D-based applications.
0613  *
0614  *  Supersedes the #aiProcess_MakeLeftHanded and #aiProcess_FlipUVs and
0615  *  #aiProcess_FlipWindingOrder flags.
0616  *  The output data matches Direct3D's conventions: left-handed geometry, upper-left
0617  *  origin for UV coordinates and finally clockwise face order, suitable for CCW culling.
0618  *
0619  *  @deprecated
0620  */
0621 #define aiProcess_ConvertToLeftHanded ( \
0622     aiProcess_MakeLeftHanded     | \
0623     aiProcess_FlipUVs            | \
0624     aiProcess_FlipWindingOrder   | \
0625     0 )
0626 
0627 
0628 // ---------------------------------------------------------------------------------------
0629 /** @def aiProcessPreset_TargetRealtime_Fast
0630  *  @brief Default postprocess configuration optimizing the data for real-time rendering.
0631  *
0632  *  Applications would want to use this preset to load models on end-user PCs,
0633  *  maybe for direct use in game.
0634  *
0635  * If you're using DirectX, don't forget to combine this value with
0636  * the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations
0637  * in your application apply the #aiProcess_TransformUVCoords step, too.
0638  *  @note Please take the time to read the docs for the steps enabled by this preset.
0639  *  Some of them offer further configurable properties, while some of them might not be of
0640  *  use for you so it might be better to not specify them.
0641  */
0642 #define aiProcessPreset_TargetRealtime_Fast ( \
0643     aiProcess_CalcTangentSpace      |  \
0644     aiProcess_GenNormals            |  \
0645     aiProcess_JoinIdenticalVertices |  \
0646     aiProcess_Triangulate           |  \
0647     aiProcess_GenUVCoords           |  \
0648     aiProcess_SortByPType           |  \
0649     0 )
0650 
0651  // ---------------------------------------------------------------------------------------
0652  /** @def aiProcessPreset_TargetRealtime_Quality
0653   *  @brief Default postprocess configuration optimizing the data for real-time rendering.
0654   *
0655   *  Unlike #aiProcessPreset_TargetRealtime_Fast, this configuration
0656   *  performs some extra optimizations to improve rendering speed and
0657   *  to minimize memory usage. It could be a good choice for a level editor
0658   *  environment where import speed is not so important.
0659   *
0660   *  If you're using DirectX, don't forget to combine this value with
0661   *  the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations
0662   *  in your application apply the #aiProcess_TransformUVCoords step, too.
0663   *  @note Please take the time to read the docs for the steps enabled by this preset.
0664   *  Some of them offer further configurable properties, while some of them might not be
0665   *  of use for you so it might be better to not specify them.
0666   */
0667 #define aiProcessPreset_TargetRealtime_Quality ( \
0668     aiProcess_CalcTangentSpace              |  \
0669     aiProcess_GenSmoothNormals              |  \
0670     aiProcess_JoinIdenticalVertices         |  \
0671     aiProcess_ImproveCacheLocality          |  \
0672     aiProcess_LimitBoneWeights              |  \
0673     aiProcess_RemoveRedundantMaterials      |  \
0674     aiProcess_SplitLargeMeshes              |  \
0675     aiProcess_Triangulate                   |  \
0676     aiProcess_GenUVCoords                   |  \
0677     aiProcess_SortByPType                   |  \
0678     aiProcess_FindDegenerates               |  \
0679     aiProcess_FindInvalidData               |  \
0680     0 )
0681 
0682  // ---------------------------------------------------------------------------------------
0683  /** @def aiProcessPreset_TargetRealtime_MaxQuality
0684   *  @brief Default postprocess configuration optimizing the data for real-time rendering.
0685   *
0686   *  This preset enables almost every optimization step to achieve perfectly
0687   *  optimized data. It's your choice for level editor environments where import speed
0688   *  is not important.
0689   *
0690   *  If you're using DirectX, don't forget to combine this value with
0691   *  the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations
0692   *  in your application, apply the #aiProcess_TransformUVCoords step, too.
0693   *  @note Please take the time to read the docs for the steps enabled by this preset.
0694   *  Some of them offer further configurable properties, while some of them might not be
0695   *  of use for you so it might be better to not specify them.
0696   */
0697 #define aiProcessPreset_TargetRealtime_MaxQuality ( \
0698     aiProcessPreset_TargetRealtime_Quality   |  \
0699     aiProcess_FindInstances                  |  \
0700     aiProcess_ValidateDataStructure          |  \
0701     aiProcess_OptimizeMeshes                 |  \
0702     0 )
0703 
0704 
0705 #ifdef __cplusplus
0706 } // end of extern "C"
0707 #endif
0708 
0709 #endif // AI_POSTPROCESS_H_INC