Update Assimp from 5.2.3 to 5.2.5

This commit is contained in:
Bloodknight 2022-10-02 19:02:49 +01:00
parent ea7ca63301
commit 16f3710058
379 changed files with 14469 additions and 47175 deletions

View file

@ -2,7 +2,7 @@
Open Asset Import Library (assimp)
----------------------------------------------------------------------
Copyright (c) 2006-2020, assimp team
Copyright (c) 2006-2022, assimp team
All rights reserved.
@ -47,6 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/types.h>
#include <map>
#include <vector>
#include "Common/Maybe.h"
namespace Assimp {
namespace ObjFile {
@ -63,7 +64,7 @@ struct Face {
using IndexArray = std::vector<unsigned int>;
//! Primitive type
aiPrimitiveType m_PrimitiveType;
aiPrimitiveType mPrimitiveType;
//! Vertex indices
IndexArray m_vertices;
//! Normal indices
@ -75,14 +76,12 @@ struct Face {
//! \brief Default constructor
Face(aiPrimitiveType pt = aiPrimitiveType_POLYGON) :
m_PrimitiveType(pt), m_vertices(), m_normals(), m_texturCoords(), m_pMaterial(0L) {
mPrimitiveType(pt), m_vertices(), m_normals(), m_texturCoords(), m_pMaterial(nullptr) {
// empty
}
//! \brief Destructor
~Face() {
// empty
}
~Face() = default;
};
// ------------------------------------------------------------------------------------------------
@ -183,15 +182,15 @@ struct Material {
aiColor3D transparent;
//! PBR Roughness
ai_real roughness;
Maybe<ai_real> roughness;
//! PBR Metallic
ai_real metallic;
Maybe<ai_real> metallic;
//! PBR Metallic
aiColor3D sheen;
Maybe<aiColor3D> sheen;
//! PBR Clearcoat Thickness
ai_real clearcoat_thickness;
Maybe<ai_real> clearcoat_thickness;
//! PBR Clearcoat Rougness
ai_real clearcoat_roughness;
Maybe<ai_real> clearcoat_roughness;
//! PBR Anisotropy
ai_real anisotropy;
@ -206,11 +205,11 @@ struct Material {
illumination_model(1),
ior(ai_real(1.0)),
transparent(ai_real(1.0), ai_real(1.0), ai_real(1.0)),
roughness(ai_real(1.0)),
metallic(ai_real(0.0)),
sheen(ai_real(1.0), ai_real(1.0), ai_real(1.0)),
clearcoat_thickness(ai_real(0.0)),
clearcoat_roughness(ai_real(0.0)),
roughness(),
metallic(),
sheen(),
clearcoat_thickness(),
clearcoat_roughness(),
anisotropy(ai_real(0.0)),
bump_multiplier(ai_real(1.0)) {
std::fill_n(clamp, static_cast<unsigned int>(TextureTypeCount), false);
@ -229,7 +228,7 @@ struct Mesh {
/// The name for the mesh
std::string m_name;
/// Array with pointer to all stored faces
std::vector<Face *> m_Faces;
std::vector<Face*> m_Faces;
/// Assigned material
Material *m_pMaterial;
/// Number of stored indices.
@ -272,65 +271,65 @@ struct Model {
using ConstGroupMapIt = std::map<std::string, std::vector<unsigned int> *>::const_iterator;
//! Model name
std::string m_ModelName;
std::string mModelName;
//! List ob assigned objects
std::vector<Object *> m_Objects;
std::vector<Object *> mObjects;
//! Pointer to current object
ObjFile::Object *m_pCurrent;
ObjFile::Object *mCurrentObject;
//! Pointer to current material
ObjFile::Material *m_pCurrentMaterial;
ObjFile::Material *mCurrentMaterial;
//! Pointer to default material
ObjFile::Material *m_pDefaultMaterial;
ObjFile::Material *mDefaultMaterial;
//! Vector with all generated materials
std::vector<std::string> m_MaterialLib;
std::vector<std::string> mMaterialLib;
//! Vector with all generated vertices
std::vector<aiVector3D> m_Vertices;
std::vector<aiVector3D> mVertices;
//! vector with all generated normals
std::vector<aiVector3D> m_Normals;
std::vector<aiVector3D> mNormals;
//! vector with all vertex colors
std::vector<aiVector3D> m_VertexColors;
std::vector<aiVector3D> mVertexColors;
//! Group map
GroupMap m_Groups;
GroupMap mGroups;
//! Group to face id assignment
std::vector<unsigned int> *m_pGroupFaceIDs;
std::vector<unsigned int> *mGroupFaceIDs;
//! Active group
std::string m_strActiveGroup;
std::string mActiveGroup;
//! Vector with generated texture coordinates
std::vector<aiVector3D> m_TextureCoord;
std::vector<aiVector3D> mTextureCoord;
//! Maximum dimension of texture coordinates
unsigned int m_TextureCoordDim;
unsigned int mTextureCoordDim;
//! Current mesh instance
Mesh *m_pCurrentMesh;
Mesh *mCurrentMesh;
//! Vector with stored meshes
std::vector<Mesh *> m_Meshes;
std::vector<Mesh *> mMeshes;
//! Material map
std::map<std::string, Material *> m_MaterialMap;
std::map<std::string, Material*> mMaterialMap;
//! \brief The default class constructor
Model() :
m_ModelName(),
m_pCurrent(nullptr),
m_pCurrentMaterial(nullptr),
m_pDefaultMaterial(nullptr),
m_pGroupFaceIDs(nullptr),
m_strActiveGroup(),
m_TextureCoordDim(0),
m_pCurrentMesh(nullptr) {
mModelName(),
mCurrentObject(nullptr),
mCurrentMaterial(nullptr),
mDefaultMaterial(nullptr),
mGroupFaceIDs(nullptr),
mActiveGroup(),
mTextureCoordDim(0),
mCurrentMesh(nullptr) {
// empty
}
//! \brief The class destructor
~Model() {
for (auto & it : m_Objects) {
for (auto & it : mObjects) {
delete it;
}
for (auto & Meshe : m_Meshes) {
for (auto & Meshe : mMeshes) {
delete Meshe;
}
for (auto & Group : m_Groups) {
for (auto & Group : mGroups) {
delete Group.second;
}
for (auto & it : m_MaterialMap) {
for (auto & it : mMaterialMap) {
delete it.second;
}
}