diff --git a/code/Assimp.cpp b/code/Assimp.cpp index 5eae9f8eb..8a61a903e 100644 --- a/code/Assimp.cpp +++ b/code/Assimp.cpp @@ -366,3 +366,16 @@ ASSIMP_API void aiSetImportPropertyString(const char* szName, SetGenericProperty(gStringProperties,szName, std::string( st->data ),NULL); } + +// ------------------------------------------------------------------------------------------------ +void aiCreateQuaternionFromMatrix(aiQuaternion* quat,const aiMatrix3x3* mat) +{ + *quat = aiQuaternion(*mat); +} + +// ------------------------------------------------------------------------------------------------ +void aiDecomposeMatrix(const aiMatrix4x4* mat, aiVector3D* scaling, + aiQuaternion* rotation,aiVector3D* position) +{ + mat->Decompose(*scaling,*rotation,*position); +} diff --git a/include/assimp.h b/include/assimp.h index 589158bfc..faf76ccfe 100644 --- a/include/assimp.h +++ b/include/assimp.h @@ -147,8 +147,8 @@ ASSIMP_API void aiGetExtensionList(C_STRUCT aiString* szOut); // --------------------------------------------------------------------------- /** Get the storage required by an imported asset - * \param pIn Input asset. - * \param in Data structure to be filled. + * @param pIn Input asset. + * @param in Data structure to be filled. */ // --------------------------------------------------------------------------- ASSIMP_API void aiGetMemoryRequirements(const C_STRUCT aiScene* pIn, @@ -160,24 +160,37 @@ ASSIMP_API void aiGetMemoryRequirements(const C_STRUCT aiScene* pIn, * #Assimp::Importer::SetPropertyInteger(). In the C-API properties are shared by * all imports. It is not possible to specify them per asset. * - * \param szName Name of the configuration property to be set. All constants + * @param szName Name of the configuration property to be set. All constants * are defined in the aiConfig.h header file. - * \param value New value for the property + * @param value New value for the property */ // --------------------------------------------------------------------------- ASSIMP_API void aiSetImportPropertyInteger(const char* szName, int value); // --------------------------------------------------------------------------- -/** @see aiSetImportPropertyInteger() +/** @see aiSetImportPropertyInteger() */ ASSIMP_API void aiSetImportPropertyFloat(const char* szName, float value); // --------------------------------------------------------------------------- -/** @see aiSetImportPropertyInteger() +/** @see aiSetImportPropertyInteger() */ ASSIMP_API void aiSetImportPropertyString(const char* szName, const C_STRUCT aiString* st); +// --------------------------------------------------------------------------- +/** @see aiQuaternion(const aiMatrix3x3& pRotMatrix) + */ +void aiCreateQuaternionFromMatrix(C_STRUCT aiQuaternion* quat,const C_STRUCT aiMatrix3x3* mat); + +// --------------------------------------------------------------------------- +/** @see aiMatrix4x4::Decompose (aiVector3D&, aiQuaternion&, aiVector3D&) const; + */ +void aiDecomposeMatrix(const C_STRUCT aiMatrix4x4* mat, + C_STRUCT aiVector3D* scaling, + C_STRUCT aiQuaternion* rotation, + C_STRUCT aiVector3D* position); + #ifdef __cplusplus }