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