Fixed illumination model conversion in the OBJ loader.

Added map_d support to obj.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@332 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
aramis_acg
2009-02-05 18:13:34 +00:00
parent ec9226c5b9
commit 4048eb92f5
4 changed files with 37 additions and 4 deletions

View File

@@ -141,7 +141,8 @@ void ObjFileMtlImporter::load()
getFloatValue(m_pModel->m_pCurrentMaterial->shineness);
break;
case 'i': //Index Of refraction
//TODO
++m_DataIt;
getFloatValue(m_pModel->m_pCurrentMaterial->ior);
break;
}
m_DataIt = skipLine<DataArrayIt>( m_DataIt, m_DataItEnd, m_uiLine );
@@ -260,6 +261,10 @@ void ObjFileMtlImporter::getTexture()
else if (!ASSIMP_strincmp(&(*m_DataIt),"map_ks",6))
out = & m_pModel->m_pCurrentMaterial->textureSpecular;
// Opacity texture
else if (!ASSIMP_strincmp(&(*m_DataIt),"map_d",5))
out = & m_pModel->m_pCurrentMaterial->textureOpacity;
// Ambient texture
else if (!ASSIMP_strincmp(&(*m_DataIt),"map_ka",6))
out = & m_pModel->m_pCurrentMaterial->textureAmbient;