mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 22:54:34 +00:00
update assimp to 6.0.5
This commit is contained in:
parent
2d2eb57e2e
commit
f5cf21cfeb
941 changed files with 22718 additions and 12240 deletions
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -67,13 +67,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
using namespace Assimp;
|
||||
|
||||
namespace Assimp {
|
||||
|
||||
// underlying structure for aiPropertyStore
|
||||
typedef BatchLoader::PropertyMap PropertyMap;
|
||||
using PropertyMap = BatchLoader::PropertyMap ;
|
||||
|
||||
#if defined(__has_warning)
|
||||
#if __has_warning("-Wordered-compare-function-pointers")
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wordered-compare-function-pointers"
|
||||
# if __has_warning("-Wordered-compare-function-pointers")
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wordered-compare-function-pointers"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
@ -111,6 +112,7 @@ void GetImporterInstanceList(std::vector<BaseImporter *> &out);
|
|||
|
||||
/** will delete all registered importers. */
|
||||
void DeleteImporterInstanceList(std::vector<BaseImporter *> &out);
|
||||
|
||||
} // namespace Assimp
|
||||
|
||||
#ifndef ASSIMP_BUILD_SINGLETHREADED
|
||||
|
|
@ -120,14 +122,14 @@ static std::mutex gLogStreamMutex;
|
|||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Custom LogStream implementation for the C-API
|
||||
class LogToCallbackRedirector : public LogStream {
|
||||
class LogToCallbackRedirector final : public LogStream {
|
||||
public:
|
||||
explicit LogToCallbackRedirector(const aiLogStream &s) :
|
||||
stream(s) {
|
||||
mStream(s) {
|
||||
ai_assert(nullptr != s.callback);
|
||||
}
|
||||
|
||||
~LogToCallbackRedirector() {
|
||||
~LogToCallbackRedirector() override {
|
||||
#ifndef ASSIMP_BUILD_SINGLETHREADED
|
||||
std::lock_guard<std::mutex> lock(gLogStreamMutex);
|
||||
#endif
|
||||
|
|
@ -137,7 +139,7 @@ public:
|
|||
// might cause strange problems, but the chance is quite low.
|
||||
|
||||
PredefLogStreamMap::iterator it = std::find(gPredefinedStreams.begin(),
|
||||
gPredefinedStreams.end(), (Assimp::LogStream *)stream.user);
|
||||
gPredefinedStreams.end(), (Assimp::LogStream *)mStream.user);
|
||||
|
||||
if (it != gPredefinedStreams.end()) {
|
||||
delete *it;
|
||||
|
|
@ -146,12 +148,12 @@ public:
|
|||
}
|
||||
|
||||
/** @copydoc LogStream::write */
|
||||
void write(const char *message) {
|
||||
stream.callback(message, stream.user);
|
||||
void write(const char *message) override {
|
||||
mStream.callback(message, mStream.user);
|
||||
}
|
||||
|
||||
private:
|
||||
aiLogStream stream;
|
||||
const aiLogStream &mStream;
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
@ -354,9 +356,10 @@ ASSIMP_API const aiScene *aiApplyCustomizedPostProcessing(const aiScene *scene,
|
|||
void CallbackToLogRedirector(const char *msg, char *dt) {
|
||||
ai_assert(nullptr != msg);
|
||||
ai_assert(nullptr != dt);
|
||||
LogStream *s = (LogStream *)dt;
|
||||
|
||||
s->write(msg);
|
||||
LogStream *stream = (LogStream *)dt;
|
||||
if (stream != nullptr) {
|
||||
stream->write(msg);
|
||||
}
|
||||
}
|
||||
|
||||
static LogStream *DefaultStream = nullptr;
|
||||
|
|
@ -369,7 +372,7 @@ ASSIMP_API aiLogStream aiGetPredefinedLogStream(aiDefaultLogStream pStream, cons
|
|||
if (DefaultStream == nullptr) {
|
||||
DefaultStream = LogStream::createDefaultStream(pStream, file);
|
||||
}
|
||||
|
||||
|
||||
if (!DefaultStream) {
|
||||
sout.callback = nullptr;
|
||||
sout.user = nullptr;
|
||||
|
|
@ -416,6 +419,10 @@ ASSIMP_API aiReturn aiDetachLogStream(const aiLogStream *stream) {
|
|||
DefaultLogger::get()->detachStream(it->second);
|
||||
delete it->second;
|
||||
|
||||
if ((Assimp::LogStream *)stream->user == DefaultStream) {
|
||||
DefaultStream = nullptr;
|
||||
}
|
||||
|
||||
gActiveLogStreams.erase(it);
|
||||
|
||||
if (gActiveLogStreams.empty()) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -375,6 +375,9 @@ void BaseImporter::ConvertToUTF8(std::vector<char> &data) {
|
|||
|
||||
// UTF 32 BE with BOM
|
||||
if (*((uint32_t *)&data.front()) == 0xFFFE0000) {
|
||||
if (data.size() % sizeof(uint32_t) != 0) {
|
||||
throw DeadlyImportError("Not valid UTF-32 BE");
|
||||
}
|
||||
|
||||
// swap the endianness ..
|
||||
for (uint32_t *p = (uint32_t *)&data.front(), *end = (uint32_t *)&data.back(); p <= end; ++p) {
|
||||
|
|
@ -384,11 +387,14 @@ void BaseImporter::ConvertToUTF8(std::vector<char> &data) {
|
|||
|
||||
// UTF 32 LE with BOM
|
||||
if (*((uint32_t *)&data.front()) == 0x0000FFFE) {
|
||||
if (data.size() % sizeof(uint32_t) != 0) {
|
||||
throw DeadlyImportError("Not valid UTF-32 LE");
|
||||
}
|
||||
ASSIMP_LOG_DEBUG("Found UTF-32 BOM ...");
|
||||
|
||||
std::vector<char> output;
|
||||
int *ptr = (int *)&data[0];
|
||||
int *end = ptr + (data.size() / sizeof(int)) + 1;
|
||||
auto *ptr = (uint32_t *)&data[0];
|
||||
uint32_t *end = ptr + (data.size() / sizeof(uint32_t)) + 1;
|
||||
utf8::utf32to8(ptr, end, back_inserter(output));
|
||||
return;
|
||||
}
|
||||
|
|
@ -396,8 +402,8 @@ void BaseImporter::ConvertToUTF8(std::vector<char> &data) {
|
|||
// UTF 16 BE with BOM
|
||||
if (*((uint16_t *)&data.front()) == 0xFFFE) {
|
||||
// Check to ensure no overflow can happen
|
||||
if(data.size() % 2 != 0) {
|
||||
return;
|
||||
if (data.size() % sizeof(uint16_t) != 0) {
|
||||
throw DeadlyImportError("Not valid UTF-16 BE");
|
||||
}
|
||||
// swap the endianness ..
|
||||
for (uint16_t *p = (uint16_t *)&data.front(), *end = (uint16_t *)&data.back(); p <= end; ++p) {
|
||||
|
|
@ -407,6 +413,9 @@ void BaseImporter::ConvertToUTF8(std::vector<char> &data) {
|
|||
|
||||
// UTF 16 LE with BOM
|
||||
if (*((uint16_t *)&data.front()) == 0xFEFF) {
|
||||
if (data.size() % sizeof(uint16_t) != 0) {
|
||||
throw DeadlyImportError("Not valid UTF-16 LE");
|
||||
}
|
||||
ASSIMP_LOG_DEBUG("Found UTF-16 BOM ...");
|
||||
|
||||
std::vector<unsigned char> output;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -68,11 +68,11 @@ public:
|
|||
|
||||
//! Represents data that is allocated on the heap, thus needs to be deleted
|
||||
template <typename T>
|
||||
struct THeapData : public Base {
|
||||
struct THeapData final : Base {
|
||||
explicit THeapData(T *in) :
|
||||
data(in) {}
|
||||
|
||||
~THeapData() {
|
||||
~THeapData() override {
|
||||
delete data;
|
||||
}
|
||||
T *data;
|
||||
|
|
@ -80,11 +80,11 @@ public:
|
|||
|
||||
//! Represents static, by-value data not allocated on the heap
|
||||
template <typename T>
|
||||
struct TStaticData : public Base {
|
||||
struct TStaticData final : Base {
|
||||
explicit TStaticData(T in) :
|
||||
data(in) {}
|
||||
|
||||
~TStaticData() = default;
|
||||
~TStaticData() override= default;
|
||||
|
||||
T data;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Open Asset Import Library (assimp)
|
|||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (C) 2016 The Qt Company Ltd.
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
#include <assimp/CreateAnimMesh.h>
|
||||
|
||||
namespace Assimp {
|
||||
namespace Assimp {
|
||||
|
||||
aiAnimMesh *aiCreateAnimMesh(const aiMesh *mesh, bool needPositions, bool needNormals, bool needTangents, bool needColors, bool needTexCoords)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -157,9 +157,9 @@ size_t DefaultIOStream::FileSize() const {
|
|||
return 0;
|
||||
mCachedSize = (size_t)(fileStat.st_size);
|
||||
#elif defined _WIN32
|
||||
struct _stat32 fileStat;
|
||||
struct _stat fileStat;
|
||||
//using fileno + fstat avoids having to handle the filename
|
||||
int err = _fstat32(_fileno(mFile), &fileStat);
|
||||
int err = _fstat(_fileno(mFile), &fileStat);
|
||||
if (0 != err)
|
||||
return 0;
|
||||
mCachedSize = (size_t)(fileStat.st_size);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ bool DefaultIOSystem::Exists(const char *pFile) const {
|
|||
if (pFile == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
struct __stat64 filestat;
|
||||
if (_wstat64(Utf8ToWide(pFile).c_str(), &filestat) != 0) {
|
||||
|
|
@ -122,7 +122,7 @@ IOStream *DefaultIOSystem::Open(const char *strFile, const char *strMode) {
|
|||
ai_assert(strFile != nullptr);
|
||||
ai_assert(strMode != nullptr);
|
||||
FILE *file;
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
std::wstring name = Utf8ToWide(strFile);
|
||||
if (name.empty()) {
|
||||
|
|
@ -133,7 +133,7 @@ IOStream *DefaultIOSystem::Open(const char *strFile, const char *strMode) {
|
|||
#else
|
||||
file = ::fopen(strFile, strMode);
|
||||
#endif
|
||||
|
||||
|
||||
if (!file) {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
|
||||
|
||||
|
|
@ -334,8 +334,8 @@ bool DefaultLogger::attachStream(LogStream *pStream, unsigned int severity) {
|
|||
}
|
||||
}
|
||||
|
||||
LogStreamInfo *pInfo = new LogStreamInfo(severity, pStream);
|
||||
m_StreamArray.push_back(pInfo);
|
||||
m_StreamArray.push_back(new LogStreamInfo(severity, pStream));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -53,7 +53,7 @@ namespace Assimp {
|
|||
/**
|
||||
* @brief Internal default implementation of the #ProgressHandler interface.
|
||||
*/
|
||||
class DefaultProgressHandler : public ProgressHandler {
|
||||
class DefaultProgressHandler final : public ProgressHandler {
|
||||
public:
|
||||
/// @brief Ignores the update callback.
|
||||
bool Update(float) override {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -159,10 +159,8 @@ static void setupExporterArray(std::vector<Exporter::ExportFormatEntry> &exporte
|
|||
#endif
|
||||
|
||||
#ifndef ASSIMP_BUILD_NO_OBJ_EXPORTER
|
||||
exporters.emplace_back("obj", "Wavefront OBJ format", "obj", &ExportSceneObj,
|
||||
aiProcess_GenSmoothNormals /*| aiProcess_PreTransformVertices */);
|
||||
exporters.emplace_back("objnomtl", "Wavefront OBJ format without material file", "obj", &ExportSceneObjNoMtl,
|
||||
aiProcess_GenSmoothNormals /*| aiProcess_PreTransformVertices */);
|
||||
exporters.emplace_back("obj", "Wavefront OBJ format", "obj", &ExportSceneObj);
|
||||
exporters.emplace_back("objnomtl", "Wavefront OBJ format without material file", "obj", &ExportSceneObjNoMtl);
|
||||
#endif
|
||||
|
||||
#ifndef ASSIMP_BUILD_NO_STL_EXPORTER
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assimp/fast_atof.h>
|
||||
#include <assimp/ParsingUtils.h>
|
||||
|
||||
namespace Assimp {
|
||||
namespace Assimp {
|
||||
|
||||
inline bool IsHex(char s) {
|
||||
return (s>='0' && s<='9') || (s>='a' && s<='f') || (s>='A' && s<='F');
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
#include <assimp/ByteSwapper.h>
|
||||
|
||||
namespace Assimp {
|
||||
namespace IFF {
|
||||
namespace Assimp {
|
||||
namespace IFF {
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//! Describes an IFF chunk header
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -733,7 +733,7 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags) {
|
|||
return nullptr;
|
||||
}
|
||||
}
|
||||
#endif // no validation
|
||||
#endif // ASSIMP_BUILD_NO_VALIDATEDS_PROCESS
|
||||
|
||||
// Preprocess the scene and prepare it for post-processing
|
||||
if (profiler) {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
struct aiScene;
|
||||
|
||||
namespace Assimp {
|
||||
namespace Assimp {
|
||||
class ProgressHandler;
|
||||
class IOSystem;
|
||||
class BaseImporter;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -83,6 +83,7 @@ struct Maybe {
|
|||
|
||||
Maybe &operator&() = delete;
|
||||
Maybe(const Maybe &) = delete;
|
||||
Maybe &operator=(const Maybe &) = default;
|
||||
|
||||
private:
|
||||
T _val;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -53,7 +52,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
*/
|
||||
// ----------------------------------------------------------------------------
|
||||
#include "ScenePrivate.h"
|
||||
#include "time.h"
|
||||
#include <assimp/Hash.h>
|
||||
#include <assimp/SceneCombiner.h>
|
||||
#include <assimp/StringUtils.h>
|
||||
|
|
@ -61,9 +59,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assimp/mesh.h>
|
||||
#include <assimp/metadata.h>
|
||||
#include <assimp/scene.h>
|
||||
#include <stdio.h>
|
||||
#include <assimp/DefaultLogger.hpp>
|
||||
|
||||
#include <unordered_set>
|
||||
#include <ctime>
|
||||
#include <cstdio>
|
||||
|
||||
namespace Assimp {
|
||||
|
||||
|
|
@ -96,6 +96,11 @@ inline void PrefixString(aiString &string, const char *prefix, unsigned int len)
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// Add node identifiers to a hashing set
|
||||
void SceneCombiner::AddNodeHashes(aiNode *node, std::set<unsigned int> &hashes) {
|
||||
if (node == nullptr) {
|
||||
ASSIMP_LOG_ERROR("Pointer to aiNode is nullptr.");
|
||||
return;
|
||||
}
|
||||
|
||||
// Add node name to hashing set if it is non-empty - empty nodes are allowed
|
||||
// and they can't have any anims assigned so its absolutely safe to duplicate them.
|
||||
if (node->mName.length) {
|
||||
|
|
@ -985,7 +990,7 @@ inline void GetArrayCopy(Type *&dest, ai_uint num) {
|
|||
Type *old = dest;
|
||||
|
||||
dest = new Type[num];
|
||||
::memcpy(dest, old, sizeof(Type) * num);
|
||||
std::copy(old, old+num, dest);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
|
@ -1095,10 +1100,6 @@ void SceneCombiner::Copy(aiMesh **_dest, const aiMesh *src) {
|
|||
|
||||
// make a deep copy of all faces
|
||||
GetArrayCopy(dest->mFaces, dest->mNumFaces);
|
||||
for (unsigned int i = 0; i < dest->mNumFaces; ++i) {
|
||||
aiFace &f = dest->mFaces[i];
|
||||
GetArrayCopy(f.mIndices, f.mNumIndices);
|
||||
}
|
||||
|
||||
// make a deep copy of all blend shapes
|
||||
CopyPtrArray(dest->mAnimMeshes, dest->mAnimMeshes, dest->mNumAnimMeshes);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
|
||||
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -51,7 +49,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assimp/LogStream.hpp>
|
||||
#include <ostream>
|
||||
|
||||
namespace Assimp {
|
||||
namespace Assimp {
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
/** @class StdOStreamLogStream
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -528,7 +528,7 @@ void CatmullClarkSubdivider::InternSubdivide(
|
|||
continue;
|
||||
}
|
||||
|
||||
ai_assert(adj[o] - moffsets[nidx].first < mp->mNumFaces);
|
||||
ai_assert(adj[o] - moffsets[nidx].first < mp->mNumFaces);
|
||||
const aiFace &f = mp->mFaces[adj[o] - moffsets[nidx].first];
|
||||
bool haveit = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
static constexpr 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-2024, Assimp team\n"
|
||||
"(c) 2006-2026, Assimp team\n"
|
||||
"License under the terms and conditions of the 3-clause BSD license\n"
|
||||
"https://www.assimp.org\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -51,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
struct aiMesh;
|
||||
struct aiFace;
|
||||
|
||||
namespace Assimp {
|
||||
namespace Assimp {
|
||||
|
||||
// --------------------------------------------------------------------------------------------
|
||||
/** @brief The VertexTriangleAdjacency class computes a vertex-triangle
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
|
||||
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -52,7 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assimp/LogStream.hpp>
|
||||
#include "windows.h"
|
||||
|
||||
namespace Assimp {
|
||||
namespace Assimp {
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
/** @class Win32DebugLogStream
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -90,6 +90,18 @@ const char *aiTextureTypeToString(aiTextureType in) {
|
|||
return "Clearcoat";
|
||||
case aiTextureType_TRANSMISSION:
|
||||
return "Transmission";
|
||||
case aiTextureType_MAYA_BASE:
|
||||
return "MayaBase";
|
||||
case aiTextureType_MAYA_SPECULAR:
|
||||
return "MayaSpecular";
|
||||
case aiTextureType_MAYA_SPECULAR_COLOR:
|
||||
return "MayaSpecularColor";
|
||||
case aiTextureType_MAYA_SPECULAR_ROUGHNESS:
|
||||
return "MayaSpecularRoughness";
|
||||
case aiTextureType_ANISOTROPY:
|
||||
return "Anisotropy";
|
||||
case aiTextureType_GLTF_METALLIC_ROUGHNESS:
|
||||
return "glTFMetallicRoughness";
|
||||
case aiTextureType_UNKNOWN:
|
||||
return "Unknown";
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
Copyright (c) 2006-2026, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue