vrshoot

annotate libs/assimp/AssimpPCH.cpp @ 0:b2f14e535253

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 01 Feb 2014 19:58:19 +0200
parents
children
rev   line source
nuclear@0 1
nuclear@0 2 // Actually just a dummy, used by the compiler to build the precompiled header.
nuclear@0 3
nuclear@0 4 #include "AssimpPCH.h"
nuclear@0 5 #include "assimp/version.h"
nuclear@0 6
nuclear@0 7 // --------------------------------------------------------------------------------
nuclear@0 8 // Legal information string - dont't remove this.
nuclear@0 9 static const char* LEGAL_INFORMATION =
nuclear@0 10
nuclear@0 11 "Open Asset Import Library (Assimp).\n"
nuclear@0 12 "A free C/C++ library to import various 3D file formats into applications\n\n"
nuclear@0 13
nuclear@0 14 "(c) 2008-2010, assimp team\n"
nuclear@0 15 "License under the terms and conditions of the 3-clause BSD license\n"
nuclear@0 16 "http://assimp.sourceforge.net\n"
nuclear@0 17 ;
nuclear@0 18
nuclear@0 19 // ------------------------------------------------------------------------------------------------
nuclear@0 20 // Get legal string
nuclear@0 21 ASSIMP_API const char* aiGetLegalString () {
nuclear@0 22 return LEGAL_INFORMATION;
nuclear@0 23 }
nuclear@0 24
nuclear@0 25 // ------------------------------------------------------------------------------------------------
nuclear@0 26 // Get Assimp minor version
nuclear@0 27 ASSIMP_API unsigned int aiGetVersionMinor () {
nuclear@0 28 return 0;
nuclear@0 29 }
nuclear@0 30
nuclear@0 31 // ------------------------------------------------------------------------------------------------
nuclear@0 32 // Get Assimp major version
nuclear@0 33 ASSIMP_API unsigned int aiGetVersionMajor () {
nuclear@0 34 return 3;
nuclear@0 35 }
nuclear@0 36
nuclear@0 37 // ------------------------------------------------------------------------------------------------
nuclear@0 38 // Get flags used for compilation
nuclear@0 39 ASSIMP_API unsigned int aiGetCompileFlags () {
nuclear@0 40
nuclear@0 41 unsigned int flags = 0;
nuclear@0 42
nuclear@0 43 #ifdef ASSIMP_BUILD_BOOST_WORKAROUND
nuclear@0 44 flags |= ASSIMP_CFLAGS_NOBOOST;
nuclear@0 45 #endif
nuclear@0 46 #ifdef ASSIMP_BUILD_SINGLETHREADED
nuclear@0 47 flags |= ASSIMP_CFLAGS_SINGLETHREADED;
nuclear@0 48 #endif
nuclear@0 49 #ifdef ASSIMP_BUILD_DEBUG
nuclear@0 50 flags |= ASSIMP_CFLAGS_DEBUG;
nuclear@0 51 #endif
nuclear@0 52 #ifdef ASSIMP_BUILD_DLL_EXPORT
nuclear@0 53 flags |= ASSIMP_CFLAGS_SHARED;
nuclear@0 54 #endif
nuclear@0 55 #ifdef _STLPORT_VERSION
nuclear@0 56 flags |= ASSIMP_CFLAGS_STLPORT;
nuclear@0 57 #endif
nuclear@0 58
nuclear@0 59 return flags;
nuclear@0 60 }
nuclear@0 61
nuclear@0 62 // include current build revision, which is even updated from time to time -- :-)
nuclear@0 63 #include "revision.h"
nuclear@0 64
nuclear@0 65 // ------------------------------------------------------------------------------------------------
nuclear@0 66 ASSIMP_API unsigned int aiGetVersionRevision ()
nuclear@0 67 {
nuclear@0 68 return SVNRevision;
nuclear@0 69 }
nuclear@0 70
nuclear@0 71 // ------------------------------------------------------------------------------------------------
nuclear@0 72 aiScene::aiScene()
nuclear@0 73 : mFlags()
nuclear@0 74 , mRootNode()
nuclear@0 75 , mNumMeshes()
nuclear@0 76 , mMeshes()
nuclear@0 77 , mNumMaterials()
nuclear@0 78 , mMaterials()
nuclear@0 79 , mNumAnimations()
nuclear@0 80 , mAnimations()
nuclear@0 81 , mNumTextures()
nuclear@0 82 , mTextures()
nuclear@0 83 , mNumLights()
nuclear@0 84 , mLights()
nuclear@0 85 , mNumCameras()
nuclear@0 86 , mCameras()
nuclear@0 87 , mPrivate(new Assimp::ScenePrivateData())
nuclear@0 88 {
nuclear@0 89 }
nuclear@0 90
nuclear@0 91 // ------------------------------------------------------------------------------------------------
nuclear@0 92 aiScene::~aiScene()
nuclear@0 93 {
nuclear@0 94 // delete all sub-objects recursively
nuclear@0 95 delete mRootNode;
nuclear@0 96
nuclear@0 97 // To make sure we won't crash if the data is invalid it's
nuclear@0 98 // much better to check whether both mNumXXX and mXXX are
nuclear@0 99 // valid instead of relying on just one of them.
nuclear@0 100 if (mNumMeshes && mMeshes)
nuclear@0 101 for( unsigned int a = 0; a < mNumMeshes; a++)
nuclear@0 102 delete mMeshes[a];
nuclear@0 103 delete [] mMeshes;
nuclear@0 104
nuclear@0 105 if (mNumMaterials && mMaterials)
nuclear@0 106 for( unsigned int a = 0; a < mNumMaterials; a++)
nuclear@0 107 delete mMaterials[a];
nuclear@0 108 delete [] mMaterials;
nuclear@0 109
nuclear@0 110 if (mNumAnimations && mAnimations)
nuclear@0 111 for( unsigned int a = 0; a < mNumAnimations; a++)
nuclear@0 112 delete mAnimations[a];
nuclear@0 113 delete [] mAnimations;
nuclear@0 114
nuclear@0 115 if (mNumTextures && mTextures)
nuclear@0 116 for( unsigned int a = 0; a < mNumTextures; a++)
nuclear@0 117 delete mTextures[a];
nuclear@0 118 delete [] mTextures;
nuclear@0 119
nuclear@0 120 if (mNumLights && mLights)
nuclear@0 121 for( unsigned int a = 0; a < mNumLights; a++)
nuclear@0 122 delete mLights[a];
nuclear@0 123 delete [] mLights;
nuclear@0 124
nuclear@0 125 if (mNumCameras && mCameras)
nuclear@0 126 for( unsigned int a = 0; a < mNumCameras; a++)
nuclear@0 127 delete mCameras[a];
nuclear@0 128 delete [] mCameras;
nuclear@0 129
nuclear@0 130 delete static_cast<Assimp::ScenePrivateData*>( mPrivate );
nuclear@0 131 }
nuclear@0 132