mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-26 15:49:30 +00:00
update assimp to 5.2.3 Bugfix-Release
This commit is contained in:
parent
3f796d2a06
commit
f297476092
1150 changed files with 165834 additions and 112019 deletions
|
|
@ -3,8 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2019, assimp team
|
||||
|
||||
Copyright (c) 2006-2022, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -40,48 +39,50 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
---------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
// Actually just a dummy, used by the compiler to build the precompiled header.
|
||||
// Actually just a dummy, used by the compiler to build the pre-compiled header.
|
||||
|
||||
#include <assimp/version.h>
|
||||
#include <assimp/scene.h>
|
||||
#include "ScenePrivate.h"
|
||||
#include <assimp/scene.h>
|
||||
#include <assimp/version.h>
|
||||
|
||||
static const unsigned int MajorVersion = 5;
|
||||
static const unsigned int MinorVersion = 0;
|
||||
#include "revision.h"
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
// Legal information string - don't remove this.
|
||||
static const char* LEGAL_INFORMATION =
|
||||
|
||||
"Open Asset Import Library (Assimp).\n"
|
||||
"A free C/C++ library to import various 3D file formats into applications\n\n"
|
||||
|
||||
"(c) 2008-2020, assimp team\n"
|
||||
"License under the terms and conditions of the 3-clause BSD license\n"
|
||||
"https://github.com/assimp/assimp\n"
|
||||
;
|
||||
static const char *LEGAL_INFORMATION =
|
||||
"Open Asset Import Library (Assimp).\n"
|
||||
"A free C/C++ library to import various 3D file formats into applications\n\n"
|
||||
"(c) 2006-2022, Assimp team\n"
|
||||
"License under the terms and conditions of the 3-clause BSD license\n"
|
||||
"https://www.assimp.org\n";
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Get legal string
|
||||
ASSIMP_API const char* aiGetLegalString () {
|
||||
ASSIMP_API const char *aiGetLegalString() {
|
||||
return LEGAL_INFORMATION;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Get Assimp patch version
|
||||
ASSIMP_API unsigned int aiGetVersionPatch() {
|
||||
return VER_PATCH;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Get Assimp minor version
|
||||
ASSIMP_API unsigned int aiGetVersionMinor () {
|
||||
return MinorVersion;
|
||||
ASSIMP_API unsigned int aiGetVersionMinor() {
|
||||
return VER_MINOR;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Get Assimp major version
|
||||
ASSIMP_API unsigned int aiGetVersionMajor () {
|
||||
return MajorVersion;
|
||||
ASSIMP_API unsigned int aiGetVersionMajor() {
|
||||
return VER_MAJOR;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Get flags used for compilation
|
||||
ASSIMP_API unsigned int aiGetCompileFlags () {
|
||||
ASSIMP_API unsigned int aiGetCompileFlags() {
|
||||
|
||||
unsigned int flags = 0;
|
||||
|
||||
|
|
@ -100,41 +101,42 @@ ASSIMP_API unsigned int aiGetCompileFlags () {
|
|||
#ifdef _STLPORT_VERSION
|
||||
flags |= ASSIMP_CFLAGS_STLPORT;
|
||||
#endif
|
||||
#ifdef ASSIMP_DOUBLE_PRECISION
|
||||
flags |= ASSIMP_CFLAGS_DOUBLE_SUPPORT;
|
||||
#endif
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
// include current build revision, which is even updated from time to time -- :-)
|
||||
#include "revision.h"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
ASSIMP_API unsigned int aiGetVersionRevision() {
|
||||
return GitVersion;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
ASSIMP_API const char *aiGetBranchName() {
|
||||
return GitBranch;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
ASSIMP_API aiScene::aiScene()
|
||||
: mFlags(0)
|
||||
, mRootNode(nullptr)
|
||||
, mNumMeshes(0)
|
||||
, mMeshes(nullptr)
|
||||
, mNumMaterials(0)
|
||||
, mMaterials(nullptr)
|
||||
, mNumAnimations(0)
|
||||
, mAnimations(nullptr)
|
||||
, mNumTextures(0)
|
||||
, mTextures(nullptr)
|
||||
, mNumLights(0)
|
||||
, mLights(nullptr)
|
||||
, mNumCameras(0)
|
||||
, mCameras(nullptr)
|
||||
, mMetaData(nullptr)
|
||||
, mPrivate(new Assimp::ScenePrivateData()) {
|
||||
// empty
|
||||
ASSIMP_API aiScene::aiScene() :
|
||||
mFlags(0),
|
||||
mRootNode(nullptr),
|
||||
mNumMeshes(0),
|
||||
mMeshes(nullptr),
|
||||
mNumMaterials(0),
|
||||
mMaterials(nullptr),
|
||||
mNumAnimations(0),
|
||||
mAnimations(nullptr),
|
||||
mNumTextures(0),
|
||||
mTextures(nullptr),
|
||||
mNumLights(0),
|
||||
mLights(nullptr),
|
||||
mNumCameras(0),
|
||||
mCameras(nullptr),
|
||||
mMetaData(nullptr),
|
||||
mPrivate(new Assimp::ScenePrivateData()) {
|
||||
// empty
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
@ -146,40 +148,39 @@ ASSIMP_API aiScene::~aiScene() {
|
|||
// much better to check whether both mNumXXX and mXXX are
|
||||
// valid instead of relying on just one of them.
|
||||
if (mNumMeshes && mMeshes)
|
||||
for( unsigned int a = 0; a < mNumMeshes; a++)
|
||||
for (unsigned int a = 0; a < mNumMeshes; a++)
|
||||
delete mMeshes[a];
|
||||
delete [] mMeshes;
|
||||
delete[] mMeshes;
|
||||
|
||||
if (mNumMaterials && mMaterials) {
|
||||
for (unsigned int a = 0; a < mNumMaterials; ++a ) {
|
||||
delete mMaterials[ a ];
|
||||
for (unsigned int a = 0; a < mNumMaterials; ++a) {
|
||||
delete mMaterials[a];
|
||||
}
|
||||
}
|
||||
delete [] mMaterials;
|
||||
delete[] mMaterials;
|
||||
|
||||
if (mNumAnimations && mAnimations)
|
||||
for( unsigned int a = 0; a < mNumAnimations; a++)
|
||||
for (unsigned int a = 0; a < mNumAnimations; a++)
|
||||
delete mAnimations[a];
|
||||
delete [] mAnimations;
|
||||
delete[] mAnimations;
|
||||
|
||||
if (mNumTextures && mTextures)
|
||||
for( unsigned int a = 0; a < mNumTextures; a++)
|
||||
for (unsigned int a = 0; a < mNumTextures; a++)
|
||||
delete mTextures[a];
|
||||
delete [] mTextures;
|
||||
delete[] mTextures;
|
||||
|
||||
if (mNumLights && mLights)
|
||||
for( unsigned int a = 0; a < mNumLights; a++)
|
||||
for (unsigned int a = 0; a < mNumLights; a++)
|
||||
delete mLights[a];
|
||||
delete [] mLights;
|
||||
delete[] mLights;
|
||||
|
||||
if (mNumCameras && mCameras)
|
||||
for( unsigned int a = 0; a < mNumCameras; a++)
|
||||
for (unsigned int a = 0; a < mNumCameras; a++)
|
||||
delete mCameras[a];
|
||||
delete [] mCameras;
|
||||
delete[] mCameras;
|
||||
|
||||
aiMetadata::Dealloc(mMetaData);
|
||||
mMetaData = nullptr;
|
||||
|
||||
delete static_cast<Assimp::ScenePrivateData*>( mPrivate );
|
||||
delete static_cast<Assimp::ScenePrivateData *>(mPrivate);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue