Added matrix properties

This commit is contained in:
Léo Terziman
2014-02-28 15:21:10 +01:00
parent b90718bd21
commit 843e56c252
6 changed files with 78 additions and 3 deletions

View File

@@ -197,6 +197,7 @@ Importer::Importer(const Importer &other)
pimpl->mIntProperties = other.pimpl->mIntProperties;
pimpl->mFloatProperties = other.pimpl->mFloatProperties;
pimpl->mStringProperties = other.pimpl->mStringProperties;
pimpl->mMatrixProperties = other.pimpl->mMatrixProperties;
}
// ------------------------------------------------------------------------------------------------
@@ -937,6 +938,16 @@ void Importer::SetPropertyString(const char* szName, const std::string& value,
ASSIMP_END_EXCEPTION_REGION(void);
}
// ------------------------------------------------------------------------------------------------
// Set a configuration property
void Importer::SetPropertyMatrix(const char* szName, const aiMatrix4x4& value,
bool* bWasExisting /*= NULL*/)
{
ASSIMP_BEGIN_EXCEPTION_REGION();
SetGenericProperty<aiMatrix4x4>(pimpl->mMatrixProperties, szName,value,bWasExisting);
ASSIMP_END_EXCEPTION_REGION(void);
}
// ------------------------------------------------------------------------------------------------
// Get a configuration property
int Importer::GetPropertyInteger(const char* szName,
@@ -961,6 +972,14 @@ const std::string& Importer::GetPropertyString(const char* szName,
return GetGenericProperty<std::string>(pimpl->mStringProperties,szName,iErrorReturn);
}
// ------------------------------------------------------------------------------------------------
// Get a configuration property
const aiMatrix4x4& Importer::GetPropertyMatrix(const char* szName,
const aiMatrix4x4& iErrorReturn /*= aiMatrix4x4()*/) const
{
return GetGenericProperty<aiMatrix4x4>(pimpl->mMatrixProperties,szName,iErrorReturn);
}
// ------------------------------------------------------------------------------------------------
// Get the memory requirements of a single node
inline void AddNodeWeight(unsigned int& iScene,const aiNode* pcNode)