Missing material functions for aiUVTransform added

pull/261/head
Léo Terziman 2013-12-02 10:55:18 +01:00
parent d080eb493e
commit 7bc074857e
3 changed files with 30 additions and 0 deletions

View File

@ -247,6 +247,18 @@ aiReturn aiGetMaterialColor(const aiMaterial* pMat,
return eRet;
}
// ------------------------------------------------------------------------------------------------
// Get a aiUVTransform (4 floats) from the material
aiReturn aiGetMaterialUVTransform(const aiMaterial* pMat,
const char* pKey,
unsigned int type,
unsigned int index,
aiUVTransform* pOut)
{
unsigned int iMax = 4;
return aiGetMaterialFloatArray(pMat,pKey,type,index,(float*)pOut,&iMax);
}
// ------------------------------------------------------------------------------------------------
// Get a string from the material
aiReturn aiGetMaterialString(const aiMaterial* pMat,

View File

@ -1473,6 +1473,18 @@ ASSIMP_API C_ENUM aiReturn aiGetMaterialColor(const C_STRUCT aiMaterial* pMat,
C_STRUCT aiColor4D* pOut);
// ---------------------------------------------------------------------------
/** @brief Retrieve a aiUVTransform value from the material property table
*
* See the sample for aiGetMaterialFloat for more information*/
// ---------------------------------------------------------------------------
ASSIMP_API C_ENUM aiReturn aiGetMaterialUVTransform(const C_STRUCT aiMaterial* pMat,
const char* pKey,
unsigned int type,
unsigned int index,
C_STRUCT aiUVTransform* pOut);
// ---------------------------------------------------------------------------
/** @brief Retrieve a string from the material property table
*

View File

@ -167,6 +167,12 @@ inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
{
return aiGetMaterialString(this,pKey,type,idx,&pOut);
}
// ---------------------------------------------------------------------------
inline aiReturn aiMaterial::Get(const char* pKey,unsigned int type,
unsigned int idx,aiUVTransform& pOut) const
{
return aiGetMaterialUVTransform(this,pKey,type,idx,&pOut);
}
// ---------------------------------------------------------------------------