nuclear@0: nuclear@0: // Actually just a dummy, used by the compiler to build the precompiled header. nuclear@0: nuclear@0: #include "AssimpPCH.h" nuclear@0: #include "assimp/version.h" nuclear@0: nuclear@0: // -------------------------------------------------------------------------------- nuclear@0: // Legal information string - dont't remove this. nuclear@0: static const char* LEGAL_INFORMATION = nuclear@0: nuclear@0: "Open Asset Import Library (Assimp).\n" nuclear@0: "A free C/C++ library to import various 3D file formats into applications\n\n" nuclear@0: nuclear@0: "(c) 2008-2010, assimp team\n" nuclear@0: "License under the terms and conditions of the 3-clause BSD license\n" nuclear@0: "http://assimp.sourceforge.net\n" nuclear@0: ; nuclear@0: nuclear@0: // ------------------------------------------------------------------------------------------------ nuclear@0: // Get legal string nuclear@0: ASSIMP_API const char* aiGetLegalString () { nuclear@0: return LEGAL_INFORMATION; nuclear@0: } nuclear@0: nuclear@0: // ------------------------------------------------------------------------------------------------ nuclear@0: // Get Assimp minor version nuclear@0: ASSIMP_API unsigned int aiGetVersionMinor () { nuclear@0: return 0; nuclear@0: } nuclear@0: nuclear@0: // ------------------------------------------------------------------------------------------------ nuclear@0: // Get Assimp major version nuclear@0: ASSIMP_API unsigned int aiGetVersionMajor () { nuclear@0: return 3; nuclear@0: } nuclear@0: nuclear@0: // ------------------------------------------------------------------------------------------------ nuclear@0: // Get flags used for compilation nuclear@0: ASSIMP_API unsigned int aiGetCompileFlags () { nuclear@0: nuclear@0: unsigned int flags = 0; nuclear@0: nuclear@0: #ifdef ASSIMP_BUILD_BOOST_WORKAROUND nuclear@0: flags |= ASSIMP_CFLAGS_NOBOOST; nuclear@0: #endif nuclear@0: #ifdef ASSIMP_BUILD_SINGLETHREADED nuclear@0: flags |= ASSIMP_CFLAGS_SINGLETHREADED; nuclear@0: #endif nuclear@0: #ifdef ASSIMP_BUILD_DEBUG nuclear@0: flags |= ASSIMP_CFLAGS_DEBUG; nuclear@0: #endif nuclear@0: #ifdef ASSIMP_BUILD_DLL_EXPORT nuclear@0: flags |= ASSIMP_CFLAGS_SHARED; nuclear@0: #endif nuclear@0: #ifdef _STLPORT_VERSION nuclear@0: flags |= ASSIMP_CFLAGS_STLPORT; nuclear@0: #endif nuclear@0: nuclear@0: return flags; nuclear@0: } nuclear@0: nuclear@0: // include current build revision, which is even updated from time to time -- :-) nuclear@0: #include "revision.h" nuclear@0: nuclear@0: // ------------------------------------------------------------------------------------------------ nuclear@0: ASSIMP_API unsigned int aiGetVersionRevision () nuclear@0: { nuclear@0: return SVNRevision; nuclear@0: } nuclear@0: nuclear@0: // ------------------------------------------------------------------------------------------------ nuclear@0: aiScene::aiScene() nuclear@0: : mFlags() nuclear@0: , mRootNode() nuclear@0: , mNumMeshes() nuclear@0: , mMeshes() nuclear@0: , mNumMaterials() nuclear@0: , mMaterials() nuclear@0: , mNumAnimations() nuclear@0: , mAnimations() nuclear@0: , mNumTextures() nuclear@0: , mTextures() nuclear@0: , mNumLights() nuclear@0: , mLights() nuclear@0: , mNumCameras() nuclear@0: , mCameras() nuclear@0: , mPrivate(new Assimp::ScenePrivateData()) nuclear@0: { nuclear@0: } nuclear@0: nuclear@0: // ------------------------------------------------------------------------------------------------ nuclear@0: aiScene::~aiScene() nuclear@0: { nuclear@0: // delete all sub-objects recursively nuclear@0: delete mRootNode; nuclear@0: nuclear@0: // To make sure we won't crash if the data is invalid it's nuclear@0: // much better to check whether both mNumXXX and mXXX are nuclear@0: // valid instead of relying on just one of them. nuclear@0: if (mNumMeshes && mMeshes) nuclear@0: for( unsigned int a = 0; a < mNumMeshes; a++) nuclear@0: delete mMeshes[a]; nuclear@0: delete [] mMeshes; nuclear@0: nuclear@0: if (mNumMaterials && mMaterials) nuclear@0: for( unsigned int a = 0; a < mNumMaterials; a++) nuclear@0: delete mMaterials[a]; nuclear@0: delete [] mMaterials; nuclear@0: nuclear@0: if (mNumAnimations && mAnimations) nuclear@0: for( unsigned int a = 0; a < mNumAnimations; a++) nuclear@0: delete mAnimations[a]; nuclear@0: delete [] mAnimations; nuclear@0: nuclear@0: if (mNumTextures && mTextures) nuclear@0: for( unsigned int a = 0; a < mNumTextures; a++) nuclear@0: delete mTextures[a]; nuclear@0: delete [] mTextures; nuclear@0: nuclear@0: if (mNumLights && mLights) nuclear@0: for( unsigned int a = 0; a < mNumLights; a++) nuclear@0: delete mLights[a]; nuclear@0: delete [] mLights; nuclear@0: nuclear@0: if (mNumCameras && mCameras) nuclear@0: for( unsigned int a = 0; a < mNumCameras; a++) nuclear@0: delete mCameras[a]; nuclear@0: delete [] mCameras; nuclear@0: nuclear@0: delete static_cast( mPrivate ); nuclear@0: } nuclear@0: