------------------------------------------------------------------------------------------------ Copy a texture from the ASE structs to the output material
| 775 | // ------------------------------------------------------------------------------------------------ |
| 776 | // Copy a texture from the ASE structs to the output material |
| 777 | void CopyASETexture(aiMaterial &mat, ASE::Texture &texture, aiTextureType type) { |
| 778 | // Setup the texture name |
| 779 | aiString tex; |
| 780 | tex.Set(texture.mMapName); |
| 781 | mat.AddProperty(&tex, AI_MATKEY_TEXTURE(type, 0)); |
| 782 | |
| 783 | // Setup the texture blend factor |
| 784 | if (is_not_qnan(texture.mTextureBlend)) |
| 785 | mat.AddProperty<ai_real>(&texture.mTextureBlend, 1, AI_MATKEY_TEXBLEND(type, 0)); |
| 786 | |
| 787 | // Setup texture UV transformations |
| 788 | mat.AddProperty<ai_real>(&texture.mOffsetU, 5, AI_MATKEY_UVTRANSFORM(type, 0)); |
| 789 | } |
| 790 | |
| 791 | // ------------------------------------------------------------------------------------------------ |
| 792 | // Convert from ASE material to output material |
no test coverage detected