nuclear@0: /* nuclear@0: Open Asset Import Library (assimp) nuclear@0: ---------------------------------------------------------------------- nuclear@0: nuclear@0: Copyright (c) 2006-2018, assimp team nuclear@0: nuclear@0: nuclear@0: All rights reserved. nuclear@0: nuclear@0: Redistribution and use of this software in source and binary forms, nuclear@0: with or without modification, are permitted provided that the nuclear@0: following conditions are met: nuclear@0: nuclear@0: * Redistributions of source code must retain the above nuclear@0: copyright notice, this list of conditions and the nuclear@0: following disclaimer. nuclear@0: nuclear@0: * Redistributions in binary form must reproduce the above nuclear@0: copyright notice, this list of conditions and the nuclear@0: following disclaimer in the documentation and/or other nuclear@0: materials provided with the distribution. nuclear@0: nuclear@0: * Neither the name of the assimp team, nor the names of its nuclear@0: contributors may be used to endorse or promote products nuclear@0: derived from this software without specific prior nuclear@0: written permission of the assimp team. nuclear@0: nuclear@0: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS nuclear@0: "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT nuclear@0: LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR nuclear@0: A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT nuclear@0: OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, nuclear@0: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT nuclear@0: LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, nuclear@0: DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY nuclear@0: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT nuclear@0: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE nuclear@0: OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. nuclear@0: nuclear@0: ---------------------------------------------------------------------- nuclear@0: */ nuclear@0: nuclear@0: /** @file postprocess.h nuclear@0: * @brief Definitions for import post processing steps nuclear@0: */ nuclear@0: #pragma once nuclear@0: #ifndef AI_POSTPROCESS_H_INC nuclear@0: #define AI_POSTPROCESS_H_INC nuclear@0: nuclear@0: #include "types.h" nuclear@0: nuclear@0: #ifdef __cplusplus nuclear@0: extern "C" { nuclear@0: #endif nuclear@0: nuclear@0: // ----------------------------------------------------------------------------------- nuclear@0: /** @enum aiPostProcessSteps nuclear@0: * @brief Defines the flags for all possible post processing steps. nuclear@0: * nuclear@0: * @note Some steps are influenced by properties set on the Assimp::Importer itself nuclear@0: * nuclear@0: * @see Assimp::Importer::ReadFile() nuclear@0: * @see Assimp::Importer::SetPropertyInteger() nuclear@0: * @see aiImportFile nuclear@0: * @see aiImportFileEx nuclear@0: */ nuclear@0: // ----------------------------------------------------------------------------------- nuclear@0: enum aiPostProcessSteps nuclear@0: { nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
Calculates the tangents and bitangents for the imported meshes. nuclear@0: * nuclear@0: * Does nothing if a mesh does not have normals. You might want this post nuclear@0: * processing step to be executed if you plan to use tangent space calculations nuclear@0: * such as normal mapping applied to the meshes. There's an importer property, nuclear@0: * #AI_CONFIG_PP_CT_MAX_SMOOTHING_ANGLE, which allows you to specify nuclear@0: * a maximum smoothing angle for the algorithm. However, usually you'll nuclear@0: * want to leave it at the default value. nuclear@0: */ nuclear@0: aiProcess_CalcTangentSpace = 0x1, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
Identifies and joins identical vertex data sets within all nuclear@0: * imported meshes. nuclear@0: * nuclear@0: * After this step is run, each mesh contains unique vertices, nuclear@0: * so a vertex may be used by multiple faces. You usually want nuclear@0: * to use this post processing step. If your application deals with nuclear@0: * indexed geometry, this step is compulsory or you'll just waste rendering nuclear@0: * time. If this flag is not specified, no vertices are referenced by nuclear@0: * more than one face and no index buffer is required for rendering. nuclear@0: */ nuclear@0: aiProcess_JoinIdenticalVertices = 0x2, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
Converts all the imported data to a left-handed coordinate space. nuclear@0: * nuclear@0: * By default the data is returned in a right-handed coordinate space (which nuclear@0: * OpenGL prefers). In this space, +X points to the right, nuclear@0: * +Z points towards the viewer, and +Y points upwards. In the DirectX nuclear@0: * coordinate space +X points to the right, +Y points upwards, and +Z points nuclear@0: * away from the viewer. nuclear@0: * nuclear@0: * You'll probably want to consider this flag if you use Direct3D for nuclear@0: * rendering. The #aiProcess_ConvertToLeftHanded flag supersedes this nuclear@0: * setting and bundles all conversions typically required for D3D-based nuclear@0: * applications. nuclear@0: */ nuclear@0: aiProcess_MakeLeftHanded = 0x4, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
Triangulates all faces of all meshes. nuclear@0: * nuclear@0: * By default the imported mesh data might contain faces with more than 3 nuclear@0: * indices. For rendering you'll usually want all faces to be triangles. nuclear@0: * This post processing step splits up faces with more than 3 indices into nuclear@0: * triangles. Line and point primitives are *not* modified! If you want nuclear@0: * 'triangles only' with no other kinds of primitives, try the following nuclear@0: * solution: nuclear@0: * nuclear@0: */ nuclear@0: aiProcess_Triangulate = 0x8, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
Removes some parts of the data structure (animations, materials, nuclear@0: * light sources, cameras, textures, vertex components). nuclear@0: * nuclear@0: * The components to be removed are specified in a separate nuclear@0: * importer property, #AI_CONFIG_PP_RVC_FLAGS. This is quite useful nuclear@0: * if you don't need all parts of the output structure. Vertex colors nuclear@0: * are rarely used today for example... Calling this step to remove unneeded nuclear@0: * data from the pipeline as early as possible results in increased nuclear@0: * performance and a more optimized output data structure. nuclear@0: * This step is also useful if you want to force Assimp to recompute nuclear@0: * normals or tangents. The corresponding steps don't recompute them if nuclear@0: * they're already there (loaded from the source asset). By using this nuclear@0: * step you can make sure they are NOT there. nuclear@0: * nuclear@0: * This flag is a poor one, mainly because its purpose is usually nuclear@0: * misunderstood. Consider the following case: a 3D model has been exported nuclear@0: * from a CAD app, and it has per-face vertex colors. Vertex positions can't be nuclear@0: * shared, thus the #aiProcess_JoinIdenticalVertices step fails to nuclear@0: * optimize the data because of these nasty little vertex colors. nuclear@0: * Most apps don't even process them, so it's all for nothing. By using nuclear@0: * this step, unneeded components are excluded as early as possible nuclear@0: * thus opening more room for internal optimizations. nuclear@0: */ nuclear@0: aiProcess_RemoveComponent = 0x10, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
Generates normals for all faces of all meshes. nuclear@0: * nuclear@0: * This is ignored if normals are already there at the time this flag nuclear@0: * is evaluated. Model importers try to load them from the source file, so nuclear@0: * they're usually already there. Face normals are shared between all points nuclear@0: * of a single face, so a single point can have multiple normals, which nuclear@0: * forces the library to duplicate vertices in some cases. nuclear@0: * #aiProcess_JoinIdenticalVertices is *senseless* then. nuclear@0: * nuclear@0: * This flag may not be specified together with #aiProcess_GenSmoothNormals. nuclear@0: */ nuclear@0: aiProcess_GenNormals = 0x20, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
Generates smooth normals for all vertices in the mesh. nuclear@0: * nuclear@0: * This is ignored if normals are already there at the time this flag nuclear@0: * is evaluated. Model importers try to load them from the source file, so nuclear@0: * they're usually already there. nuclear@0: * nuclear@0: * This flag may not be specified together with nuclear@0: * #aiProcess_GenNormals. There's a importer property, nuclear@0: * #AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE which allows you to specify nuclear@0: * an angle maximum for the normal smoothing algorithm. Normals exceeding nuclear@0: * this limit are not smoothed, resulting in a 'hard' seam between two faces. nuclear@0: * Using a decent angle here (e.g. 80 degrees) results in very good visual nuclear@0: * appearance. nuclear@0: */ nuclear@0: aiProcess_GenSmoothNormals = 0x40, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
Splits large meshes into smaller sub-meshes. nuclear@0: * nuclear@0: * This is quite useful for real-time rendering, where the number of triangles nuclear@0: * which can be maximally processed in a single draw-call is limited nuclear@0: * by the video driver/hardware. The maximum vertex buffer is usually limited nuclear@0: * too. Both requirements can be met with this step: you may specify both a nuclear@0: * triangle and vertex limit for a single mesh. nuclear@0: * nuclear@0: * The split limits can (and should!) be set through the nuclear@0: * #AI_CONFIG_PP_SLM_VERTEX_LIMIT and #AI_CONFIG_PP_SLM_TRIANGLE_LIMIT nuclear@0: * importer properties. The default values are #AI_SLM_DEFAULT_MAX_VERTICES and nuclear@0: * #AI_SLM_DEFAULT_MAX_TRIANGLES. nuclear@0: * nuclear@0: * Note that splitting is generally a time-consuming task, but only if there's nuclear@0: * something to split. The use of this step is recommended for most users. nuclear@0: */ nuclear@0: aiProcess_SplitLargeMeshes = 0x80, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
Removes the node graph and pre-transforms all vertices with nuclear@0: * the local transformation matrices of their nodes. nuclear@0: * nuclear@0: * The output scene still contains nodes, however there is only a nuclear@0: * root node with children, each one referencing only one mesh, nuclear@0: * and each mesh referencing one material. For rendering, you can nuclear@0: * simply render all meshes in order - you don't need to pay nuclear@0: * attention to local transformations and the node hierarchy. nuclear@0: * Animations are removed during this step. nuclear@0: * This step is intended for applications without a scenegraph. nuclear@0: * The step CAN cause some problems: if e.g. a mesh of the asset nuclear@0: * contains normals and another, using the same material index, does not, nuclear@0: * they will be brought together, but the first meshes's part of nuclear@0: * the normal list is zeroed. However, these artifacts are rare. nuclear@0: * @note The #AI_CONFIG_PP_PTV_NORMALIZE configuration property nuclear@0: * can be set to normalize the scene's spatial dimension to the -1...1 nuclear@0: * range. nuclear@0: */ nuclear@0: aiProcess_PreTransformVertices = 0x100, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
Limits the number of bones simultaneously affecting a single vertex nuclear@0: * to a maximum value. nuclear@0: * nuclear@0: * If any vertex is affected by more than the maximum number of bones, the least nuclear@0: * important vertex weights are removed and the remaining vertex weights are nuclear@0: * renormalized so that the weights still sum up to 1. nuclear@0: * The default bone weight limit is 4 (defined as #AI_LMW_MAX_WEIGHTS in nuclear@0: * config.h), but you can use the #AI_CONFIG_PP_LBW_MAX_WEIGHTS importer nuclear@0: * property to supply your own limit to the post processing step. nuclear@0: * nuclear@0: * If you intend to perform the skinning in hardware, this post processing nuclear@0: * step might be of interest to you. nuclear@0: */ nuclear@0: aiProcess_LimitBoneWeights = 0x200, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
Validates the imported scene data structure. nuclear@0: * This makes sure that all indices are valid, all animations and nuclear@0: * bones are linked correctly, all material references are correct .. etc. nuclear@0: * nuclear@0: * It is recommended that you capture Assimp's log output if you use this flag, nuclear@0: * so you can easily find out what's wrong if a file fails the nuclear@0: * validation. The validator is quite strict and will find *all* nuclear@0: * inconsistencies in the data structure... It is recommended that plugin nuclear@0: * developers use it to debug their loaders. There are two types of nuclear@0: * validation failures: nuclear@0: * nuclear@0: * nuclear@0: * This post-processing step is not time-consuming. Its use is not nuclear@0: * compulsory, but recommended. nuclear@0: */ nuclear@0: aiProcess_ValidateDataStructure = 0x400, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
Reorders triangles for better vertex cache locality. nuclear@0: * nuclear@0: * The step tries to improve the ACMR (average post-transform vertex cache nuclear@0: * miss ratio) for all meshes. The implementation runs in O(n) and is nuclear@0: * roughly based on the 'tipsify' algorithm (see this nuclear@0: * paper). nuclear@0: * nuclear@0: * If you intend to render huge models in hardware, this step might nuclear@0: * be of interest to you. The #AI_CONFIG_PP_ICL_PTCACHE_SIZE nuclear@0: * importer property can be used to fine-tune the cache optimization. nuclear@0: */ nuclear@0: aiProcess_ImproveCacheLocality = 0x800, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
Searches for redundant/unreferenced materials and removes them. nuclear@0: * nuclear@0: * This is especially useful in combination with the nuclear@0: * #aiProcess_PreTransformVertices and #aiProcess_OptimizeMeshes flags. nuclear@0: * Both join small meshes with equal characteristics, but they can't do nuclear@0: * their work if two meshes have different materials. Because several nuclear@0: * material settings are lost during Assimp's import filters, nuclear@0: * (and because many exporters don't check for redundant materials), huge nuclear@0: * models often have materials which are are defined several times with nuclear@0: * exactly the same settings. nuclear@0: * nuclear@0: * Several material settings not contributing to the final appearance of nuclear@0: * a surface are ignored in all comparisons (e.g. the material name). nuclear@0: * So, if you're passing additional information through the nuclear@0: * content pipeline (probably using *magic* material names), don't nuclear@0: * specify this flag. Alternatively take a look at the nuclear@0: * #AI_CONFIG_PP_RRM_EXCLUDE_LIST importer property. nuclear@0: */ nuclear@0: aiProcess_RemoveRedundantMaterials = 0x1000, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
This step tries to determine which meshes have normal vectors nuclear@0: * that are facing inwards and inverts them. nuclear@0: * nuclear@0: * The algorithm is simple but effective: nuclear@0: * the bounding box of all vertices + their normals is compared against nuclear@0: * the volume of the bounding box of all vertices without their normals. nuclear@0: * This works well for most objects, problems might occur with planar nuclear@0: * surfaces. However, the step tries to filter such cases. nuclear@0: * The step inverts all in-facing normals. Generally it is recommended nuclear@0: * to enable this step, although the result is not always correct. nuclear@0: */ nuclear@0: aiProcess_FixInfacingNormals = 0x2000, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
This step splits meshes with more than one primitive type in nuclear@0: * homogeneous sub-meshes. nuclear@0: * nuclear@0: * The step is executed after the triangulation step. After the step nuclear@0: * returns, just one bit is set in aiMesh::mPrimitiveTypes. This is nuclear@0: * especially useful for real-time rendering where point and line nuclear@0: * primitives are often ignored or rendered separately. nuclear@0: * You can use the #AI_CONFIG_PP_SBP_REMOVE importer property to nuclear@0: * specify which primitive types you need. This can be used to easily nuclear@0: * exclude lines and points, which are rarely used, from the import. nuclear@0: */ nuclear@0: aiProcess_SortByPType = 0x8000, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
This step searches all meshes for degenerate primitives and nuclear@0: * converts them to proper lines or points. nuclear@0: * nuclear@0: * A face is 'degenerate' if one or more of its points are identical. nuclear@0: * To have the degenerate stuff not only detected and collapsed but nuclear@0: * removed, try one of the following procedures: nuclear@0: *
1. (if you support lines and points for rendering but don't nuclear@0: * want the degenerates)
nuclear@0: * nuclear@0: *
2.(if you don't support lines and points at all)
nuclear@0: * nuclear@0: * nuclear@0: * This step also removes very small triangles with a surface area smaller nuclear@0: * than 10^-6. If you rely on having these small triangles, or notice holes nuclear@0: * in your model, set the property #AI_CONFIG_PP_FD_CHECKAREA to nuclear@0: * false. nuclear@0: * @note Degenerate polygons are not necessarily evil and that's why nuclear@0: * they're not removed by default. There are several file formats which nuclear@0: * don't support lines or points, and some exporters bypass the nuclear@0: * format specification and write them as degenerate triangles instead. nuclear@0: */ nuclear@0: aiProcess_FindDegenerates = 0x10000, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
This step searches all meshes for invalid data, such as zeroed nuclear@0: * normal vectors or invalid UV coords and removes/fixes them. This is nuclear@0: * intended to get rid of some common exporter errors. nuclear@0: * nuclear@0: * This is especially useful for normals. If they are invalid, and nuclear@0: * the step recognizes this, they will be removed and can later nuclear@0: * be recomputed, i.e. by the #aiProcess_GenSmoothNormals flag.
nuclear@0: * The step will also remove meshes that are infinitely small and reduce nuclear@0: * animation tracks consisting of hundreds if redundant keys to a single nuclear@0: * key. The AI_CONFIG_PP_FID_ANIM_ACCURACY config property decides nuclear@0: * the accuracy of the check for duplicate animation tracks. nuclear@0: */ nuclear@0: aiProcess_FindInvalidData = 0x20000, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
This step converts non-UV mappings (such as spherical or nuclear@0: * cylindrical mapping) to proper texture coordinate channels. nuclear@0: * nuclear@0: * Most applications will support UV mapping only, so you will nuclear@0: * probably want to specify this step in every case. Note that Assimp is not nuclear@0: * always able to match the original mapping implementation of the nuclear@0: * 3D app which produced a model perfectly. It's always better to let the nuclear@0: * modelling app compute the UV channels - 3ds max, Maya, Blender, nuclear@0: * LightWave, and Modo do this for example. nuclear@0: * nuclear@0: * @note If this step is not requested, you'll need to process the nuclear@0: * #AI_MATKEY_MAPPING material property in order to display all assets nuclear@0: * properly. nuclear@0: */ nuclear@0: aiProcess_GenUVCoords = 0x40000, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
This step applies per-texture UV transformations and bakes nuclear@0: * them into stand-alone vtexture coordinate channels. nuclear@0: * nuclear@0: * UV transformations are specified per-texture - see the nuclear@0: * #AI_MATKEY_UVTRANSFORM material key for more information. nuclear@0: * This step processes all textures with nuclear@0: * transformed input UV coordinates and generates a new (pre-transformed) UV channel nuclear@0: * which replaces the old channel. Most applications won't support UV nuclear@0: * transformations, so you will probably want to specify this step. nuclear@0: * nuclear@0: * @note UV transformations are usually implemented in real-time apps by nuclear@0: * transforming texture coordinates at vertex shader stage with a 3x3 nuclear@0: * (homogenous) transformation matrix. nuclear@0: */ nuclear@0: aiProcess_TransformUVCoords = 0x80000, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
This step searches for duplicate meshes and replaces them nuclear@0: * with references to the first mesh. nuclear@0: * nuclear@0: * This step takes a while, so don't use it if speed is a concern. nuclear@0: * Its main purpose is to workaround the fact that many export nuclear@0: * file formats don't support instanced meshes, so exporters need to nuclear@0: * duplicate meshes. This step removes the duplicates again. Please nuclear@0: * note that Assimp does not currently support per-node material nuclear@0: * assignment to meshes, which means that identical meshes with nuclear@0: * different materials are currently *not* joined, although this is nuclear@0: * planned for future versions. nuclear@0: */ nuclear@0: aiProcess_FindInstances = 0x100000, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
A postprocessing step to reduce the number of meshes. nuclear@0: * nuclear@0: * This will, in fact, reduce the number of draw calls. nuclear@0: * nuclear@0: * This is a very effective optimization and is recommended to be used nuclear@0: * together with #aiProcess_OptimizeGraph, if possible. The flag is fully nuclear@0: * compatible with both #aiProcess_SplitLargeMeshes and #aiProcess_SortByPType. nuclear@0: */ nuclear@0: aiProcess_OptimizeMeshes = 0x200000, nuclear@0: nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
A postprocessing step to optimize the scene hierarchy. nuclear@0: * nuclear@0: * Nodes without animations, bones, lights or cameras assigned are nuclear@0: * collapsed and joined. nuclear@0: * nuclear@0: * Node names can be lost during this step. If you use special 'tag nodes' nuclear@0: * to pass additional information through your content pipeline, use the nuclear@0: * #AI_CONFIG_PP_OG_EXCLUDE_LIST importer property to specify a nuclear@0: * list of node names you want to be kept. Nodes matching one of the names nuclear@0: * in this list won't be touched or modified. nuclear@0: * nuclear@0: * Use this flag with caution. Most simple files will be collapsed to a nuclear@0: * single node, so complex hierarchies are usually completely lost. This is not nuclear@0: * useful for editor environments, but probably a very effective nuclear@0: * optimization if you just want to get the model data, convert it to your nuclear@0: * own format, and render it as fast as possible. nuclear@0: * nuclear@0: * This flag is designed to be used with #aiProcess_OptimizeMeshes for best nuclear@0: * results. nuclear@0: * nuclear@0: * @note 'Crappy' scenes with thousands of extremely small meshes packed nuclear@0: * in deeply nested nodes exist for almost all file formats. nuclear@0: * #aiProcess_OptimizeMeshes in combination with #aiProcess_OptimizeGraph nuclear@0: * usually fixes them all and makes them renderable. nuclear@0: */ nuclear@0: aiProcess_OptimizeGraph = 0x400000, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
This step flips all UV coordinates along the y-axis and adjusts nuclear@0: * material settings and bitangents accordingly. nuclear@0: * nuclear@0: * Output UV coordinate system: nuclear@0: * @code nuclear@0: * 0y|0y ---------- 1x|0y nuclear@0: * | | nuclear@0: * | | nuclear@0: * | | nuclear@0: * 0x|1y ---------- 1x|1y nuclear@0: * @endcode nuclear@0: * nuclear@0: * You'll probably want to consider this flag if you use Direct3D for nuclear@0: * rendering. The #aiProcess_ConvertToLeftHanded flag supersedes this nuclear@0: * setting and bundles all conversions typically required for D3D-based nuclear@0: * applications. nuclear@0: */ nuclear@0: aiProcess_FlipUVs = 0x800000, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
This step adjusts the output face winding order to be CW. nuclear@0: * nuclear@0: * The default face winding order is counter clockwise (CCW). nuclear@0: * nuclear@0: * Output face order: nuclear@0: * @code nuclear@0: * x2 nuclear@0: * nuclear@0: * x0 nuclear@0: * x1 nuclear@0: * @endcode nuclear@0: */ nuclear@0: aiProcess_FlipWindingOrder = 0x1000000, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
This step splits meshes with many bones into sub-meshes so that each nuclear@0: * su-bmesh has fewer or as many bones as a given limit. nuclear@0: */ nuclear@0: aiProcess_SplitByBoneCount = 0x2000000, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
This step removes bones losslessly or according to some threshold. nuclear@0: * nuclear@0: * In some cases (i.e. formats that require it) exporters are forced to nuclear@0: * assign dummy bone weights to otherwise static meshes assigned to nuclear@0: * animated meshes. Full, weight-based skinning is expensive while nuclear@0: * animating nodes is extremely cheap, so this step is offered to clean up nuclear@0: * the data in that regard. nuclear@0: * nuclear@0: * Use #AI_CONFIG_PP_DB_THRESHOLD to control this. nuclear@0: * Use #AI_CONFIG_PP_DB_ALL_OR_NONE if you want bones removed if and nuclear@0: * only if all bones within the scene qualify for removal. nuclear@0: */ nuclear@0: aiProcess_Debone = 0x4000000, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
This step will perform a global scale of the model. nuclear@0: * nuclear@0: * Some importers are providing a mechanism to define a scaling unit for the nuclear@0: * model. This post processing step can be used to do so. You need to get the nuclear@0: * global scaling from your importer settings like in FBX. Use the flag nuclear@0: * AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY from the global property table to configure this. nuclear@0: * nuclear@0: * Use #AI_CONFIG_GLOBAL_SCALE_FACTOR_KEY to setup the global scaing factor. nuclear@0: */ nuclear@0: aiProcess_GlobalScale = 0x8000000, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
A postprocessing step to embed of textures. nuclear@0: * nuclear@0: * This will remove external data dependencies for textures. nuclear@0: * If a texture's file does not exist at the specified path nuclear@0: * (due, for instance, to an absolute path generated on another system), nuclear@0: * it will check if a file with the same name exists at the root folder nuclear@0: * of the imported model. And if so, it uses that. nuclear@0: */ nuclear@0: aiProcess_EmbedTextures = 0x10000000, nuclear@0: nuclear@0: // aiProcess_GenEntityMeshes = 0x100000, nuclear@0: // aiProcess_OptimizeAnimations = 0x200000 nuclear@0: // aiProcess_FixTexturePaths = 0x200000 nuclear@0: nuclear@0: nuclear@0: aiProcess_ForceGenNormals = 0x20000000, nuclear@0: nuclear@0: // ------------------------------------------------------------------------- nuclear@0: /**
Drops normals for all faces of all meshes. nuclear@0: * nuclear@0: * This is ignored if no normals are present. nuclear@0: * Face normals are shared between all points of a single face, nuclear@0: * so a single point can have multiple normals, which nuclear@0: * forces the library to duplicate vertices in some cases. nuclear@0: * #aiProcess_JoinIdenticalVertices is *senseless* then. nuclear@0: * This process gives sense back to aiProcess_JoinIdenticalVertices nuclear@0: */ nuclear@0: aiProcess_DropNormals = 0x40000000, nuclear@0: }; nuclear@0: nuclear@0: nuclear@0: // --------------------------------------------------------------------------------------- nuclear@0: /** @def aiProcess_ConvertToLeftHanded nuclear@0: * @brief Shortcut flag for Direct3D-based applications. nuclear@0: * nuclear@0: * Supersedes the #aiProcess_MakeLeftHanded and #aiProcess_FlipUVs and nuclear@0: * #aiProcess_FlipWindingOrder flags. nuclear@0: * The output data matches Direct3D's conventions: left-handed geometry, upper-left nuclear@0: * origin for UV coordinates and finally clockwise face order, suitable for CCW culling. nuclear@0: * nuclear@0: * @deprecated nuclear@0: */ nuclear@0: #define aiProcess_ConvertToLeftHanded ( \ nuclear@0: aiProcess_MakeLeftHanded | \ nuclear@0: aiProcess_FlipUVs | \ nuclear@0: aiProcess_FlipWindingOrder | \ nuclear@0: 0 ) nuclear@0: nuclear@0: nuclear@0: // --------------------------------------------------------------------------------------- nuclear@0: /** @def aiProcessPreset_TargetRealtime_Fast nuclear@0: * @brief Default postprocess configuration optimizing the data for real-time rendering. nuclear@0: * nuclear@0: * Applications would want to use this preset to load models on end-user PCs, nuclear@0: * maybe for direct use in game. nuclear@0: * nuclear@0: * If you're using DirectX, don't forget to combine this value with nuclear@0: * the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations nuclear@0: * in your application apply the #aiProcess_TransformUVCoords step, too. nuclear@0: * @note Please take the time to read the docs for the steps enabled by this preset. nuclear@0: * Some of them offer further configurable properties, while some of them might not be of nuclear@0: * use for you so it might be better to not specify them. nuclear@0: */ nuclear@0: #define aiProcessPreset_TargetRealtime_Fast ( \ nuclear@0: aiProcess_CalcTangentSpace | \ nuclear@0: aiProcess_GenNormals | \ nuclear@0: aiProcess_JoinIdenticalVertices | \ nuclear@0: aiProcess_Triangulate | \ nuclear@0: aiProcess_GenUVCoords | \ nuclear@0: aiProcess_SortByPType | \ nuclear@0: 0 ) nuclear@0: nuclear@0: // --------------------------------------------------------------------------------------- nuclear@0: /** @def aiProcessPreset_TargetRealtime_Quality nuclear@0: * @brief Default postprocess configuration optimizing the data for real-time rendering. nuclear@0: * nuclear@0: * Unlike #aiProcessPreset_TargetRealtime_Fast, this configuration nuclear@0: * performs some extra optimizations to improve rendering speed and nuclear@0: * to minimize memory usage. It could be a good choice for a level editor nuclear@0: * environment where import speed is not so important. nuclear@0: * nuclear@0: * If you're using DirectX, don't forget to combine this value with nuclear@0: * the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations nuclear@0: * in your application apply the #aiProcess_TransformUVCoords step, too. nuclear@0: * @note Please take the time to read the docs for the steps enabled by this preset. nuclear@0: * Some of them offer further configurable properties, while some of them might not be nuclear@0: * of use for you so it might be better to not specify them. nuclear@0: */ nuclear@0: #define aiProcessPreset_TargetRealtime_Quality ( \ nuclear@0: aiProcess_CalcTangentSpace | \ nuclear@0: aiProcess_GenSmoothNormals | \ nuclear@0: aiProcess_JoinIdenticalVertices | \ nuclear@0: aiProcess_ImproveCacheLocality | \ nuclear@0: aiProcess_LimitBoneWeights | \ nuclear@0: aiProcess_RemoveRedundantMaterials | \ nuclear@0: aiProcess_SplitLargeMeshes | \ nuclear@0: aiProcess_Triangulate | \ nuclear@0: aiProcess_GenUVCoords | \ nuclear@0: aiProcess_SortByPType | \ nuclear@0: aiProcess_FindDegenerates | \ nuclear@0: aiProcess_FindInvalidData | \ nuclear@0: 0 ) nuclear@0: nuclear@0: // --------------------------------------------------------------------------------------- nuclear@0: /** @def aiProcessPreset_TargetRealtime_MaxQuality nuclear@0: * @brief Default postprocess configuration optimizing the data for real-time rendering. nuclear@0: * nuclear@0: * This preset enables almost every optimization step to achieve perfectly nuclear@0: * optimized data. It's your choice for level editor environments where import speed nuclear@0: * is not important. nuclear@0: * nuclear@0: * If you're using DirectX, don't forget to combine this value with nuclear@0: * the #aiProcess_ConvertToLeftHanded step. If you don't support UV transformations nuclear@0: * in your application, apply the #aiProcess_TransformUVCoords step, too. nuclear@0: * @note Please take the time to read the docs for the steps enabled by this preset. nuclear@0: * Some of them offer further configurable properties, while some of them might not be nuclear@0: * of use for you so it might be better to not specify them. nuclear@0: */ nuclear@0: #define aiProcessPreset_TargetRealtime_MaxQuality ( \ nuclear@0: aiProcessPreset_TargetRealtime_Quality | \ nuclear@0: aiProcess_FindInstances | \ nuclear@0: aiProcess_ValidateDataStructure | \ nuclear@0: aiProcess_OptimizeMeshes | \ nuclear@0: 0 ) nuclear@0: nuclear@0: nuclear@0: #ifdef __cplusplus nuclear@0: } // end of extern "C" nuclear@0: #endif nuclear@0: nuclear@0: #endif // AI_POSTPROCESS_H_INC