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