Merge pull request #573 from jaimemachado/master
Creating the functionality to list all Importer descriptions and the …pull/574/head
commit
9a9a121b2d
|
@ -423,6 +423,21 @@ const char* aiGetErrorString()
|
|||
return gLastErrorString.c_str();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------
|
||||
// Return the description of a importer given its index
|
||||
const aiImporterDesc* aiGetImportFormatDescription( size_t pIndex)
|
||||
{
|
||||
return Importer().GetImporterInfo(pIndex);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------------
|
||||
// Return the number of importers
|
||||
size_t aiGetImportFormatCount(void)
|
||||
{
|
||||
return Importer().GetImporterCount();
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Returns the error text of the last failed import process.
|
||||
aiBool aiIsExtensionSupported(const char* szExtension)
|
||||
|
|
|
@ -45,6 +45,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#ifndef AI_ASSIMP_H_INC
|
||||
#define AI_ASSIMP_H_INC
|
||||
#include "types.h"
|
||||
#include <assimp/importerdesc.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -539,7 +540,20 @@ ASSIMP_API void aiIdentityMatrix3(
|
|||
ASSIMP_API void aiIdentityMatrix4(
|
||||
C_STRUCT aiMatrix4x4* mat);
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
/** Returns the number of import file formats available in the current Assimp build.
|
||||
* Use aiGetImportFormatDescription() to retrieve infos of a specific import format.
|
||||
*/
|
||||
ASSIMP_API size_t aiGetImportFormatCount(void);
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
/** Returns a description of the nth import file format. Use #aiGetImportFormatCount()
|
||||
* to learn how many import formats are supported.
|
||||
* @param pIndex Index of the import format to retrieve information for. Valid range is
|
||||
* 0 to #aiGetImportFormatCount()
|
||||
* @return A description of that specific import format. NULL if pIndex is out of range.
|
||||
*/
|
||||
ASSIMP_API const C_STRUCT aiImporterDesc* aiGetImportFormatDescription( size_t pIndex);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -138,6 +138,6 @@ Will return a NULL-pointer if no assigned importer desc. was found for the given
|
|||
\param extension [in] The extension to look for
|
||||
\return A pointer showing to the ImporterDesc, \see aiImporterDesc.
|
||||
*/
|
||||
ASSIMP_API C_STRUCT const aiImporterDesc* aiGetImporterDesc( const char *extension );
|
||||
ASSIMP_API const C_STRUCT aiImporterDesc* aiGetImporterDesc( const char *extension );
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue