mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-23 05:15:34 +00:00
update assimp lib
This commit is contained in:
parent
03a348deb7
commit
d3f8fee74e
1725 changed files with 196314 additions and 62009 deletions
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2022, assimp team
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2022, assimp team
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
@ -57,7 +57,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <memory>
|
||||
#include <sstream>
|
||||
|
||||
static const aiImporterDesc desc = { "MMD Importer",
|
||||
static constexpr aiImporterDesc desc = { "MMD Importer",
|
||||
"",
|
||||
"",
|
||||
"surfaces supported?",
|
||||
|
|
@ -81,10 +81,6 @@ MMDImporter::MMDImporter() :
|
|||
m_strAbsPath = io.getOsSeparator();
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Destructor.
|
||||
MMDImporter::~MMDImporter() = default;
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Returns true, if file is an pmx file.
|
||||
bool MMDImporter::CanRead(const std::string &pFile, IOSystem *pIOHandler,
|
||||
|
|
@ -269,7 +265,7 @@ aiMesh *MMDImporter::CreateMesh(const pmx::PmxModel *pModel,
|
|||
dynamic_cast<pmx::PmxVertexSkinningSDEF *>(v->skinning.get());
|
||||
switch (v->skinning_type) {
|
||||
case pmx::PmxVertexSkinningType::BDEF1:
|
||||
bone_vertex_map[vsBDEF1_ptr->bone_index].emplace_back(index, 1.0);
|
||||
bone_vertex_map[vsBDEF1_ptr->bone_index].emplace_back(index, static_cast<ai_real>(1));
|
||||
break;
|
||||
case pmx::PmxVertexSkinningType::BDEF2:
|
||||
bone_vertex_map[vsBDEF2_ptr->bone_index1].emplace_back(index, vsBDEF2_ptr->bone_weight);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2022, assimp team
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
|
@ -50,46 +50,34 @@ struct aiMesh;
|
|||
namespace Assimp {
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
/// \class MMDImporter
|
||||
/// \brief Imports MMD a pmx/pmd/vmd file
|
||||
/// @class MMDImporter
|
||||
/// @brief Imports MMD a pmx/pmd/vmd file
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
class MMDImporter : public BaseImporter {
|
||||
public:
|
||||
/// \brief Default constructor
|
||||
/// @brief Default constructor
|
||||
MMDImporter();
|
||||
|
||||
/// \brief Destructor
|
||||
~MMDImporter() override;
|
||||
/// @brief Destructor
|
||||
~MMDImporter() override = default;
|
||||
|
||||
public:
|
||||
/// \brief Returns whether the class can handle the format of the given file.
|
||||
/// \remark See BaseImporter::CanRead() for details.
|
||||
/// @brief Returns whether the class can handle the format of the given file.
|
||||
/// @remark See BaseImporter::CanRead() for details.
|
||||
bool CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const override;
|
||||
|
||||
private:
|
||||
//! \brief Appends the supported extension.
|
||||
const aiImporterDesc* GetInfo() const override;
|
||||
|
||||
//! \brief File import implementation.
|
||||
void InternReadFile(const std::string& pFile, aiScene* pScene, IOSystem* pIOHandler) override;
|
||||
|
||||
//! \brief Create the data from imported content.
|
||||
void CreateDataFromImport(const pmx::PmxModel* pModel, aiScene* pScene);
|
||||
|
||||
//! \brief Create the mesh
|
||||
aiMesh* CreateMesh(const pmx::PmxModel* pModel, const int indexStart, const int indexCount);
|
||||
|
||||
//! \brief Create the material
|
||||
aiMaterial* CreateMaterial(const pmx::PmxMaterial* pMat, const pmx::PmxModel* pModel);
|
||||
|
||||
private:
|
||||
//! Data buffer
|
||||
std::vector<char> m_Buffer;
|
||||
//! Absolute pathname of model in file system
|
||||
std::string m_strAbsPath;
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
} // Namespace Assimp
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2022, assimp team
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2022, assimp team
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
|
@ -42,11 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <utility>
|
||||
#include "MMDPmxParser.h"
|
||||
#include <assimp/StringUtils.h>
|
||||
#ifdef ASSIMP_USE_HUNTER
|
||||
# include <utf8.h>
|
||||
#else
|
||||
# include "../contrib/utf8cpp/source/utf8.h"
|
||||
#endif
|
||||
#include "utf8.h"
|
||||
#include <assimp/Exceptional.h>
|
||||
|
||||
namespace pmx
|
||||
|
|
@ -93,7 +89,7 @@ namespace pmx
|
|||
{
|
||||
return std::string();
|
||||
}
|
||||
buffer.reserve(size);
|
||||
buffer.resize(size);
|
||||
stream->read((char*) buffer.data(), size);
|
||||
if (encoding == 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2022, assimp team
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
|
@ -46,6 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <memory>
|
||||
#include <assimp/types.h>
|
||||
#include "MMDCpp14.h"
|
||||
|
||||
namespace pmx
|
||||
|
|
@ -730,7 +731,7 @@ namespace pmx
|
|||
std::unique_ptr<PmxAncherRigidBody []> anchers;
|
||||
int pin_vertex_count;
|
||||
std::unique_ptr<int []> pin_vertices;
|
||||
void Read(std::istream *stream, PmxSetting *setting);
|
||||
AI_WONT_RETURN void Read(std::istream *stream, PmxSetting *setting) AI_WONT_RETURN_SUFFIX;
|
||||
};
|
||||
|
||||
class PmxModel
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Open Asset Import Library (assimp)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Copyright (c) 2006-2022, assimp team
|
||||
Copyright (c) 2006-2024, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue