- add mFileExtensions field to aiImporterDesc, BaseImporter::GetExtensionList is now longer virtual since this would be redundant.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1234 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
aramis_acg
2012-04-22 22:26:26 +00:00
parent 93c3723da5
commit 5a81b42ebe
81 changed files with 1681 additions and 1176 deletions

View File

@@ -57,13 +57,25 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../include/assimp/mesh.h"
#include <vector>
static const aiImporterDesc desc = {
"Quake III BSP Importer",
"",
"",
"",
aiImporterFlags_SupportBinaryFlavour,
0,
0,
0,
0,
"pk3"
};
namespace Assimp
{
using namespace Q3BSP;
static const std::string Q3BSPExtension = "pk3";
// ------------------------------------------------------------------------------------------------
// Local function to create a material key name.
static void createKey( int id1, int id2, std::string &rKey )
@@ -161,7 +173,7 @@ Q3BSPFileImporter::~Q3BSPFileImporter()
bool Q3BSPFileImporter::CanRead( const std::string& rFile, IOSystem* /*pIOHandler*/, bool checkSig ) const
{
if(!checkSig) {
return SimpleExtensionCheck( rFile, Q3BSPExtension.c_str() );
return SimpleExtensionCheck( rFile, "pk3" );
}
// TODO perhaps add keyword based detection
return false;
@@ -169,9 +181,9 @@ bool Q3BSPFileImporter::CanRead( const std::string& rFile, IOSystem* /*pIOHandle
// ------------------------------------------------------------------------------------------------
// Adds extensions.
void Q3BSPFileImporter::GetExtensionList( std::set<std::string>& extensions )
const aiImporterDesc* Q3BSPFileImporter::GetInfo () const
{
extensions.insert( Q3BSPExtension );
return &desc;
}
// ------------------------------------------------------------------------------------------------