vrshoot
diff libs/assimp/assimp/material.h @ 0:b2f14e535253
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 01 Feb 2014 19:58:19 +0200 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/libs/assimp/assimp/material.h Sat Feb 01 19:58:19 2014 +0200 1.3 @@ -0,0 +1,1499 @@ 1.4 +/* 1.5 +--------------------------------------------------------------------------- 1.6 +Open Asset Import Library (assimp) 1.7 +--------------------------------------------------------------------------- 1.8 + 1.9 +Copyright (c) 2006-2012, assimp team 1.10 + 1.11 +All rights reserved. 1.12 + 1.13 +Redistribution and use of this software in source and binary forms, 1.14 +with or without modification, are permitted provided that the following 1.15 +conditions are met: 1.16 + 1.17 +* Redistributions of source code must retain the above 1.18 + copyright notice, this list of conditions and the 1.19 + following disclaimer. 1.20 + 1.21 +* Redistributions in binary form must reproduce the above 1.22 + copyright notice, this list of conditions and the 1.23 + following disclaimer in the documentation and/or other 1.24 + materials provided with the distribution. 1.25 + 1.26 +* Neither the name of the assimp team, nor the names of its 1.27 + contributors may be used to endorse or promote products 1.28 + derived from this software without specific prior 1.29 + written permission of the assimp team. 1.30 + 1.31 +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1.32 +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1.33 +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1.34 +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1.35 +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1.36 +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1.37 +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1.38 +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1.39 +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1.40 +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1.41 +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1.42 +--------------------------------------------------------------------------- 1.43 +*/ 1.44 + 1.45 +/** @file material.h 1.46 + * @brief Defines the material system of the library 1.47 + */ 1.48 + 1.49 +#ifndef AI_MATERIAL_H_INC 1.50 +#define AI_MATERIAL_H_INC 1.51 + 1.52 +#include "types.h" 1.53 + 1.54 +#ifdef __cplusplus 1.55 +extern "C" { 1.56 +#endif 1.57 + 1.58 +// Name for default materials (2nd is used if meshes have UV coords) 1.59 +#define AI_DEFAULT_MATERIAL_NAME "DefaultMaterial" 1.60 + 1.61 +// --------------------------------------------------------------------------- 1.62 +/** @brief Defines how the Nth texture of a specific type is combined with 1.63 + * the result of all previous layers. 1.64 + * 1.65 + * Example (left: key, right: value): <br> 1.66 + * @code 1.67 + * DiffColor0 - gray 1.68 + * DiffTextureOp0 - aiTextureOpMultiply 1.69 + * DiffTexture0 - tex1.png 1.70 + * DiffTextureOp0 - aiTextureOpAdd 1.71 + * DiffTexture1 - tex2.png 1.72 + * @endcode 1.73 + * Written as equation, the final diffuse term for a specific pixel would be: 1.74 + * @code 1.75 + * diffFinal = DiffColor0 * sampleTex(DiffTexture0,UV0) + 1.76 + * sampleTex(DiffTexture1,UV0) * diffContrib; 1.77 + * @endcode 1.78 + * where 'diffContrib' is the intensity of the incoming light for that pixel. 1.79 + */ 1.80 +enum aiTextureOp 1.81 +{ 1.82 + /** T = T1 * T2 */ 1.83 + aiTextureOp_Multiply = 0x0, 1.84 + 1.85 + /** T = T1 + T2 */ 1.86 + aiTextureOp_Add = 0x1, 1.87 + 1.88 + /** T = T1 - T2 */ 1.89 + aiTextureOp_Subtract = 0x2, 1.90 + 1.91 + /** T = T1 / T2 */ 1.92 + aiTextureOp_Divide = 0x3, 1.93 + 1.94 + /** T = (T1 + T2) - (T1 * T2) */ 1.95 + aiTextureOp_SmoothAdd = 0x4, 1.96 + 1.97 + /** T = T1 + (T2-0.5) */ 1.98 + aiTextureOp_SignedAdd = 0x5, 1.99 + 1.100 + 1.101 + /** @cond never 1.102 + * This value is not used. It forces the compiler to use at least 1.103 + * 32 Bit integers to represent this enum. 1.104 + */ 1.105 +#ifndef SWIG 1.106 + _aiTextureOp_Force32Bit = INT_MAX 1.107 +#endif 1.108 + //! @endcond 1.109 +}; 1.110 + 1.111 +// --------------------------------------------------------------------------- 1.112 +/** @brief Defines how UV coordinates outside the [0...1] range are handled. 1.113 + * 1.114 + * Commonly refered to as 'wrapping mode'. 1.115 + */ 1.116 +enum aiTextureMapMode 1.117 +{ 1.118 + /** A texture coordinate u|v is translated to u%1|v%1 1.119 + */ 1.120 + aiTextureMapMode_Wrap = 0x0, 1.121 + 1.122 + /** Texture coordinates outside [0...1] 1.123 + * are clamped to the nearest valid value. 1.124 + */ 1.125 + aiTextureMapMode_Clamp = 0x1, 1.126 + 1.127 + /** If the texture coordinates for a pixel are outside [0...1] 1.128 + * the texture is not applied to that pixel 1.129 + */ 1.130 + aiTextureMapMode_Decal = 0x3, 1.131 + 1.132 + /** A texture coordinate u|v becomes u%1|v%1 if (u-(u%1))%2 is zero and 1.133 + * 1-(u%1)|1-(v%1) otherwise 1.134 + */ 1.135 + aiTextureMapMode_Mirror = 0x2, 1.136 + 1.137 + /** @cond never 1.138 + * This value is not used. It forces the compiler to use at least 1.139 + * 32 Bit integers to represent this enum. 1.140 + */ 1.141 +#ifndef SWIG 1.142 + _aiTextureMapMode_Force32Bit = INT_MAX 1.143 +#endif 1.144 + //! @endcond 1.145 +}; 1.146 + 1.147 +// --------------------------------------------------------------------------- 1.148 +/** @brief Defines how the mapping coords for a texture are generated. 1.149 + * 1.150 + * Real-time applications typically require full UV coordinates, so the use of 1.151 + * the aiProcess_GenUVCoords step is highly recommended. It generates proper 1.152 + * UV channels for non-UV mapped objects, as long as an accurate description 1.153 + * how the mapping should look like (e.g spherical) is given. 1.154 + * See the #AI_MATKEY_MAPPING property for more details. 1.155 + */ 1.156 +enum aiTextureMapping 1.157 +{ 1.158 + /** The mapping coordinates are taken from an UV channel. 1.159 + * 1.160 + * The #AI_MATKEY_UVWSRC key specifies from which UV channel 1.161 + * the texture coordinates are to be taken from (remember, 1.162 + * meshes can have more than one UV channel). 1.163 + */ 1.164 + aiTextureMapping_UV = 0x0, 1.165 + 1.166 + /** Spherical mapping */ 1.167 + aiTextureMapping_SPHERE = 0x1, 1.168 + 1.169 + /** Cylindrical mapping */ 1.170 + aiTextureMapping_CYLINDER = 0x2, 1.171 + 1.172 + /** Cubic mapping */ 1.173 + aiTextureMapping_BOX = 0x3, 1.174 + 1.175 + /** Planar mapping */ 1.176 + aiTextureMapping_PLANE = 0x4, 1.177 + 1.178 + /** Undefined mapping. Have fun. */ 1.179 + aiTextureMapping_OTHER = 0x5, 1.180 + 1.181 + 1.182 + /** @cond never 1.183 + * This value is not used. It forces the compiler to use at least 1.184 + * 32 Bit integers to represent this enum. 1.185 + */ 1.186 +#ifndef SWIG 1.187 + _aiTextureMapping_Force32Bit = INT_MAX 1.188 +#endif 1.189 + //! @endcond 1.190 +}; 1.191 + 1.192 +// --------------------------------------------------------------------------- 1.193 +/** @brief Defines the purpose of a texture 1.194 + * 1.195 + * This is a very difficult topic. Different 3D packages support different 1.196 + * kinds of textures. For very common texture types, such as bumpmaps, the 1.197 + * rendering results depend on implementation details in the rendering 1.198 + * pipelines of these applications. Assimp loads all texture references from 1.199 + * the model file and tries to determine which of the predefined texture 1.200 + * types below is the best choice to match the original use of the texture 1.201 + * as closely as possible.<br> 1.202 + * 1.203 + * In content pipelines you'll usually define how textures have to be handled, 1.204 + * and the artists working on models have to conform to this specification, 1.205 + * regardless which 3D tool they're using. 1.206 + */ 1.207 +enum aiTextureType 1.208 +{ 1.209 + /** Dummy value. 1.210 + * 1.211 + * No texture, but the value to be used as 'texture semantic' 1.212 + * (#aiMaterialProperty::mSemantic) for all material properties 1.213 + * *not* related to textures. 1.214 + */ 1.215 + aiTextureType_NONE = 0x0, 1.216 + 1.217 + 1.218 + 1.219 + /** The texture is combined with the result of the diffuse 1.220 + * lighting equation. 1.221 + */ 1.222 + aiTextureType_DIFFUSE = 0x1, 1.223 + 1.224 + /** The texture is combined with the result of the specular 1.225 + * lighting equation. 1.226 + */ 1.227 + aiTextureType_SPECULAR = 0x2, 1.228 + 1.229 + /** The texture is combined with the result of the ambient 1.230 + * lighting equation. 1.231 + */ 1.232 + aiTextureType_AMBIENT = 0x3, 1.233 + 1.234 + /** The texture is added to the result of the lighting 1.235 + * calculation. It isn't influenced by incoming light. 1.236 + */ 1.237 + aiTextureType_EMISSIVE = 0x4, 1.238 + 1.239 + /** The texture is a height map. 1.240 + * 1.241 + * By convention, higher gray-scale values stand for 1.242 + * higher elevations from the base height. 1.243 + */ 1.244 + aiTextureType_HEIGHT = 0x5, 1.245 + 1.246 + /** The texture is a (tangent space) normal-map. 1.247 + * 1.248 + * Again, there are several conventions for tangent-space 1.249 + * normal maps. Assimp does (intentionally) not 1.250 + * distinguish here. 1.251 + */ 1.252 + aiTextureType_NORMALS = 0x6, 1.253 + 1.254 + /** The texture defines the glossiness of the material. 1.255 + * 1.256 + * The glossiness is in fact the exponent of the specular 1.257 + * (phong) lighting equation. Usually there is a conversion 1.258 + * function defined to map the linear color values in the 1.259 + * texture to a suitable exponent. Have fun. 1.260 + */ 1.261 + aiTextureType_SHININESS = 0x7, 1.262 + 1.263 + /** The texture defines per-pixel opacity. 1.264 + * 1.265 + * Usually 'white' means opaque and 'black' means 1.266 + * 'transparency'. Or quite the opposite. Have fun. 1.267 + */ 1.268 + aiTextureType_OPACITY = 0x8, 1.269 + 1.270 + /** Displacement texture 1.271 + * 1.272 + * The exact purpose and format is application-dependent. 1.273 + * Higher color values stand for higher vertex displacements. 1.274 + */ 1.275 + aiTextureType_DISPLACEMENT = 0x9, 1.276 + 1.277 + /** Lightmap texture (aka Ambient Occlusion) 1.278 + * 1.279 + * Both 'Lightmaps' and dedicated 'ambient occlusion maps' are 1.280 + * covered by this material property. The texture contains a 1.281 + * scaling value for the final color value of a pixel. Its 1.282 + * intensity is not affected by incoming light. 1.283 + */ 1.284 + aiTextureType_LIGHTMAP = 0xA, 1.285 + 1.286 + /** Reflection texture 1.287 + * 1.288 + * Contains the color of a perfect mirror reflection. 1.289 + * Rarely used, almost never for real-time applications. 1.290 + */ 1.291 + aiTextureType_REFLECTION = 0xB, 1.292 + 1.293 + /** Unknown texture 1.294 + * 1.295 + * A texture reference that does not match any of the definitions 1.296 + * above is considered to be 'unknown'. It is still imported, 1.297 + * but is excluded from any further postprocessing. 1.298 + */ 1.299 + aiTextureType_UNKNOWN = 0xC, 1.300 + 1.301 + 1.302 + /** @cond never 1.303 + * This value is not used. It forces the compiler to use at least 1.304 + * 32 Bit integers to represent this enum. 1.305 + */ 1.306 +#ifndef SWIG 1.307 + _aiTextureType_Force32Bit = INT_MAX 1.308 +#endif 1.309 + //! @endcond 1.310 +}; 1.311 + 1.312 +#define AI_TEXTURE_TYPE_MAX aiTextureType_UNKNOWN 1.313 + 1.314 +// --------------------------------------------------------------------------- 1.315 +/** @brief Defines all shading models supported by the library 1.316 + * 1.317 + * The list of shading modes has been taken from Blender. 1.318 + * See Blender documentation for more information. The API does 1.319 + * not distinguish between "specular" and "diffuse" shaders (thus the 1.320 + * specular term for diffuse shading models like Oren-Nayar remains 1.321 + * undefined). <br> 1.322 + * Again, this value is just a hint. Assimp tries to select the shader whose 1.323 + * most common implementation matches the original rendering results of the 1.324 + * 3D modeller which wrote a particular model as closely as possible. 1.325 + */ 1.326 +enum aiShadingMode 1.327 +{ 1.328 + /** Flat shading. Shading is done on per-face base, 1.329 + * diffuse only. Also known as 'faceted shading'. 1.330 + */ 1.331 + aiShadingMode_Flat = 0x1, 1.332 + 1.333 + /** Simple Gouraud shading. 1.334 + */ 1.335 + aiShadingMode_Gouraud = 0x2, 1.336 + 1.337 + /** Phong-Shading - 1.338 + */ 1.339 + aiShadingMode_Phong = 0x3, 1.340 + 1.341 + /** Phong-Blinn-Shading 1.342 + */ 1.343 + aiShadingMode_Blinn = 0x4, 1.344 + 1.345 + /** Toon-Shading per pixel 1.346 + * 1.347 + * Also known as 'comic' shader. 1.348 + */ 1.349 + aiShadingMode_Toon = 0x5, 1.350 + 1.351 + /** OrenNayar-Shading per pixel 1.352 + * 1.353 + * Extension to standard Lambertian shading, taking the 1.354 + * roughness of the material into account 1.355 + */ 1.356 + aiShadingMode_OrenNayar = 0x6, 1.357 + 1.358 + /** Minnaert-Shading per pixel 1.359 + * 1.360 + * Extension to standard Lambertian shading, taking the 1.361 + * "darkness" of the material into account 1.362 + */ 1.363 + aiShadingMode_Minnaert = 0x7, 1.364 + 1.365 + /** CookTorrance-Shading per pixel 1.366 + * 1.367 + * Special shader for metallic surfaces. 1.368 + */ 1.369 + aiShadingMode_CookTorrance = 0x8, 1.370 + 1.371 + /** No shading at all. Constant light influence of 1.0. 1.372 + */ 1.373 + aiShadingMode_NoShading = 0x9, 1.374 + 1.375 + /** Fresnel shading 1.376 + */ 1.377 + aiShadingMode_Fresnel = 0xa, 1.378 + 1.379 + 1.380 + /** @cond never 1.381 + * This value is not used. It forces the compiler to use at least 1.382 + * 32 Bit integers to represent this enum. 1.383 + */ 1.384 +#ifndef SWIG 1.385 + _aiShadingMode_Force32Bit = INT_MAX 1.386 +#endif 1.387 + //! @endcond 1.388 +}; 1.389 + 1.390 + 1.391 +// --------------------------------------------------------------------------- 1.392 +/** @brief Defines some mixed flags for a particular texture. 1.393 + * 1.394 + * Usually you'll instruct your cg artists how textures have to look like ... 1.395 + * and how they will be processed in your application. However, if you use 1.396 + * Assimp for completely generic loading purposes you might also need to 1.397 + * process these flags in order to display as many 'unknown' 3D models as 1.398 + * possible correctly. 1.399 + * 1.400 + * This corresponds to the #AI_MATKEY_TEXFLAGS property. 1.401 +*/ 1.402 +enum aiTextureFlags 1.403 +{ 1.404 + /** The texture's color values have to be inverted (componentwise 1-n) 1.405 + */ 1.406 + aiTextureFlags_Invert = 0x1, 1.407 + 1.408 + /** Explicit request to the application to process the alpha channel 1.409 + * of the texture. 1.410 + * 1.411 + * Mutually exclusive with #aiTextureFlags_IgnoreAlpha. These 1.412 + * flags are set if the library can say for sure that the alpha 1.413 + * channel is used/is not used. If the model format does not 1.414 + * define this, it is left to the application to decide whether 1.415 + * the texture alpha channel - if any - is evaluated or not. 1.416 + */ 1.417 + aiTextureFlags_UseAlpha = 0x2, 1.418 + 1.419 + /** Explicit request to the application to ignore the alpha channel 1.420 + * of the texture. 1.421 + * 1.422 + * Mutually exclusive with #aiTextureFlags_UseAlpha. 1.423 + */ 1.424 + aiTextureFlags_IgnoreAlpha = 0x4, 1.425 + 1.426 + /** @cond never 1.427 + * This value is not used. It forces the compiler to use at least 1.428 + * 32 Bit integers to represent this enum. 1.429 + */ 1.430 +#ifndef SWIG 1.431 + _aiTextureFlags_Force32Bit = INT_MAX 1.432 +#endif 1.433 + //! @endcond 1.434 +}; 1.435 + 1.436 + 1.437 +// --------------------------------------------------------------------------- 1.438 +/** @brief Defines alpha-blend flags. 1.439 + * 1.440 + * If you're familiar with OpenGL or D3D, these flags aren't new to you. 1.441 + * They define *how* the final color value of a pixel is computed, basing 1.442 + * on the previous color at that pixel and the new color value from the 1.443 + * material. 1.444 + * The blend formula is: 1.445 + * @code 1.446 + * SourceColor * SourceBlend + DestColor * DestBlend 1.447 + * @endcode 1.448 + * where <DestColor> is the previous color in the framebuffer at this 1.449 + * position and <SourceColor> is the material colro before the transparency 1.450 + * calculation.<br> 1.451 + * This corresponds to the #AI_MATKEY_BLEND_FUNC property. 1.452 +*/ 1.453 +enum aiBlendMode 1.454 +{ 1.455 + /** 1.456 + * Formula: 1.457 + * @code 1.458 + * SourceColor*SourceAlpha + DestColor*(1-SourceAlpha) 1.459 + * @endcode 1.460 + */ 1.461 + aiBlendMode_Default = 0x0, 1.462 + 1.463 + /** Additive blending 1.464 + * 1.465 + * Formula: 1.466 + * @code 1.467 + * SourceColor*1 + DestColor*1 1.468 + * @endcode 1.469 + */ 1.470 + aiBlendMode_Additive = 0x1, 1.471 + 1.472 + // we don't need more for the moment, but we might need them 1.473 + // in future versions ... 1.474 + 1.475 + /** @cond never 1.476 + * This value is not used. It forces the compiler to use at least 1.477 + * 32 Bit integers to represent this enum. 1.478 + */ 1.479 +#ifndef SWIG 1.480 + _aiBlendMode_Force32Bit = INT_MAX 1.481 +#endif 1.482 + //! @endcond 1.483 +}; 1.484 + 1.485 + 1.486 +#include "./Compiler/pushpack1.h" 1.487 + 1.488 +// --------------------------------------------------------------------------- 1.489 +/** @brief Defines how an UV channel is transformed. 1.490 + * 1.491 + * This is just a helper structure for the #AI_MATKEY_UVTRANSFORM key. 1.492 + * See its documentation for more details. 1.493 + * 1.494 + * Typically you'll want to build a matrix of this information. However, 1.495 + * we keep separate scaling/translation/rotation values to make it 1.496 + * easier to process and optimize UV transformations internally. 1.497 + */ 1.498 +struct aiUVTransform 1.499 +{ 1.500 + /** Translation on the u and v axes. 1.501 + * 1.502 + * The default value is (0|0). 1.503 + */ 1.504 + C_STRUCT aiVector2D mTranslation; 1.505 + 1.506 + /** Scaling on the u and v axes. 1.507 + * 1.508 + * The default value is (1|1). 1.509 + */ 1.510 + C_STRUCT aiVector2D mScaling; 1.511 + 1.512 + /** Rotation - in counter-clockwise direction. 1.513 + * 1.514 + * The rotation angle is specified in radians. The 1.515 + * rotation center is 0.5f|0.5f. The default value 1.516 + * 0.f. 1.517 + */ 1.518 + float mRotation; 1.519 + 1.520 + 1.521 +#ifdef __cplusplus 1.522 + aiUVTransform() 1.523 + : mScaling (1.f,1.f) 1.524 + , mRotation (0.f) 1.525 + { 1.526 + // nothing to be done here ... 1.527 + } 1.528 +#endif 1.529 + 1.530 +} PACK_STRUCT; 1.531 + 1.532 +#include "./Compiler/poppack1.h" 1.533 + 1.534 +//! @cond AI_DOX_INCLUDE_INTERNAL 1.535 +// --------------------------------------------------------------------------- 1.536 +/** @brief A very primitive RTTI system for the contents of material 1.537 + * properties. 1.538 + */ 1.539 +enum aiPropertyTypeInfo 1.540 +{ 1.541 + /** Array of single-precision (32 Bit) floats 1.542 + * 1.543 + * It is possible to use aiGetMaterialInteger[Array]() (or the C++-API 1.544 + * aiMaterial::Get()) to query properties stored in floating-point format. 1.545 + * The material system performs the type conversion automatically. 1.546 + */ 1.547 + aiPTI_Float = 0x1, 1.548 + 1.549 + /** The material property is an aiString. 1.550 + * 1.551 + * Arrays of strings aren't possible, aiGetMaterialString() (or the 1.552 + * C++-API aiMaterial::Get()) *must* be used to query a string property. 1.553 + */ 1.554 + aiPTI_String = 0x3, 1.555 + 1.556 + /** Array of (32 Bit) integers 1.557 + * 1.558 + * It is possible to use aiGetMaterialFloat[Array]() (or the C++-API 1.559 + * aiMaterial::Get()) to query properties stored in integer format. 1.560 + * The material system performs the type conversion automatically. 1.561 + */ 1.562 + aiPTI_Integer = 0x4, 1.563 + 1.564 + 1.565 + /** Simple binary buffer, content undefined. Not convertible to anything. 1.566 + */ 1.567 + aiPTI_Buffer = 0x5, 1.568 + 1.569 + 1.570 + /** This value is not used. It is just there to force the 1.571 + * compiler to map this enum to a 32 Bit integer. 1.572 + */ 1.573 +#ifndef SWIG 1.574 + _aiPTI_Force32Bit = INT_MAX 1.575 +#endif 1.576 +}; 1.577 + 1.578 +// --------------------------------------------------------------------------- 1.579 +/** @brief Data structure for a single material property 1.580 + * 1.581 + * As an user, you'll probably never need to deal with this data structure. 1.582 + * Just use the provided aiGetMaterialXXX() or aiMaterial::Get() family 1.583 + * of functions to query material properties easily. Processing them 1.584 + * manually is faster, but it is not the recommended way. It isn't worth 1.585 + * the effort. <br> 1.586 + * Material property names follow a simple scheme: 1.587 + * @code 1.588 + * $<name> 1.589 + * ?<name> 1.590 + * A public property, there must be corresponding AI_MATKEY_XXX define 1.591 + * 2nd: Public, but ignored by the #aiProcess_RemoveRedundantMaterials 1.592 + * post-processing step. 1.593 + * ~<name> 1.594 + * A temporary property for internal use. 1.595 + * @endcode 1.596 + * @see aiMaterial 1.597 + */ 1.598 +struct aiMaterialProperty 1.599 +{ 1.600 + /** Specifies the name of the property (key) 1.601 + * Keys are generally case insensitive. 1.602 + */ 1.603 + C_STRUCT aiString mKey; 1.604 + 1.605 + /** Textures: Specifies their exact usage semantic. 1.606 + * For non-texture properties, this member is always 0 1.607 + * (or, better-said, #aiTextureType_NONE). 1.608 + */ 1.609 + unsigned int mSemantic; 1.610 + 1.611 + /** Textures: Specifies the index of the texture. 1.612 + * For non-texture properties, this member is always 0. 1.613 + */ 1.614 + unsigned int mIndex; 1.615 + 1.616 + /** Size of the buffer mData is pointing to, in bytes. 1.617 + * This value may not be 0. 1.618 + */ 1.619 + unsigned int mDataLength; 1.620 + 1.621 + /** Type information for the property. 1.622 + * 1.623 + * Defines the data layout inside the data buffer. This is used 1.624 + * by the library internally to perform debug checks and to 1.625 + * utilize proper type conversions. 1.626 + * (It's probably a hacky solution, but it works.) 1.627 + */ 1.628 + C_ENUM aiPropertyTypeInfo mType; 1.629 + 1.630 + /** Binary buffer to hold the property's value. 1.631 + * The size of the buffer is always mDataLength. 1.632 + */ 1.633 + char* mData; 1.634 + 1.635 +#ifdef __cplusplus 1.636 + 1.637 + aiMaterialProperty() 1.638 + : mSemantic( 0 ) 1.639 + , mIndex( 0 ) 1.640 + , mDataLength( 0 ) 1.641 + , mType( aiPTI_Float ) 1.642 + , mData( NULL ) 1.643 + { 1.644 + } 1.645 + 1.646 + ~aiMaterialProperty() { 1.647 + delete[] mData; 1.648 + } 1.649 + 1.650 +#endif 1.651 +}; 1.652 +//! @endcond 1.653 + 1.654 +#ifdef __cplusplus 1.655 +} // We need to leave the "C" block here to allow template member functions 1.656 +#endif 1.657 + 1.658 +// --------------------------------------------------------------------------- 1.659 +/** @brief Data structure for a material 1.660 +* 1.661 +* Material data is stored using a key-value structure. A single key-value 1.662 +* pair is called a 'material property'. C++ users should use the provided 1.663 +* member functions of aiMaterial to process material properties, C users 1.664 +* have to stick with the aiMaterialGetXXX family of unbound functions. 1.665 +* The library defines a set of standard keys (AI_MATKEY_XXX). 1.666 +*/ 1.667 +#ifdef __cplusplus 1.668 +struct ASSIMP_API aiMaterial 1.669 +#else 1.670 +struct aiMaterial 1.671 +#endif 1.672 +{ 1.673 + 1.674 +#ifdef __cplusplus 1.675 + 1.676 +public: 1.677 + 1.678 + aiMaterial(); 1.679 + ~aiMaterial(); 1.680 + 1.681 + // ------------------------------------------------------------------- 1.682 + /** @brief Retrieve an array of Type values with a specific key 1.683 + * from the material 1.684 + * 1.685 + * @param pKey Key to search for. One of the AI_MATKEY_XXX constants. 1.686 + * @param type .. set by AI_MATKEY_XXX 1.687 + * @param idx .. set by AI_MATKEY_XXX 1.688 + * @param pOut Pointer to a buffer to receive the result. 1.689 + * @param pMax Specifies the size of the given buffer, in Type's. 1.690 + * Receives the number of values (not bytes!) read. 1.691 + * NULL is a valid value for this parameter. 1.692 + */ 1.693 + template <typename Type> 1.694 + aiReturn Get(const char* pKey,unsigned int type, 1.695 + unsigned int idx, Type* pOut, unsigned int* pMax) const; 1.696 + 1.697 + // ------------------------------------------------------------------- 1.698 + /** @brief Retrieve a Type value with a specific key 1.699 + * from the material 1.700 + * 1.701 + * @param pKey Key to search for. One of the AI_MATKEY_XXX constants. 1.702 + * @param type Specifies the type of the texture to be retrieved ( 1.703 + * e.g. diffuse, specular, height map ...) 1.704 + * @param idx Index of the texture to be retrieved. 1.705 + * @param pOut Reference to receive the output value 1.706 + */ 1.707 + template <typename Type> 1.708 + aiReturn Get(const char* pKey,unsigned int type, 1.709 + unsigned int idx,Type& pOut) const; 1.710 + 1.711 + // ------------------------------------------------------------------- 1.712 + /** Get the number of textures for a particular texture type. 1.713 + * @param type Texture type to check for 1.714 + * @return Number of textures for this type. 1.715 + * @note A texture can be easily queried using #GetTexture() */ 1.716 + unsigned int GetTextureCount(aiTextureType type) const; 1.717 + 1.718 + // ------------------------------------------------------------------- 1.719 + /** Helper function to get all parameters pertaining to a 1.720 + * particular texture slot from a material. 1.721 + * 1.722 + * This function is provided just for convenience, you could also 1.723 + * read the single material properties manually. 1.724 + * @param type Specifies the type of the texture to be retrieved ( 1.725 + * e.g. diffuse, specular, height map ...) 1.726 + * @param index Index of the texture to be retrieved. The function fails 1.727 + * if there is no texture of that type with this index. 1.728 + * #GetTextureCount() can be used to determine the number of textures 1.729 + * per texture type. 1.730 + * @param path Receives the path to the texture. 1.731 + * NULL is a valid value. 1.732 + * @param mapping The texture mapping. 1.733 + * NULL is allowed as value. 1.734 + * @param uvindex Receives the UV index of the texture. 1.735 + * NULL is a valid value. 1.736 + * @param blend Receives the blend factor for the texture 1.737 + * NULL is a valid value. 1.738 + * @param op Receives the texture operation to be performed between 1.739 + * this texture and the previous texture. NULL is allowed as value. 1.740 + * @param mapmode Receives the mapping modes to be used for the texture. 1.741 + * The parameter may be NULL but if it is a valid pointer it MUST 1.742 + * point to an array of 3 aiTextureMapMode's (one for each 1.743 + * axis: UVW order (=XYZ)). 1.744 + */ 1.745 + // ------------------------------------------------------------------- 1.746 + aiReturn GetTexture(aiTextureType type, 1.747 + unsigned int index, 1.748 + C_STRUCT aiString* path, 1.749 + aiTextureMapping* mapping = NULL, 1.750 + unsigned int* uvindex = NULL, 1.751 + float* blend = NULL, 1.752 + aiTextureOp* op = NULL, 1.753 + aiTextureMapMode* mapmode = NULL) const; 1.754 + 1.755 + 1.756 + // Setters 1.757 + 1.758 + 1.759 + // ------------------------------------------------------------------------------ 1.760 + /** @brief Add a property with a given key and type info to the material 1.761 + * structure 1.762 + * 1.763 + * @param pInput Pointer to input data 1.764 + * @param pSizeInBytes Size of input data 1.765 + * @param pKey Key/Usage of the property (AI_MATKEY_XXX) 1.766 + * @param type Set by the AI_MATKEY_XXX macro 1.767 + * @param index Set by the AI_MATKEY_XXX macro 1.768 + * @param pType Type information hint */ 1.769 + aiReturn AddBinaryProperty (const void* pInput, 1.770 + unsigned int pSizeInBytes, 1.771 + const char* pKey, 1.772 + unsigned int type , 1.773 + unsigned int index , 1.774 + aiPropertyTypeInfo pType); 1.775 + 1.776 + // ------------------------------------------------------------------------------ 1.777 + /** @brief Add a string property with a given key and type info to the 1.778 + * material structure 1.779 + * 1.780 + * @param pInput Input string 1.781 + * @param pKey Key/Usage of the property (AI_MATKEY_XXX) 1.782 + * @param type Set by the AI_MATKEY_XXX macro 1.783 + * @param index Set by the AI_MATKEY_XXX macro */ 1.784 + aiReturn AddProperty (const aiString* pInput, 1.785 + const char* pKey, 1.786 + unsigned int type = 0, 1.787 + unsigned int index = 0); 1.788 + 1.789 + // ------------------------------------------------------------------------------ 1.790 + /** @brief Add a property with a given key to the material structure 1.791 + * @param pInput Pointer to the input data 1.792 + * @param pNumValues Number of values in the array 1.793 + * @param pKey Key/Usage of the property (AI_MATKEY_XXX) 1.794 + * @param type Set by the AI_MATKEY_XXX macro 1.795 + * @param index Set by the AI_MATKEY_XXX macro */ 1.796 + template<class TYPE> 1.797 + aiReturn AddProperty (const TYPE* pInput, 1.798 + unsigned int pNumValues, 1.799 + const char* pKey, 1.800 + unsigned int type = 0, 1.801 + unsigned int index = 0); 1.802 + 1.803 + // ------------------------------------------------------------------------------ 1.804 + /** @brief Remove a given key from the list. 1.805 + * 1.806 + * The function fails if the key isn't found 1.807 + * @param pKey Key to be deleted */ 1.808 + aiReturn RemoveProperty (const char* pKey, 1.809 + unsigned int type = 0, 1.810 + unsigned int index = 0); 1.811 + 1.812 + // ------------------------------------------------------------------------------ 1.813 + /** @brief Removes all properties from the material. 1.814 + * 1.815 + * The data array remains allocated so adding new properties is quite fast. */ 1.816 + void Clear(); 1.817 + 1.818 + // ------------------------------------------------------------------------------ 1.819 + /** Copy the property list of a material 1.820 + * @param pcDest Destination material 1.821 + * @param pcSrc Source material 1.822 + */ 1.823 + static void CopyPropertyList(aiMaterial* pcDest, 1.824 + const aiMaterial* pcSrc); 1.825 + 1.826 + 1.827 +#endif 1.828 + 1.829 + /** List of all material properties loaded. */ 1.830 + C_STRUCT aiMaterialProperty** mProperties; 1.831 + 1.832 + /** Number of properties in the data base */ 1.833 + unsigned int mNumProperties; 1.834 + 1.835 + /** Storage allocated */ 1.836 + unsigned int mNumAllocated; 1.837 +}; 1.838 + 1.839 +// Go back to extern "C" again 1.840 +#ifdef __cplusplus 1.841 +extern "C" { 1.842 +#endif 1.843 + 1.844 +// --------------------------------------------------------------------------- 1.845 +#define AI_MATKEY_NAME "?mat.name",0,0 1.846 +#define AI_MATKEY_TWOSIDED "$mat.twosided",0,0 1.847 +#define AI_MATKEY_SHADING_MODEL "$mat.shadingm",0,0 1.848 +#define AI_MATKEY_ENABLE_WIREFRAME "$mat.wireframe",0,0 1.849 +#define AI_MATKEY_BLEND_FUNC "$mat.blend",0,0 1.850 +#define AI_MATKEY_OPACITY "$mat.opacity",0,0 1.851 +#define AI_MATKEY_BUMPSCALING "$mat.bumpscaling",0,0 1.852 +#define AI_MATKEY_SHININESS "$mat.shininess",0,0 1.853 +#define AI_MATKEY_REFLECTIVITY "$mat.reflectivity",0,0 1.854 +#define AI_MATKEY_SHININESS_STRENGTH "$mat.shinpercent",0,0 1.855 +#define AI_MATKEY_REFRACTI "$mat.refracti",0,0 1.856 +#define AI_MATKEY_COLOR_DIFFUSE "$clr.diffuse",0,0 1.857 +#define AI_MATKEY_COLOR_AMBIENT "$clr.ambient",0,0 1.858 +#define AI_MATKEY_COLOR_SPECULAR "$clr.specular",0,0 1.859 +#define AI_MATKEY_COLOR_EMISSIVE "$clr.emissive",0,0 1.860 +#define AI_MATKEY_COLOR_TRANSPARENT "$clr.transparent",0,0 1.861 +#define AI_MATKEY_COLOR_REFLECTIVE "$clr.reflective",0,0 1.862 +#define AI_MATKEY_GLOBAL_BACKGROUND_IMAGE "?bg.global",0,0 1.863 + 1.864 +// --------------------------------------------------------------------------- 1.865 +// Pure key names for all texture-related properties 1.866 +//! @cond MATS_DOC_FULL 1.867 +#define _AI_MATKEY_TEXTURE_BASE "$tex.file" 1.868 +#define _AI_MATKEY_UVWSRC_BASE "$tex.uvwsrc" 1.869 +#define _AI_MATKEY_TEXOP_BASE "$tex.op" 1.870 +#define _AI_MATKEY_MAPPING_BASE "$tex.mapping" 1.871 +#define _AI_MATKEY_TEXBLEND_BASE "$tex.blend" 1.872 +#define _AI_MATKEY_MAPPINGMODE_U_BASE "$tex.mapmodeu" 1.873 +#define _AI_MATKEY_MAPPINGMODE_V_BASE "$tex.mapmodev" 1.874 +#define _AI_MATKEY_TEXMAP_AXIS_BASE "$tex.mapaxis" 1.875 +#define _AI_MATKEY_UVTRANSFORM_BASE "$tex.uvtrafo" 1.876 +#define _AI_MATKEY_TEXFLAGS_BASE "$tex.flags" 1.877 +//! @endcond 1.878 + 1.879 +// --------------------------------------------------------------------------- 1.880 +#define AI_MATKEY_TEXTURE(type, N) _AI_MATKEY_TEXTURE_BASE,type,N 1.881 + 1.882 +// For backward compatibility and simplicity 1.883 +//! @cond MATS_DOC_FULL 1.884 +#define AI_MATKEY_TEXTURE_DIFFUSE(N) \ 1.885 + AI_MATKEY_TEXTURE(aiTextureType_DIFFUSE,N) 1.886 + 1.887 +#define AI_MATKEY_TEXTURE_SPECULAR(N) \ 1.888 + AI_MATKEY_TEXTURE(aiTextureType_SPECULAR,N) 1.889 + 1.890 +#define AI_MATKEY_TEXTURE_AMBIENT(N) \ 1.891 + AI_MATKEY_TEXTURE(aiTextureType_AMBIENT,N) 1.892 + 1.893 +#define AI_MATKEY_TEXTURE_EMISSIVE(N) \ 1.894 + AI_MATKEY_TEXTURE(aiTextureType_EMISSIVE,N) 1.895 + 1.896 +#define AI_MATKEY_TEXTURE_NORMALS(N) \ 1.897 + AI_MATKEY_TEXTURE(aiTextureType_NORMALS,N) 1.898 + 1.899 +#define AI_MATKEY_TEXTURE_HEIGHT(N) \ 1.900 + AI_MATKEY_TEXTURE(aiTextureType_HEIGHT,N) 1.901 + 1.902 +#define AI_MATKEY_TEXTURE_SHININESS(N) \ 1.903 + AI_MATKEY_TEXTURE(aiTextureType_SHININESS,N) 1.904 + 1.905 +#define AI_MATKEY_TEXTURE_OPACITY(N) \ 1.906 + AI_MATKEY_TEXTURE(aiTextureType_OPACITY,N) 1.907 + 1.908 +#define AI_MATKEY_TEXTURE_DISPLACEMENT(N) \ 1.909 + AI_MATKEY_TEXTURE(aiTextureType_DISPLACEMENT,N) 1.910 + 1.911 +#define AI_MATKEY_TEXTURE_LIGHTMAP(N) \ 1.912 + AI_MATKEY_TEXTURE(aiTextureType_LIGHTMAP,N) 1.913 + 1.914 +#define AI_MATKEY_TEXTURE_REFLECTION(N) \ 1.915 + AI_MATKEY_TEXTURE(aiTextureType_REFLECTION,N) 1.916 + 1.917 +//! @endcond 1.918 + 1.919 +// --------------------------------------------------------------------------- 1.920 +#define AI_MATKEY_UVWSRC(type, N) _AI_MATKEY_UVWSRC_BASE,type,N 1.921 + 1.922 +// For backward compatibility and simplicity 1.923 +//! @cond MATS_DOC_FULL 1.924 +#define AI_MATKEY_UVWSRC_DIFFUSE(N) \ 1.925 + AI_MATKEY_UVWSRC(aiTextureType_DIFFUSE,N) 1.926 + 1.927 +#define AI_MATKEY_UVWSRC_SPECULAR(N) \ 1.928 + AI_MATKEY_UVWSRC(aiTextureType_SPECULAR,N) 1.929 + 1.930 +#define AI_MATKEY_UVWSRC_AMBIENT(N) \ 1.931 + AI_MATKEY_UVWSRC(aiTextureType_AMBIENT,N) 1.932 + 1.933 +#define AI_MATKEY_UVWSRC_EMISSIVE(N) \ 1.934 + AI_MATKEY_UVWSRC(aiTextureType_EMISSIVE,N) 1.935 + 1.936 +#define AI_MATKEY_UVWSRC_NORMALS(N) \ 1.937 + AI_MATKEY_UVWSRC(aiTextureType_NORMALS,N) 1.938 + 1.939 +#define AI_MATKEY_UVWSRC_HEIGHT(N) \ 1.940 + AI_MATKEY_UVWSRC(aiTextureType_HEIGHT,N) 1.941 + 1.942 +#define AI_MATKEY_UVWSRC_SHININESS(N) \ 1.943 + AI_MATKEY_UVWSRC(aiTextureType_SHININESS,N) 1.944 + 1.945 +#define AI_MATKEY_UVWSRC_OPACITY(N) \ 1.946 + AI_MATKEY_UVWSRC(aiTextureType_OPACITY,N) 1.947 + 1.948 +#define AI_MATKEY_UVWSRC_DISPLACEMENT(N) \ 1.949 + AI_MATKEY_UVWSRC(aiTextureType_DISPLACEMENT,N) 1.950 + 1.951 +#define AI_MATKEY_UVWSRC_LIGHTMAP(N) \ 1.952 + AI_MATKEY_UVWSRC(aiTextureType_LIGHTMAP,N) 1.953 + 1.954 +#define AI_MATKEY_UVWSRC_REFLECTION(N) \ 1.955 + AI_MATKEY_UVWSRC(aiTextureType_REFLECTION,N) 1.956 + 1.957 +//! @endcond 1.958 +// --------------------------------------------------------------------------- 1.959 +#define AI_MATKEY_TEXOP(type, N) _AI_MATKEY_TEXOP_BASE,type,N 1.960 + 1.961 +// For backward compatibility and simplicity 1.962 +//! @cond MATS_DOC_FULL 1.963 +#define AI_MATKEY_TEXOP_DIFFUSE(N) \ 1.964 + AI_MATKEY_TEXOP(aiTextureType_DIFFUSE,N) 1.965 + 1.966 +#define AI_MATKEY_TEXOP_SPECULAR(N) \ 1.967 + AI_MATKEY_TEXOP(aiTextureType_SPECULAR,N) 1.968 + 1.969 +#define AI_MATKEY_TEXOP_AMBIENT(N) \ 1.970 + AI_MATKEY_TEXOP(aiTextureType_AMBIENT,N) 1.971 + 1.972 +#define AI_MATKEY_TEXOP_EMISSIVE(N) \ 1.973 + AI_MATKEY_TEXOP(aiTextureType_EMISSIVE,N) 1.974 + 1.975 +#define AI_MATKEY_TEXOP_NORMALS(N) \ 1.976 + AI_MATKEY_TEXOP(aiTextureType_NORMALS,N) 1.977 + 1.978 +#define AI_MATKEY_TEXOP_HEIGHT(N) \ 1.979 + AI_MATKEY_TEXOP(aiTextureType_HEIGHT,N) 1.980 + 1.981 +#define AI_MATKEY_TEXOP_SHININESS(N) \ 1.982 + AI_MATKEY_TEXOP(aiTextureType_SHININESS,N) 1.983 + 1.984 +#define AI_MATKEY_TEXOP_OPACITY(N) \ 1.985 + AI_MATKEY_TEXOP(aiTextureType_OPACITY,N) 1.986 + 1.987 +#define AI_MATKEY_TEXOP_DISPLACEMENT(N) \ 1.988 + AI_MATKEY_TEXOP(aiTextureType_DISPLACEMENT,N) 1.989 + 1.990 +#define AI_MATKEY_TEXOP_LIGHTMAP(N) \ 1.991 + AI_MATKEY_TEXOP(aiTextureType_LIGHTMAP,N) 1.992 + 1.993 +#define AI_MATKEY_TEXOP_REFLECTION(N) \ 1.994 + AI_MATKEY_TEXOP(aiTextureType_REFLECTION,N) 1.995 + 1.996 +//! @endcond 1.997 +// --------------------------------------------------------------------------- 1.998 +#define AI_MATKEY_MAPPING(type, N) _AI_MATKEY_MAPPING_BASE,type,N 1.999 + 1.1000 +// For backward compatibility and simplicity 1.1001 +//! @cond MATS_DOC_FULL 1.1002 +#define AI_MATKEY_MAPPING_DIFFUSE(N) \ 1.1003 + AI_MATKEY_MAPPING(aiTextureType_DIFFUSE,N) 1.1004 + 1.1005 +#define AI_MATKEY_MAPPING_SPECULAR(N) \ 1.1006 + AI_MATKEY_MAPPING(aiTextureType_SPECULAR,N) 1.1007 + 1.1008 +#define AI_MATKEY_MAPPING_AMBIENT(N) \ 1.1009 + AI_MATKEY_MAPPING(aiTextureType_AMBIENT,N) 1.1010 + 1.1011 +#define AI_MATKEY_MAPPING_EMISSIVE(N) \ 1.1012 + AI_MATKEY_MAPPING(aiTextureType_EMISSIVE,N) 1.1013 + 1.1014 +#define AI_MATKEY_MAPPING_NORMALS(N) \ 1.1015 + AI_MATKEY_MAPPING(aiTextureType_NORMALS,N) 1.1016 + 1.1017 +#define AI_MATKEY_MAPPING_HEIGHT(N) \ 1.1018 + AI_MATKEY_MAPPING(aiTextureType_HEIGHT,N) 1.1019 + 1.1020 +#define AI_MATKEY_MAPPING_SHININESS(N) \ 1.1021 + AI_MATKEY_MAPPING(aiTextureType_SHININESS,N) 1.1022 + 1.1023 +#define AI_MATKEY_MAPPING_OPACITY(N) \ 1.1024 + AI_MATKEY_MAPPING(aiTextureType_OPACITY,N) 1.1025 + 1.1026 +#define AI_MATKEY_MAPPING_DISPLACEMENT(N) \ 1.1027 + AI_MATKEY_MAPPING(aiTextureType_DISPLACEMENT,N) 1.1028 + 1.1029 +#define AI_MATKEY_MAPPING_LIGHTMAP(N) \ 1.1030 + AI_MATKEY_MAPPING(aiTextureType_LIGHTMAP,N) 1.1031 + 1.1032 +#define AI_MATKEY_MAPPING_REFLECTION(N) \ 1.1033 + AI_MATKEY_MAPPING(aiTextureType_REFLECTION,N) 1.1034 + 1.1035 +//! @endcond 1.1036 +// --------------------------------------------------------------------------- 1.1037 +#define AI_MATKEY_TEXBLEND(type, N) _AI_MATKEY_TEXBLEND_BASE,type,N 1.1038 + 1.1039 +// For backward compatibility and simplicity 1.1040 +//! @cond MATS_DOC_FULL 1.1041 +#define AI_MATKEY_TEXBLEND_DIFFUSE(N) \ 1.1042 + AI_MATKEY_TEXBLEND(aiTextureType_DIFFUSE,N) 1.1043 + 1.1044 +#define AI_MATKEY_TEXBLEND_SPECULAR(N) \ 1.1045 + AI_MATKEY_TEXBLEND(aiTextureType_SPECULAR,N) 1.1046 + 1.1047 +#define AI_MATKEY_TEXBLEND_AMBIENT(N) \ 1.1048 + AI_MATKEY_TEXBLEND(aiTextureType_AMBIENT,N) 1.1049 + 1.1050 +#define AI_MATKEY_TEXBLEND_EMISSIVE(N) \ 1.1051 + AI_MATKEY_TEXBLEND(aiTextureType_EMISSIVE,N) 1.1052 + 1.1053 +#define AI_MATKEY_TEXBLEND_NORMALS(N) \ 1.1054 + AI_MATKEY_TEXBLEND(aiTextureType_NORMALS,N) 1.1055 + 1.1056 +#define AI_MATKEY_TEXBLEND_HEIGHT(N) \ 1.1057 + AI_MATKEY_TEXBLEND(aiTextureType_HEIGHT,N) 1.1058 + 1.1059 +#define AI_MATKEY_TEXBLEND_SHININESS(N) \ 1.1060 + AI_MATKEY_TEXBLEND(aiTextureType_SHININESS,N) 1.1061 + 1.1062 +#define AI_MATKEY_TEXBLEND_OPACITY(N) \ 1.1063 + AI_MATKEY_TEXBLEND(aiTextureType_OPACITY,N) 1.1064 + 1.1065 +#define AI_MATKEY_TEXBLEND_DISPLACEMENT(N) \ 1.1066 + AI_MATKEY_TEXBLEND(aiTextureType_DISPLACEMENT,N) 1.1067 + 1.1068 +#define AI_MATKEY_TEXBLEND_LIGHTMAP(N) \ 1.1069 + AI_MATKEY_TEXBLEND(aiTextureType_LIGHTMAP,N) 1.1070 + 1.1071 +#define AI_MATKEY_TEXBLEND_REFLECTION(N) \ 1.1072 + AI_MATKEY_TEXBLEND(aiTextureType_REFLECTION,N) 1.1073 + 1.1074 +//! @endcond 1.1075 +// --------------------------------------------------------------------------- 1.1076 +#define AI_MATKEY_MAPPINGMODE_U(type, N) _AI_MATKEY_MAPPINGMODE_U_BASE,type,N 1.1077 + 1.1078 +// For backward compatibility and simplicity 1.1079 +//! @cond MATS_DOC_FULL 1.1080 +#define AI_MATKEY_MAPPINGMODE_U_DIFFUSE(N) \ 1.1081 + AI_MATKEY_MAPPINGMODE_U(aiTextureType_DIFFUSE,N) 1.1082 + 1.1083 +#define AI_MATKEY_MAPPINGMODE_U_SPECULAR(N) \ 1.1084 + AI_MATKEY_MAPPINGMODE_U(aiTextureType_SPECULAR,N) 1.1085 + 1.1086 +#define AI_MATKEY_MAPPINGMODE_U_AMBIENT(N) \ 1.1087 + AI_MATKEY_MAPPINGMODE_U(aiTextureType_AMBIENT,N) 1.1088 + 1.1089 +#define AI_MATKEY_MAPPINGMODE_U_EMISSIVE(N) \ 1.1090 + AI_MATKEY_MAPPINGMODE_U(aiTextureType_EMISSIVE,N) 1.1091 + 1.1092 +#define AI_MATKEY_MAPPINGMODE_U_NORMALS(N) \ 1.1093 + AI_MATKEY_MAPPINGMODE_U(aiTextureType_NORMALS,N) 1.1094 + 1.1095 +#define AI_MATKEY_MAPPINGMODE_U_HEIGHT(N) \ 1.1096 + AI_MATKEY_MAPPINGMODE_U(aiTextureType_HEIGHT,N) 1.1097 + 1.1098 +#define AI_MATKEY_MAPPINGMODE_U_SHININESS(N) \ 1.1099 + AI_MATKEY_MAPPINGMODE_U(aiTextureType_SHININESS,N) 1.1100 + 1.1101 +#define AI_MATKEY_MAPPINGMODE_U_OPACITY(N) \ 1.1102 + AI_MATKEY_MAPPINGMODE_U(aiTextureType_OPACITY,N) 1.1103 + 1.1104 +#define AI_MATKEY_MAPPINGMODE_U_DISPLACEMENT(N) \ 1.1105 + AI_MATKEY_MAPPINGMODE_U(aiTextureType_DISPLACEMENT,N) 1.1106 + 1.1107 +#define AI_MATKEY_MAPPINGMODE_U_LIGHTMAP(N) \ 1.1108 + AI_MATKEY_MAPPINGMODE_U(aiTextureType_LIGHTMAP,N) 1.1109 + 1.1110 +#define AI_MATKEY_MAPPINGMODE_U_REFLECTION(N) \ 1.1111 + AI_MATKEY_MAPPINGMODE_U(aiTextureType_REFLECTION,N) 1.1112 + 1.1113 +//! @endcond 1.1114 +// --------------------------------------------------------------------------- 1.1115 +#define AI_MATKEY_MAPPINGMODE_V(type, N) _AI_MATKEY_MAPPINGMODE_V_BASE,type,N 1.1116 + 1.1117 +// For backward compatibility and simplicity 1.1118 +//! @cond MATS_DOC_FULL 1.1119 +#define AI_MATKEY_MAPPINGMODE_V_DIFFUSE(N) \ 1.1120 + AI_MATKEY_MAPPINGMODE_V(aiTextureType_DIFFUSE,N) 1.1121 + 1.1122 +#define AI_MATKEY_MAPPINGMODE_V_SPECULAR(N) \ 1.1123 + AI_MATKEY_MAPPINGMODE_V(aiTextureType_SPECULAR,N) 1.1124 + 1.1125 +#define AI_MATKEY_MAPPINGMODE_V_AMBIENT(N) \ 1.1126 + AI_MATKEY_MAPPINGMODE_V(aiTextureType_AMBIENT,N) 1.1127 + 1.1128 +#define AI_MATKEY_MAPPINGMODE_V_EMISSIVE(N) \ 1.1129 + AI_MATKEY_MAPPINGMODE_V(aiTextureType_EMISSIVE,N) 1.1130 + 1.1131 +#define AI_MATKEY_MAPPINGMODE_V_NORMALS(N) \ 1.1132 + AI_MATKEY_MAPPINGMODE_V(aiTextureType_NORMALS,N) 1.1133 + 1.1134 +#define AI_MATKEY_MAPPINGMODE_V_HEIGHT(N) \ 1.1135 + AI_MATKEY_MAPPINGMODE_V(aiTextureType_HEIGHT,N) 1.1136 + 1.1137 +#define AI_MATKEY_MAPPINGMODE_V_SHININESS(N) \ 1.1138 + AI_MATKEY_MAPPINGMODE_V(aiTextureType_SHININESS,N) 1.1139 + 1.1140 +#define AI_MATKEY_MAPPINGMODE_V_OPACITY(N) \ 1.1141 + AI_MATKEY_MAPPINGMODE_V(aiTextureType_OPACITY,N) 1.1142 + 1.1143 +#define AI_MATKEY_MAPPINGMODE_V_DISPLACEMENT(N) \ 1.1144 + AI_MATKEY_MAPPINGMODE_V(aiTextureType_DISPLACEMENT,N) 1.1145 + 1.1146 +#define AI_MATKEY_MAPPINGMODE_V_LIGHTMAP(N) \ 1.1147 + AI_MATKEY_MAPPINGMODE_V(aiTextureType_LIGHTMAP,N) 1.1148 + 1.1149 +#define AI_MATKEY_MAPPINGMODE_V_REFLECTION(N) \ 1.1150 + AI_MATKEY_MAPPINGMODE_V(aiTextureType_REFLECTION,N) 1.1151 + 1.1152 +//! @endcond 1.1153 +// --------------------------------------------------------------------------- 1.1154 +#define AI_MATKEY_TEXMAP_AXIS(type, N) _AI_MATKEY_TEXMAP_AXIS_BASE,type,N 1.1155 + 1.1156 +// For backward compatibility and simplicity 1.1157 +//! @cond MATS_DOC_FULL 1.1158 +#define AI_MATKEY_TEXMAP_AXIS_DIFFUSE(N) \ 1.1159 + AI_MATKEY_TEXMAP_AXIS(aiTextureType_DIFFUSE,N) 1.1160 + 1.1161 +#define AI_MATKEY_TEXMAP_AXIS_SPECULAR(N) \ 1.1162 + AI_MATKEY_TEXMAP_AXIS(aiTextureType_SPECULAR,N) 1.1163 + 1.1164 +#define AI_MATKEY_TEXMAP_AXIS_AMBIENT(N) \ 1.1165 + AI_MATKEY_TEXMAP_AXIS(aiTextureType_AMBIENT,N) 1.1166 + 1.1167 +#define AI_MATKEY_TEXMAP_AXIS_EMISSIVE(N) \ 1.1168 + AI_MATKEY_TEXMAP_AXIS(aiTextureType_EMISSIVE,N) 1.1169 + 1.1170 +#define AI_MATKEY_TEXMAP_AXIS_NORMALS(N) \ 1.1171 + AI_MATKEY_TEXMAP_AXIS(aiTextureType_NORMALS,N) 1.1172 + 1.1173 +#define AI_MATKEY_TEXMAP_AXIS_HEIGHT(N) \ 1.1174 + AI_MATKEY_TEXMAP_AXIS(aiTextureType_HEIGHT,N) 1.1175 + 1.1176 +#define AI_MATKEY_TEXMAP_AXIS_SHININESS(N) \ 1.1177 + AI_MATKEY_TEXMAP_AXIS(aiTextureType_SHININESS,N) 1.1178 + 1.1179 +#define AI_MATKEY_TEXMAP_AXIS_OPACITY(N) \ 1.1180 + AI_MATKEY_TEXMAP_AXIS(aiTextureType_OPACITY,N) 1.1181 + 1.1182 +#define AI_MATKEY_TEXMAP_AXIS_DISPLACEMENT(N) \ 1.1183 + AI_MATKEY_TEXMAP_AXIS(aiTextureType_DISPLACEMENT,N) 1.1184 + 1.1185 +#define AI_MATKEY_TEXMAP_AXIS_LIGHTMAP(N) \ 1.1186 + AI_MATKEY_TEXMAP_AXIS(aiTextureType_LIGHTMAP,N) 1.1187 + 1.1188 +#define AI_MATKEY_TEXMAP_AXIS_REFLECTION(N) \ 1.1189 + AI_MATKEY_TEXMAP_AXIS(aiTextureType_REFLECTION,N) 1.1190 + 1.1191 +//! @endcond 1.1192 +// --------------------------------------------------------------------------- 1.1193 +#define AI_MATKEY_UVTRANSFORM(type, N) _AI_MATKEY_UVTRANSFORM_BASE,type,N 1.1194 + 1.1195 +// For backward compatibility and simplicity 1.1196 +//! @cond MATS_DOC_FULL 1.1197 +#define AI_MATKEY_UVTRANSFORM_DIFFUSE(N) \ 1.1198 + AI_MATKEY_UVTRANSFORM(aiTextureType_DIFFUSE,N) 1.1199 + 1.1200 +#define AI_MATKEY_UVTRANSFORM_SPECULAR(N) \ 1.1201 + AI_MATKEY_UVTRANSFORM(aiTextureType_SPECULAR,N) 1.1202 + 1.1203 +#define AI_MATKEY_UVTRANSFORM_AMBIENT(N) \ 1.1204 + AI_MATKEY_UVTRANSFORM(aiTextureType_AMBIENT,N) 1.1205 + 1.1206 +#define AI_MATKEY_UVTRANSFORM_EMISSIVE(N) \ 1.1207 + AI_MATKEY_UVTRANSFORM(aiTextureType_EMISSIVE,N) 1.1208 + 1.1209 +#define AI_MATKEY_UVTRANSFORM_NORMALS(N) \ 1.1210 + AI_MATKEY_UVTRANSFORM(aiTextureType_NORMALS,N) 1.1211 + 1.1212 +#define AI_MATKEY_UVTRANSFORM_HEIGHT(N) \ 1.1213 + AI_MATKEY_UVTRANSFORM(aiTextureType_HEIGHT,N) 1.1214 + 1.1215 +#define AI_MATKEY_UVTRANSFORM_SHININESS(N) \ 1.1216 + AI_MATKEY_UVTRANSFORM(aiTextureType_SHININESS,N) 1.1217 + 1.1218 +#define AI_MATKEY_UVTRANSFORM_OPACITY(N) \ 1.1219 + AI_MATKEY_UVTRANSFORM(aiTextureType_OPACITY,N) 1.1220 + 1.1221 +#define AI_MATKEY_UVTRANSFORM_DISPLACEMENT(N) \ 1.1222 + AI_MATKEY_UVTRANSFORM(aiTextureType_DISPLACEMENT,N) 1.1223 + 1.1224 +#define AI_MATKEY_UVTRANSFORM_LIGHTMAP(N) \ 1.1225 + AI_MATKEY_UVTRANSFORM(aiTextureType_LIGHTMAP,N) 1.1226 + 1.1227 +#define AI_MATKEY_UVTRANSFORM_REFLECTION(N) \ 1.1228 + AI_MATKEY_UVTRANSFORM(aiTextureType_REFLECTION,N) 1.1229 + 1.1230 +#define AI_MATKEY_UVTRANSFORM_UNKNOWN(N) \ 1.1231 + AI_MATKEY_UVTRANSFORM(aiTextureType_UNKNOWN,N) 1.1232 + 1.1233 +//! @endcond 1.1234 +// --------------------------------------------------------------------------- 1.1235 +#define AI_MATKEY_TEXFLAGS(type, N) _AI_MATKEY_TEXFLAGS_BASE,type,N 1.1236 + 1.1237 +// For backward compatibility and simplicity 1.1238 +//! @cond MATS_DOC_FULL 1.1239 +#define AI_MATKEY_TEXFLAGS_DIFFUSE(N) \ 1.1240 + AI_MATKEY_TEXFLAGS(aiTextureType_DIFFUSE,N) 1.1241 + 1.1242 +#define AI_MATKEY_TEXFLAGS_SPECULAR(N) \ 1.1243 + AI_MATKEY_TEXFLAGS(aiTextureType_SPECULAR,N) 1.1244 + 1.1245 +#define AI_MATKEY_TEXFLAGS_AMBIENT(N) \ 1.1246 + AI_MATKEY_TEXFLAGS(aiTextureType_AMBIENT,N) 1.1247 + 1.1248 +#define AI_MATKEY_TEXFLAGS_EMISSIVE(N) \ 1.1249 + AI_MATKEY_TEXFLAGS(aiTextureType_EMISSIVE,N) 1.1250 + 1.1251 +#define AI_MATKEY_TEXFLAGS_NORMALS(N) \ 1.1252 + AI_MATKEY_TEXFLAGS(aiTextureType_NORMALS,N) 1.1253 + 1.1254 +#define AI_MATKEY_TEXFLAGS_HEIGHT(N) \ 1.1255 + AI_MATKEY_TEXFLAGS(aiTextureType_HEIGHT,N) 1.1256 + 1.1257 +#define AI_MATKEY_TEXFLAGS_SHININESS(N) \ 1.1258 + AI_MATKEY_TEXFLAGS(aiTextureType_SHININESS,N) 1.1259 + 1.1260 +#define AI_MATKEY_TEXFLAGS_OPACITY(N) \ 1.1261 + AI_MATKEY_TEXFLAGS(aiTextureType_OPACITY,N) 1.1262 + 1.1263 +#define AI_MATKEY_TEXFLAGS_DISPLACEMENT(N) \ 1.1264 + AI_MATKEY_TEXFLAGS(aiTextureType_DISPLACEMENT,N) 1.1265 + 1.1266 +#define AI_MATKEY_TEXFLAGS_LIGHTMAP(N) \ 1.1267 + AI_MATKEY_TEXFLAGS(aiTextureType_LIGHTMAP,N) 1.1268 + 1.1269 +#define AI_MATKEY_TEXFLAGS_REFLECTION(N) \ 1.1270 + AI_MATKEY_TEXFLAGS(aiTextureType_REFLECTION,N) 1.1271 + 1.1272 +#define AI_MATKEY_TEXFLAGS_UNKNOWN(N) \ 1.1273 + AI_MATKEY_TEXFLAGS(aiTextureType_UNKNOWN,N) 1.1274 + 1.1275 +// --------------------------------------------------------------------------- 1.1276 +/** @brief Retrieve a material property with a specific key from the material 1.1277 + * 1.1278 + * @param pMat Pointer to the input material. May not be NULL 1.1279 + * @param pKey Key to search for. One of the AI_MATKEY_XXX constants. 1.1280 + * @param type Specifies the type of the texture to be retrieved ( 1.1281 + * e.g. diffuse, specular, height map ...) 1.1282 + * @param index Index of the texture to be retrieved. 1.1283 + * @param pPropOut Pointer to receive a pointer to a valid aiMaterialProperty 1.1284 + * structure or NULL if the key has not been found. */ 1.1285 +// --------------------------------------------------------------------------- 1.1286 +ASSIMP_API C_ENUM aiReturn aiGetMaterialProperty( 1.1287 + const C_STRUCT aiMaterial* pMat, 1.1288 + const char* pKey, 1.1289 + unsigned int type, 1.1290 + unsigned int index, 1.1291 + const C_STRUCT aiMaterialProperty** pPropOut); 1.1292 + 1.1293 +// --------------------------------------------------------------------------- 1.1294 +/** @brief Retrieve an array of float values with a specific key 1.1295 + * from the material 1.1296 + * 1.1297 + * Pass one of the AI_MATKEY_XXX constants for the last three parameters (the 1.1298 + * example reads the #AI_MATKEY_UVTRANSFORM property of the first diffuse texture) 1.1299 + * @code 1.1300 + * aiUVTransform trafo; 1.1301 + * unsigned int max = sizeof(aiUVTransform); 1.1302 + * if (AI_SUCCESS != aiGetMaterialFloatArray(mat, AI_MATKEY_UVTRANSFORM(aiTextureType_DIFFUSE,0), 1.1303 + * (float*)&trafo, &max) || sizeof(aiUVTransform) != max) 1.1304 + * { 1.1305 + * // error handling 1.1306 + * } 1.1307 + * @endcode 1.1308 + * 1.1309 + * @param pMat Pointer to the input material. May not be NULL 1.1310 + * @param pKey Key to search for. One of the AI_MATKEY_XXX constants. 1.1311 + * @param pOut Pointer to a buffer to receive the result. 1.1312 + * @param pMax Specifies the size of the given buffer, in float's. 1.1313 + * Receives the number of values (not bytes!) read. 1.1314 + * @param type (see the code sample above) 1.1315 + * @param index (see the code sample above) 1.1316 + * @return Specifies whether the key has been found. If not, the output 1.1317 + * arrays remains unmodified and pMax is set to 0.*/ 1.1318 +// --------------------------------------------------------------------------- 1.1319 +ASSIMP_API C_ENUM aiReturn aiGetMaterialFloatArray( 1.1320 + const C_STRUCT aiMaterial* pMat, 1.1321 + const char* pKey, 1.1322 + unsigned int type, 1.1323 + unsigned int index, 1.1324 + float* pOut, 1.1325 + unsigned int* pMax); 1.1326 + 1.1327 + 1.1328 +#ifdef __cplusplus 1.1329 + 1.1330 +// --------------------------------------------------------------------------- 1.1331 +/** @brief Retrieve a single float property with a specific key from the material. 1.1332 +* 1.1333 +* Pass one of the AI_MATKEY_XXX constants for the last three parameters (the 1.1334 +* example reads the #AI_MATKEY_SHININESS_STRENGTH property of the first diffuse texture) 1.1335 +* @code 1.1336 +* float specStrength = 1.f; // default value, remains unmodified if we fail. 1.1337 +* aiGetMaterialFloat(mat, AI_MATKEY_SHININESS_STRENGTH, 1.1338 +* (float*)&specStrength); 1.1339 +* @endcode 1.1340 +* 1.1341 +* @param pMat Pointer to the input material. May not be NULL 1.1342 +* @param pKey Key to search for. One of the AI_MATKEY_XXX constants. 1.1343 +* @param pOut Receives the output float. 1.1344 +* @param type (see the code sample above) 1.1345 +* @param index (see the code sample above) 1.1346 +* @return Specifies whether the key has been found. If not, the output 1.1347 +* float remains unmodified.*/ 1.1348 +// --------------------------------------------------------------------------- 1.1349 +inline aiReturn aiGetMaterialFloat(const aiMaterial* pMat, 1.1350 + const char* pKey, 1.1351 + unsigned int type, 1.1352 + unsigned int index, 1.1353 + float* pOut) 1.1354 +{ 1.1355 + return aiGetMaterialFloatArray(pMat,pKey,type,index,pOut,(unsigned int*)0x0); 1.1356 +} 1.1357 + 1.1358 +#else 1.1359 + 1.1360 +// Use our friend, the C preprocessor 1.1361 +#define aiGetMaterialFloat (pMat, type, index, pKey, pOut) \ 1.1362 + aiGetMaterialFloatArray(pMat, type, index, pKey, pOut, NULL) 1.1363 + 1.1364 +#endif //!__cplusplus 1.1365 + 1.1366 + 1.1367 +// --------------------------------------------------------------------------- 1.1368 +/** @brief Retrieve an array of integer values with a specific key 1.1369 + * from a material 1.1370 + * 1.1371 + * See the sample for aiGetMaterialFloatArray for more information.*/ 1.1372 +ASSIMP_API C_ENUM aiReturn aiGetMaterialIntegerArray(const C_STRUCT aiMaterial* pMat, 1.1373 + const char* pKey, 1.1374 + unsigned int type, 1.1375 + unsigned int index, 1.1376 + int* pOut, 1.1377 + unsigned int* pMax); 1.1378 + 1.1379 + 1.1380 +#ifdef __cplusplus 1.1381 + 1.1382 +// --------------------------------------------------------------------------- 1.1383 +/** @brief Retrieve an integer property with a specific key from a material 1.1384 + * 1.1385 + * See the sample for aiGetMaterialFloat for more information.*/ 1.1386 +// --------------------------------------------------------------------------- 1.1387 +inline aiReturn aiGetMaterialInteger(const C_STRUCT aiMaterial* pMat, 1.1388 + const char* pKey, 1.1389 + unsigned int type, 1.1390 + unsigned int index, 1.1391 + int* pOut) 1.1392 +{ 1.1393 + return aiGetMaterialIntegerArray(pMat,pKey,type,index,pOut,(unsigned int*)0x0); 1.1394 +} 1.1395 + 1.1396 +#else 1.1397 + 1.1398 +// use our friend, the C preprocessor 1.1399 +#define aiGetMaterialInteger (pMat, type, index, pKey, pOut) \ 1.1400 + aiGetMaterialIntegerArray(pMat, type, index, pKey, pOut, NULL) 1.1401 + 1.1402 +#endif //!__cplusplus 1.1403 + 1.1404 + 1.1405 + 1.1406 +// --------------------------------------------------------------------------- 1.1407 +/** @brief Retrieve a color value from the material property table 1.1408 +* 1.1409 +* See the sample for aiGetMaterialFloat for more information*/ 1.1410 +// --------------------------------------------------------------------------- 1.1411 +ASSIMP_API C_ENUM aiReturn aiGetMaterialColor(const C_STRUCT aiMaterial* pMat, 1.1412 + const char* pKey, 1.1413 + unsigned int type, 1.1414 + unsigned int index, 1.1415 + C_STRUCT aiColor4D* pOut); 1.1416 + 1.1417 + 1.1418 +// --------------------------------------------------------------------------- 1.1419 +/** @brief Retrieve a string from the material property table 1.1420 +* 1.1421 +* See the sample for aiGetMaterialFloat for more information.*/ 1.1422 +// --------------------------------------------------------------------------- 1.1423 +ASSIMP_API C_ENUM aiReturn aiGetMaterialString(const C_STRUCT aiMaterial* pMat, 1.1424 + const char* pKey, 1.1425 + unsigned int type, 1.1426 + unsigned int index, 1.1427 + C_STRUCT aiString* pOut); 1.1428 + 1.1429 +// --------------------------------------------------------------------------- 1.1430 +/** Get the number of textures for a particular texture type. 1.1431 + * @param[in] pMat Pointer to the input material. May not be NULL 1.1432 + * @param type Texture type to check for 1.1433 + * @return Number of textures for this type. 1.1434 + * @note A texture can be easily queried using #aiGetMaterialTexture() */ 1.1435 +// --------------------------------------------------------------------------- 1.1436 +ASSIMP_API unsigned int aiGetMaterialTextureCount(const C_STRUCT aiMaterial* pMat, 1.1437 + C_ENUM aiTextureType type); 1.1438 + 1.1439 +// --------------------------------------------------------------------------- 1.1440 +/** @brief Helper function to get all values pertaining to a particular 1.1441 + * texture slot from a material structure. 1.1442 + * 1.1443 + * This function is provided just for convenience. You could also read the 1.1444 + * texture by parsing all of its properties manually. This function bundles 1.1445 + * all of them in a huge function monster. 1.1446 + * 1.1447 + * @param[in] mat Pointer to the input material. May not be NULL 1.1448 + * @param[in] type Specifies the texture stack to read from (e.g. diffuse, 1.1449 + * specular, height map ...). 1.1450 + * @param[in] index Index of the texture. The function fails if the 1.1451 + * requested index is not available for this texture type. 1.1452 + * #aiGetMaterialTextureCount() can be used to determine the number of 1.1453 + * textures in a particular texture stack. 1.1454 + * @param[out] path Receives the output path 1.1455 + * This parameter must be non-null. 1.1456 + * @param mapping The texture mapping mode to be used. 1.1457 + * Pass NULL if you're not interested in this information. 1.1458 + * @param[out] uvindex For UV-mapped textures: receives the index of the UV 1.1459 + * source channel. Unmodified otherwise. 1.1460 + * Pass NULL if you're not interested in this information. 1.1461 + * @param[out] blend Receives the blend factor for the texture 1.1462 + * Pass NULL if you're not interested in this information. 1.1463 + * @param[out] op Receives the texture blend operation to be perform between 1.1464 + * this texture and the previous texture. 1.1465 + * Pass NULL if you're not interested in this information. 1.1466 + * @param[out] mapmode Receives the mapping modes to be used for the texture. 1.1467 + * Pass NULL if you're not interested in this information. Otherwise, 1.1468 + * pass a pointer to an array of two aiTextureMapMode's (one for each 1.1469 + * axis, UV order). 1.1470 + * @return AI_SUCCESS on success, otherwise something else. Have fun.*/ 1.1471 +// --------------------------------------------------------------------------- 1.1472 +#ifdef __cplusplus 1.1473 +ASSIMP_API aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat, 1.1474 + aiTextureType type, 1.1475 + unsigned int index, 1.1476 + aiString* path, 1.1477 + aiTextureMapping* mapping = NULL, 1.1478 + unsigned int* uvindex = NULL, 1.1479 + float* blend = NULL, 1.1480 + aiTextureOp* op = NULL, 1.1481 + aiTextureMapMode* mapmode = NULL, 1.1482 + unsigned int* flags = NULL); 1.1483 +#else 1.1484 +C_ENUM aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat, 1.1485 + C_ENUM aiTextureType type, 1.1486 + unsigned int index, 1.1487 + C_STRUCT aiString* path, 1.1488 + C_ENUM aiTextureMapping* mapping /*= NULL*/, 1.1489 + unsigned int* uvindex /*= NULL*/, 1.1490 + float* blend /*= NULL*/, 1.1491 + C_ENUM aiTextureOp* op /*= NULL*/, 1.1492 + C_ENUM aiTextureMapMode* mapmode /*= NULL*/, 1.1493 + unsigned int* flags /*= NULL*/); 1.1494 +#endif // !#ifdef __cplusplus 1.1495 + 1.1496 +#ifdef __cplusplus 1.1497 +} 1.1498 + 1.1499 +#include "material.inl" 1.1500 + 1.1501 +#endif //!__cplusplus 1.1502 +#endif //!!AI_MATERIAL_H_INC