vrshoot

diff 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
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/libs/assimp/AssimpPCH.cpp	Sat Feb 01 19:58:19 2014 +0200
     1.3 @@ -0,0 +1,132 @@
     1.4 +
     1.5 +// Actually just a dummy, used by the compiler to build the precompiled header.
     1.6 +
     1.7 +#include "AssimpPCH.h"
     1.8 +#include "assimp/version.h"
     1.9 +
    1.10 +// --------------------------------------------------------------------------------
    1.11 +// Legal information string - dont't remove this.
    1.12 +static const char* LEGAL_INFORMATION =
    1.13 +
    1.14 +"Open Asset Import Library (Assimp).\n"
    1.15 +"A free C/C++ library to import various 3D file formats into applications\n\n"
    1.16 +
    1.17 +"(c) 2008-2010, assimp team\n"
    1.18 +"License under the terms and conditions of the 3-clause BSD license\n"
    1.19 +"http://assimp.sourceforge.net\n"
    1.20 +;
    1.21 +
    1.22 +// ------------------------------------------------------------------------------------------------
    1.23 +// Get legal string
    1.24 +ASSIMP_API const char*  aiGetLegalString  ()	{
    1.25 +	return LEGAL_INFORMATION;
    1.26 +}
    1.27 +
    1.28 +// ------------------------------------------------------------------------------------------------
    1.29 +// Get Assimp minor version
    1.30 +ASSIMP_API unsigned int aiGetVersionMinor ()	{
    1.31 +	return 0;
    1.32 +}
    1.33 +
    1.34 +// ------------------------------------------------------------------------------------------------
    1.35 +// Get Assimp major version
    1.36 +ASSIMP_API unsigned int aiGetVersionMajor ()	{
    1.37 +	return 3;
    1.38 +}
    1.39 +
    1.40 +// ------------------------------------------------------------------------------------------------
    1.41 +// Get flags used for compilation
    1.42 +ASSIMP_API unsigned int aiGetCompileFlags ()	{
    1.43 +
    1.44 +	unsigned int flags = 0;
    1.45 +
    1.46 +#ifdef ASSIMP_BUILD_BOOST_WORKAROUND
    1.47 +	flags |= ASSIMP_CFLAGS_NOBOOST;
    1.48 +#endif
    1.49 +#ifdef ASSIMP_BUILD_SINGLETHREADED
    1.50 +	flags |= ASSIMP_CFLAGS_SINGLETHREADED;
    1.51 +#endif
    1.52 +#ifdef ASSIMP_BUILD_DEBUG
    1.53 +	flags |= ASSIMP_CFLAGS_DEBUG;
    1.54 +#endif
    1.55 +#ifdef ASSIMP_BUILD_DLL_EXPORT
    1.56 +	flags |= ASSIMP_CFLAGS_SHARED;
    1.57 +#endif
    1.58 +#ifdef _STLPORT_VERSION
    1.59 +	flags |= ASSIMP_CFLAGS_STLPORT;
    1.60 +#endif
    1.61 +
    1.62 +	return flags;
    1.63 +}
    1.64 +
    1.65 +// include current build revision, which is even updated from time to time -- :-)
    1.66 +#include "revision.h"
    1.67 +
    1.68 +// ------------------------------------------------------------------------------------------------
    1.69 +ASSIMP_API unsigned int aiGetVersionRevision ()
    1.70 +{
    1.71 +	return SVNRevision;
    1.72 +}
    1.73 +
    1.74 +// ------------------------------------------------------------------------------------------------
    1.75 +aiScene::aiScene()
    1.76 +	: mFlags()
    1.77 +	, mRootNode()
    1.78 +	, mNumMeshes()
    1.79 +	, mMeshes()
    1.80 +	, mNumMaterials()
    1.81 +	, mMaterials()
    1.82 +	, mNumAnimations()
    1.83 +	, mAnimations()
    1.84 +	, mNumTextures()
    1.85 +	, mTextures()
    1.86 +	, mNumLights()
    1.87 +	, mLights()
    1.88 +	, mNumCameras()
    1.89 +	, mCameras()
    1.90 +	, mPrivate(new Assimp::ScenePrivateData())
    1.91 +	{
    1.92 +	}
    1.93 +
    1.94 +// ------------------------------------------------------------------------------------------------
    1.95 +aiScene::~aiScene()
    1.96 +{
    1.97 +	// delete all sub-objects recursively
    1.98 +	delete mRootNode;
    1.99 +
   1.100 +	// To make sure we won't crash if the data is invalid it's
   1.101 +	// much better to check whether both mNumXXX and mXXX are
   1.102 +	// valid instead of relying on just one of them.
   1.103 +	if (mNumMeshes && mMeshes) 
   1.104 +		for( unsigned int a = 0; a < mNumMeshes; a++)
   1.105 +			delete mMeshes[a];
   1.106 +	delete [] mMeshes;
   1.107 +
   1.108 +	if (mNumMaterials && mMaterials) 
   1.109 +		for( unsigned int a = 0; a < mNumMaterials; a++)
   1.110 +			delete mMaterials[a];
   1.111 +	delete [] mMaterials;
   1.112 +
   1.113 +	if (mNumAnimations && mAnimations) 
   1.114 +		for( unsigned int a = 0; a < mNumAnimations; a++)
   1.115 +			delete mAnimations[a];
   1.116 +	delete [] mAnimations;
   1.117 +
   1.118 +	if (mNumTextures && mTextures) 
   1.119 +		for( unsigned int a = 0; a < mNumTextures; a++)
   1.120 +			delete mTextures[a];
   1.121 +	delete [] mTextures;
   1.122 +
   1.123 +	if (mNumLights && mLights) 
   1.124 +		for( unsigned int a = 0; a < mNumLights; a++)
   1.125 +			delete mLights[a];
   1.126 +	delete [] mLights;
   1.127 +
   1.128 +	if (mNumCameras && mCameras) 
   1.129 +		for( unsigned int a = 0; a < mNumCameras; a++)
   1.130 +			delete mCameras[a];
   1.131 +	delete [] mCameras;
   1.132 +
   1.133 +	delete static_cast<Assimp::ScenePrivateData*>( mPrivate );
   1.134 +}
   1.135 +