From fe1c9ec3d09ce10d91cee876f5d947c1ffd55699 Mon Sep 17 00:00:00 2001 From: klickverbot Date: Sun, 4 Oct 2009 15:09:55 +0000 Subject: [PATCH] Synchronized D bindings with the latest C header. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@489 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- port/dAssimp/assimp/config.d | 45 ++++++++++++++++++++++++++++--- port/dAssimp/assimp/fileIO.d | 8 +++--- port/dAssimp/assimp/postprocess.d | 19 +++++++++---- 3 files changed, 59 insertions(+), 13 deletions(-) diff --git a/port/dAssimp/assimp/config.d b/port/dAssimp/assimp/config.d index b9e26e732..f20106ca7 100644 --- a/port/dAssimp/assimp/config.d +++ b/port/dAssimp/assimp/config.d @@ -131,11 +131,11 @@ extern ( C ) { /** * Configures the PretransformVertices step to keep the scene * hierarchy. Meshes are moved to worldspace, but no optimization is - * performed (means: meshes are not joined. The total number of meshes won't - * change). + * performed (meshes with equal materials are not joined, the total number + * of meshes will not change). * * This option could be of use for you if the scene hierarchy contains - * important additional information which you want to interpret. + * important additional information which you intend to parse. * For rendering, you can still render all meshes in the scene without * any transformations. * @@ -145,6 +145,17 @@ extern ( C ) { */ const char* AI_CONFIG_PP_PTV_KEEP_HIERARCHY = "PP_PTV_KEEP_HIERARCHY"; + /** + * Configures the PretransformVertices step to normalize all + * vertex components into the -1...1 range. That is, a bounding box for the + * whole scene is computed, the maximum component is taken and all meshes + * are scaled appropriately (uniformly of course!). + * + * This might be useful if you don't know the spatial dimension of the input + * data. + */ + const char* AI_CONFIG_PP_PTV_NORMALIZE = "PP_PTV_NORMALIZE"; + /** * Configures the FindDegenerates step to remove degenerated * primitives from the import – immediately. @@ -380,6 +391,21 @@ extern ( C ) { */ const char* AI_CONFIG_PP_SBP_REMOVE = "PP_SBP_REMOVE"; + /** + * Input parameter to the FindInvalidData step: + * Specifies the floating-point accuracy for animation values. + * + * The step checks for animation tracks where all frame values are + * absolutely equal and removes them. This tweakable controls the epsilon + * for floating-point comparisons – two keys are considered equal if the + * invariant abs(n0-n1) > epsilon holds true for all vector respectively + * quaternion components. + * + * Default value: 0 (exact comparison). + * + * Property type: float. + */ + const char* AI_CONFIG_PP_FID_ANIM_ACCURACY = "PP_FID_ANIM_ACCURACY"; /** * The TransformUVCoords step evaluates UV scalings. @@ -623,4 +649,15 @@ extern ( C ) { * Property type: integer. */ const char* AI_CONFIG_IMPORT_IRR_ANIM_FPS = "IMPORT_IRR_ANIM_FPS"; -} \ No newline at end of file + + /** + * Ogre Importer will try to load this material file. + * + * Ogre Mehs contain only the material name, not the material file. If there + * is no material file with the same name as the material, Ogre Importer + * will try to load this file and search the material in it. + * + * Property type: string. Default value: "Scene.material". + */ + const char* AI_CONFIG_IMPORT_OGRE_MATERIAL_FILE = "IMPORT_OGRE_MATERIAL_FILE"; +} diff --git a/port/dAssimp/assimp/fileIO.d b/port/dAssimp/assimp/fileIO.d index d0ee2ed87..d893016d8 100644 --- a/port/dAssimp/assimp/fileIO.d +++ b/port/dAssimp/assimp/fileIO.d @@ -64,12 +64,12 @@ extern ( C ) { alias char* aiUserData; /** - * Defines Assimp's way of accessing files. + * File system callbacks. * * Provided are functions to open and close files. Supply a custom structure * to the import function. If you don't, a default implementation is used. - * Use this to enable reading from other sources, such as ZIPs or memory - * locations. + * Use custom file systems to enable reading from other sources, such as + * ZIPs or memory locations. */ struct aiFileIO { /** @@ -89,7 +89,7 @@ extern ( C ) { } /** - * Represents a read/write file. + * File callbacks. * * Actually, it's a data structure to wrap a set of fXXXX * (e.g fopen()) replacement functions. diff --git a/port/dAssimp/assimp/postprocess.d b/port/dAssimp/assimp/postprocess.d index 377d5b934..a720a8c63 100644 --- a/port/dAssimp/assimp/postprocess.d +++ b/port/dAssimp/assimp/postprocess.d @@ -199,10 +199,15 @@ extern ( C ) { * this step. * * This step is intended for applications that have no scenegraph. + * * The step can cause some problems: if e.g. a mesh of the asset * contains normals and another, using the same material index, does not, * they will be brought together, but the first meshes's part of the - * normal list will be zeroed. + * normal list is zeroed. However, these artifacts are rare. + * + * Note: The AI_CONFIG_PP_PTV_NORMALIZE configuration + * property can be set to normalize the scene's spatial dimension + * to the -1...1 range. */ PreTransformVertices = 0x100, @@ -358,13 +363,17 @@ extern ( C ) { /** * This step searches all meshes for invalid data, such as zeroed normal - * vectors or invalid UV coords and removes them. + * vectors or invalid UV coords and removes/fixes them. This is intended + * to get rid of some common exporter errors. * * This is especially useful for normals. If they are invalid, and the - * step recognizes this, they will be removed and can later be computed - * by one of the other steps. + * step recognizes this, they will be removed and can later be + * recomputed, e.g. by the GenSmoothNormals step. * - * The step will also remove meshes that are infinitely small. + * The step will also remove meshes that are infinitely small and reduce + * animation tracks consisting of hundreds if redundant keys to a single + * key. The AI_CONFIG_PP_FID_ANIM_ACCURACY config property + * decides the accuracy of the check for duplicate animation tracks. */ FindInvalidData = 0x20000,