Initiual commit: AssetImporter source moved from ZFXCE repository to its own repository. PLease do not use the ZFXCE repo any more.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
kimmi
2008-05-05 12:36:31 +00:00
commit b76f999cb7
131 changed files with 24989 additions and 0 deletions

45
code/BaseImporter.cpp Normal file
View File

@@ -0,0 +1,45 @@
/** @file Implementation of the few default functions of the base importer class */
#include "BaseImporter.h"
#include "../include/aiScene.h"
#include "aiAssert.h"
using namespace Assimp;
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
BaseImporter::BaseImporter()
{
// nothing to do here
}
// ------------------------------------------------------------------------------------------------
// Destructor, private as well
BaseImporter::~BaseImporter()
{
// nothing to do here
}
// ------------------------------------------------------------------------------------------------
// Imports the given file and returns the imported data.
aiScene* BaseImporter::ReadFile( const std::string& pFile, IOSystem* pIOHandler)
{
// create a scene object to hold the data
aiScene* scene = new aiScene;
// dispatch importing
try
{
InternReadFile( pFile, scene, pIOHandler);
} catch( ImportErrorException* exception)
{
// extract error description
mErrorText = exception->GetErrorText();
delete exception;
// and kill the partially imported data
delete scene;
scene = NULL;
}
// return what we gathered from the import.
return scene;
}