Pārlūkot izejas kodu

Merge branch 'master' into JoinVerticesProcessUsedVerticesMask

Kim Kulling 2 gadi atpakaļ
vecāks
revīzija
d6b8d61066
54 mainītis faili ar 120 papildinājumiem un 366 dzēšanām
  1. 7 118
      code/AssetLib/3DS/3DSHelper.h
  2. 1 3
      code/AssetLib/3MF/3MFTypes.h
  3. 1 1
      code/AssetLib/3MF/D3MFExporter.cpp
  4. 1 5
      code/AssetLib/AMF/AMFImporter.cpp
  5. 4 6
      code/AssetLib/AMF/AMFImporter_Node.hpp
  6. 1 2
      code/AssetLib/Blender/BlenderBMesh.cpp
  7. 1 3
      code/AssetLib/Blender/BlenderDNA.h
  8. 1 2
      code/AssetLib/Blender/BlenderLoader.cpp
  9. 1 3
      code/AssetLib/Blender/BlenderModifier.h
  10. 7 18
      code/AssetLib/Blender/BlenderScene.h
  11. 3 7
      code/AssetLib/Blender/BlenderTessellator.cpp
  12. 3 9
      code/AssetLib/C4D/C4DImporter.cpp
  13. 0 9
      code/AssetLib/Collada/ColladaLoader.cpp
  14. 1 3
      code/AssetLib/DXF/DXFHelper.h
  15. 0 4
      code/AssetLib/FBX/FBXExportNode.h
  16. 2 6
      code/AssetLib/FBX/FBXImporter.cpp
  17. 1 2
      code/AssetLib/IFC/IFCLoader.cpp
  18. 1 5
      code/AssetLib/Irr/IRRMeshLoader.cpp
  19. 1 3
      code/AssetLib/Irr/IRRShared.h
  20. 1 1
      code/AssetLib/M3D/M3DImporter.h
  21. 1 1
      code/AssetLib/MMD/MMDImporter.cpp
  22. 0 1
      code/AssetLib/OpenGEX/OpenGEXImporter.cpp
  23. 4 16
      code/AssetLib/Ply/PlyParser.h
  24. 1 13
      code/AssetLib/Q3BSP/Q3BSPFileData.h
  25. 1 1
      code/AssetLib/Q3BSP/Q3BSPFileImporter.cpp
  26. 3 4
      code/AssetLib/SMD/SMDLoader.cpp
  27. 1 1
      code/AssetLib/SMD/SMDLoader.h
  28. 4 19
      code/AssetLib/X/XFileHelper.h
  29. 1 3
      code/AssetLib/X/XFileImporter.cpp
  30. 2 10
      code/AssetLib/X3D/X3DExporter.hpp
  31. 4 4
      code/AssetLib/X3D/X3DGeoHelper.cpp
  32. 8 8
      code/AssetLib/X3D/X3DImporter_Geometry2D.cpp
  33. 2 6
      code/AssetLib/X3D/X3DImporter_Node.hpp
  34. 1 2
      code/AssetLib/XGL/XGLLoader.cpp
  35. 2 6
      code/AssetLib/glTF/glTFAsset.h
  36. 1 1
      code/AssetLib/glTF/glTFImporter.cpp
  37. 2 12
      code/AssetLib/glTF2/glTF2Asset.h
  38. 1 5
      code/AssetLib/glTF2/glTF2Importer.cpp
  39. 1 3
      code/Common/FileSystemFilter.h
  40. 5 2
      code/PostProcessing/GenFaceNormalsProcess.cpp
  41. 1 0
      code/PostProcessing/GenFaceNormalsProcess.h
  42. 5 2
      code/PostProcessing/GenVertexNormalsProcess.cpp
  43. 1 0
      code/PostProcessing/GenVertexNormalsProcess.h
  44. 1 3
      include/assimp/IOStream.hpp
  45. 1 3
      include/assimp/IOStreamBuffer.h
  46. 1 4
      include/assimp/IOSystem.hpp
  47. 1 4
      include/assimp/LineSplitter.h
  48. 1 2
      include/assimp/MemoryIOWrapper.h
  49. 1 3
      include/assimp/Profiler.h
  50. 2 6
      include/assimp/ProgressHandler.hpp
  51. 2 6
      include/assimp/SceneCombiner.h
  52. 4 1
      include/assimp/anim.h
  53. 9 2
      include/assimp/mesh.h
  54. 7 2
      port/PyAssimp/pyassimp/structs.py

+ 7 - 118
code/AssetLib/3DS/3DSHelper.h

@@ -322,7 +322,6 @@ struct Texture {
     //! Default constructor
     Texture() AI_NO_EXCEPT
             : mTextureBlend(0.0f),
-              mMapName(),
               mOffsetU(0.0),
               mOffsetV(0.0),
               mScaleU(1.0),
@@ -334,51 +333,11 @@ struct Texture {
         mTextureBlend = get_qnan();
     }
 
-    Texture(const Texture &other) :
-            mTextureBlend(other.mTextureBlend),
-            mMapName(other.mMapName),
-            mOffsetU(other.mOffsetU),
-            mOffsetV(other.mOffsetV),
-            mScaleU(other.mScaleU),
-            mScaleV(other.mScaleV),
-            mRotation(other.mRotation),
-            mMapMode(other.mMapMode),
-            bPrivate(other.bPrivate),
-            iUVSrc(other.iUVSrc) {
-        // empty
-    }
-
-    Texture(Texture &&other) AI_NO_EXCEPT : mTextureBlend(other.mTextureBlend),
-                                            mMapName(std::move(other.mMapName)),
-                                            mOffsetU(other.mOffsetU),
-                                            mOffsetV(other.mOffsetV),
-                                            mScaleU(other.mScaleU),
-                                            mScaleV(other.mScaleV),
-                                            mRotation(other.mRotation),
-                                            mMapMode(other.mMapMode),
-                                            bPrivate(other.bPrivate),
-                                            iUVSrc(other.iUVSrc) {
-        // empty
-    }
+    Texture(const Texture &other) = default;
 
-    Texture &operator=(Texture &&other) AI_NO_EXCEPT {
-        if (this == &other) {
-            return *this;
-        }
-
-        mTextureBlend = other.mTextureBlend;
-        mMapName = std::move(other.mMapName);
-        mOffsetU = other.mOffsetU;
-        mOffsetV = other.mOffsetV;
-        mScaleU = other.mScaleU;
-        mScaleV = other.mScaleV;
-        mRotation = other.mRotation;
-        mMapMode = other.mMapMode;
-        bPrivate = other.bPrivate;
-        iUVSrc = other.iUVSrc;
+    Texture(Texture &&other) AI_NO_EXCEPT = default;
 
-        return *this;
-    }
+    Texture &operator=(Texture &&other) AI_NO_EXCEPT = default;
 
     //! Specifies the blend factor for the texture
     ai_real mTextureBlend;
@@ -436,83 +395,13 @@ struct Material {
         // empty
     }
 
-    Material(const Material &other) :
-            mName(other.mName),
-            mDiffuse(other.mDiffuse),
-            mSpecularExponent(other.mSpecularExponent),
-            mShininessStrength(other.mShininessStrength),
-            mSpecular(other.mSpecular),
-            mAmbient(other.mAmbient),
-            mShading(other.mShading),
-            mTransparency(other.mTransparency),
-            sTexDiffuse(other.sTexDiffuse),
-            sTexOpacity(other.sTexOpacity),
-            sTexSpecular(other.sTexSpecular),
-            sTexReflective(other.sTexReflective),
-            sTexBump(other.sTexBump),
-            sTexEmissive(other.sTexEmissive),
-            sTexShininess(other.sTexShininess),
-            mBumpHeight(other.mBumpHeight),
-            mEmissive(other.mEmissive),
-            sTexAmbient(other.sTexAmbient),
-            mTwoSided(other.mTwoSided) {
-        // empty
-    }
-
-    //! Move constructor. This is explicitly written because MSVC doesn't support defaulting it
-    Material(Material &&other) AI_NO_EXCEPT : mName(std::move(other.mName)),
-                                              mDiffuse(other.mDiffuse),
-                                              mSpecularExponent(other.mSpecularExponent),
-                                              mShininessStrength(other.mShininessStrength),
-                                              mSpecular(other.mSpecular),
-                                              mAmbient(other.mAmbient),
-                                              mShading(other.mShading),
-                                              mTransparency(other.mTransparency),
-                                              sTexDiffuse(std::move(other.sTexDiffuse)),
-                                              sTexOpacity(std::move(other.sTexOpacity)),
-                                              sTexSpecular(std::move(other.sTexSpecular)),
-                                              sTexReflective(std::move(other.sTexReflective)),
-                                              sTexBump(std::move(other.sTexBump)),
-                                              sTexEmissive(std::move(other.sTexEmissive)),
-                                              sTexShininess(std::move(other.sTexShininess)),
-                                              mBumpHeight(other.mBumpHeight),
-                                              mEmissive(other.mEmissive),
-                                              sTexAmbient(std::move(other.sTexAmbient)),
-                                              mTwoSided(other.mTwoSided) {
-        // empty
-    }
+    Material(const Material &other) = default;
 
-    Material &operator=(Material &&other) AI_NO_EXCEPT {
-        if (this == &other) {
-            return *this;
-        }
-
-        mName = std::move(other.mName);
-        mDiffuse = other.mDiffuse;
-        mSpecularExponent = other.mSpecularExponent;
-        mShininessStrength = other.mShininessStrength,
-        mSpecular = other.mSpecular;
-        mAmbient = other.mAmbient;
-        mShading = other.mShading;
-        mTransparency = other.mTransparency;
-        sTexDiffuse = std::move(other.sTexDiffuse);
-        sTexOpacity = std::move(other.sTexOpacity);
-        sTexSpecular = std::move(other.sTexSpecular);
-        sTexReflective = std::move(other.sTexReflective);
-        sTexBump = std::move(other.sTexBump);
-        sTexEmissive = std::move(other.sTexEmissive);
-        sTexShininess = std::move(other.sTexShininess);
-        mBumpHeight = other.mBumpHeight;
-        mEmissive = other.mEmissive;
-        sTexAmbient = std::move(other.sTexAmbient);
-        mTwoSided = other.mTwoSided;
+    Material(Material &&other) AI_NO_EXCEPT = default;
 
-        return *this;
-    }
+    Material &operator=(Material &&other) AI_NO_EXCEPT = default;
 
-    virtual ~Material() {
-        // empty
-    }
+    virtual ~Material() = default;
 
     //! Name of the material
     std::string mName;

+ 1 - 3
code/AssetLib/3MF/3MFTypes.h

@@ -69,9 +69,7 @@ public:
         // empty
     }
 
-    virtual ~Resource() {
-        // empty
-    }
+    virtual ~Resource() = default;
 
     virtual ResourceType getType() const {
         return ResourceType::RT_Unknown;

+ 1 - 1
code/AssetLib/3MF/D3MFExporter.cpp

@@ -83,7 +83,7 @@ void ExportScene3MF(const char *pFile, IOSystem *pIOSystem, const aiScene *pScen
 namespace D3MF {
 
 D3MFExporter::D3MFExporter(const char *pFile, const aiScene *pScene) :
-        mArchiveName(pFile), m_zipArchive(nullptr), mScene(pScene), mModelOutput(), mRelOutput(), mContentOutput(), mBuildItems(), mRelations() {
+        mArchiveName(pFile), m_zipArchive(nullptr), mScene(pScene) {
     // empty
 }
 

+ 1 - 5
code/AssetLib/AMF/AMFImporter.cpp

@@ -83,11 +83,7 @@ void AMFImporter::Clear() {
 
 AMFImporter::AMFImporter() AI_NO_EXCEPT :
         mNodeElement_Cur(nullptr),
-        mXmlParser(nullptr),
-        mUnit(),
-        mVersion(),
-        mMaterial_Converted(),
-        mTexture_Converted() {
+        mXmlParser(nullptr) {
     // empty
 }
 

+ 4 - 6
code/AssetLib/AMF/AMFImporter_Node.hpp

@@ -88,9 +88,7 @@ public:
 	std::list<AMFNodeElementBase *> Child; ///< Child elements.
 
 public: /// Destructor, virtual..
-	virtual ~AMFNodeElementBase() {
-		// empty
-	}
+	virtual ~AMFNodeElementBase() = default;
 
 	/// Disabled copy constructor and co.
 	AMFNodeElementBase(const AMFNodeElementBase &pNodeElement) = delete;
@@ -103,7 +101,7 @@ protected:
 	/// \param [in] pType - element type.
 	/// \param [in] pParent - parent element.
 	AMFNodeElementBase(const EType pType, AMFNodeElementBase *pParent) :
-			Type(pType), ID(), Parent(pParent), Child() {
+			Type(pType), Parent(pParent) {
 		// empty
 	}
 }; // class IAMFImporter_NodeElement
@@ -174,7 +172,7 @@ struct AMFColor : public AMFNodeElementBase {
 	/// @brief  Constructor.
 	/// @param [in] pParent - pointer to parent node.
 	AMFColor(AMFNodeElementBase *pParent) :
-			AMFNodeElementBase(ENET_Color, pParent), Composed(false), Color(), Profile() {
+			AMFNodeElementBase(ENET_Color, pParent), Composed(false), Color() {
 		// empty
 	}
 };
@@ -270,7 +268,7 @@ struct AMFTexMap : public AMFNodeElementBase {
 	/// Constructor.
 	/// \param [in] pParent - pointer to parent node.
 	AMFTexMap(AMFNodeElementBase *pParent) :
-			AMFNodeElementBase(ENET_TexMap, pParent), TextureCoordinate{}, TextureID_R(), TextureID_G(), TextureID_B(), TextureID_A() {
+			AMFNodeElementBase(ENET_TexMap, pParent), TextureCoordinate{} {
 		// empty
 	}
 };

+ 1 - 2
code/AssetLib/Blender/BlenderBMesh.cpp

@@ -52,8 +52,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 namespace Assimp {
 template <>
 const char *LogFunctions<BlenderBMeshConverter>::Prefix() {
-    static auto prefix = "BLEND_BMESH: ";
-    return prefix;
+    return "BLEND_BMESH: ";
 }
 } // namespace Assimp
 

+ 1 - 3
code/AssetLib/Blender/BlenderDNA.h

@@ -106,9 +106,7 @@ struct ElemBase {
         // empty
     }
 
-    virtual ~ElemBase() {
-        // empty
-    }
+    virtual ~ElemBase() = default;
 
     /** Type name of the element. The type
      * string points is the `c_str` of the `name` attribute of the

+ 1 - 2
code/AssetLib/Blender/BlenderLoader.cpp

@@ -80,8 +80,7 @@ namespace Assimp {
 
 template <>
 const char *LogFunctions<BlenderImporter>::Prefix() {
-    static auto prefix = "BLEND: ";
-    return prefix;
+    return "BLEND: ";
 }
 
 } // namespace Assimp

+ 1 - 3
code/AssetLib/Blender/BlenderModifier.h

@@ -62,9 +62,7 @@ public:
     /**
      *  The class destructor, virtual.
      */
-    virtual ~BlenderModifier() {
-        // empty
-    }
+    virtual ~BlenderModifier() = default;
 
     // --------------------
     /**

+ 7 - 18
code/AssetLib/Blender/BlenderScene.h

@@ -182,7 +182,7 @@ struct MVert : ElemBase {
     int bweight;
 
     MVert() :
-            ElemBase(), flag(0), mat_nr(0), bweight(0) {}
+            flag(0), mat_nr(0), bweight(0) {}
 };
 
 // -------------------------------------------------------------------------------
@@ -417,7 +417,6 @@ struct CustomDataLayer : ElemBase {
     std::shared_ptr<ElemBase> data; // must be converted to real type according type member
 
     CustomDataLayer() :
-            ElemBase(),
             type(0),
             offset(0),
             flag(0),
@@ -729,7 +728,7 @@ struct Object : ElemBase {
     ListBase modifiers;
 
     Object() :
-            ElemBase(), type(Type_EMPTY), parent(nullptr), track(), proxy(), proxy_from(), data() {
+            type(Type_EMPTY), parent(nullptr) {
         // empty
     }
 };
@@ -741,8 +740,7 @@ struct Base : ElemBase {
     std::shared_ptr<Object> object WARN;
 
     Base() :
-            ElemBase(), prev(nullptr), next(), object() {
-        // empty
+            prev(nullptr) {
         // empty
     }
 };
@@ -758,10 +756,7 @@ struct Scene : ElemBase {
 
     ListBase base;
 
-    Scene() :
-            ElemBase(), camera(), world(), basact(), master_collection() {
-        // empty
-    }
+    Scene() = default;
 };
 
 // -------------------------------------------------------------------------------
@@ -791,10 +786,7 @@ struct Image : ElemBase {
 
     short gen_x, gen_y, gen_type;
 
-    Image() :
-            ElemBase() {
-        // empty
-    }
+    Image() = default;
 };
 
 // -------------------------------------------------------------------------------
@@ -884,7 +876,7 @@ struct Tex : ElemBase {
     //char use_nodes;
 
     Tex() :
-            ElemBase(), imaflag(ImageFlags_INTERPOL), type(Type_CLOUDS), ima() {
+            imaflag(ImageFlags_INTERPOL), type(Type_CLOUDS) {
         // empty
     }
 };
@@ -976,10 +968,7 @@ struct MTex : ElemBase {
     //float shadowfac;
     //float zenupfac, zendownfac, blendfac;
 
-    MTex() :
-            ElemBase() {
-        // empty
-    }
+    MTex() = default;
 };
 
 } // namespace Blender

+ 3 - 7
code/AssetLib/Blender/BlenderTessellator.cpp

@@ -62,8 +62,7 @@ namspace Assimp
 {
     template< > const char* LogFunctions< BlenderTessellatorGL >::Prefix()
     {
-        static auto prefix = "BLEND_TESS_GL: ";
-        return prefix;
+        return "BLEND_TESS_GL: ";
     }
 }
 
@@ -81,9 +80,7 @@ BlenderTessellatorGL::BlenderTessellatorGL( BlenderBMeshConverter& converter ):
 }
 
 // ------------------------------------------------------------------------------------------------
-BlenderTessellatorGL::~BlenderTessellatorGL( )
-{
-}
+BlenderTessellatorGL::~BlenderTessellatorGL() = default;
 
 // ------------------------------------------------------------------------------------------------
 void BlenderTessellatorGL::Tessellate( const MLoop* polyLoop, int vertexCount, const std::vector< MVert >& vertices )
@@ -259,8 +256,7 @@ namespace Assimp
 {
     template< > const char* LogFunctions< BlenderTessellatorP2T >::Prefix()
     {
-        static auto prefix = "BLEND_TESS_P2T: ";
-        return prefix;
+        return "BLEND_TESS_P2T: ";
     }
 }
 

+ 3 - 9
code/AssetLib/C4D/C4DImporter.cpp

@@ -86,8 +86,7 @@ void GetWriterInfo(int &id, String &appname) {
 
 namespace Assimp {
     template<> const char* LogFunctions<C4DImporter>::Prefix() {
-        static auto prefix = "C4D: ";
-        return prefix;
+        return "C4D: ";
     }
 }
 
@@ -106,15 +105,10 @@ static const aiImporterDesc desc = {
 
 
 // ------------------------------------------------------------------------------------------------
-C4DImporter::C4DImporter()
-: BaseImporter() {
-    // empty
-}
+C4DImporter::C4DImporter() = default;
 
 // ------------------------------------------------------------------------------------------------
-C4DImporter::~C4DImporter() {
-    // empty
-}
+C4DImporter::~C4DImporter() = default;
 
 // ------------------------------------------------------------------------------------------------
 bool C4DImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const {

+ 0 - 9
code/AssetLib/Collada/ColladaLoader.cpp

@@ -92,15 +92,6 @@ inline void AddNodeMetaData(aiNode *node, const std::string &key, const T &value
 // ------------------------------------------------------------------------------------------------
 // Constructor to be privately used by Importer
 ColladaLoader::ColladaLoader() :
-        mFileName(),
-        mMeshIndexByID(),
-        mMaterialIndexByName(),
-        mMeshes(),
-        newMats(),
-        mCameras(),
-        mLights(),
-        mTextures(),
-        mAnims(),
         noSkeletonMesh(false),
         removeEmptyBones(false),
         ignoreUpDirection(false),

+ 1 - 3
code/AssetLib/DXF/DXFHelper.h

@@ -65,7 +65,6 @@ public:
     LineReader(StreamReaderLE& reader)
     : splitter(reader,false,true)
     , groupcode( 0 )
-    , value()
     , end() {
         // empty
     }
@@ -186,8 +185,7 @@ struct InsertBlock {
     InsertBlock()
     : pos()
     , scale(1.f,1.f,1.f)
-    , angle()
-    , name() {
+    , angle() {
         // empty
     }
 

+ 0 - 4
code/AssetLib/FBX/FBXExportNode.h

@@ -77,8 +77,6 @@ public: // constructors
     /// The class constructor with the name.
     Node(const std::string& n)
     : name(n)
-    , properties()
-    , children()
     , force_has_children( false ) {
         // empty
     }
@@ -87,8 +85,6 @@ public: // constructors
     template <typename... More>
     Node(const std::string& n, More&&... more)
     : name(n)
-    , properties()
-    , children()
     , force_has_children(false) {
         AddProperties(std::forward<More>(more)...);
     }

+ 2 - 6
code/AssetLib/FBX/FBXImporter.cpp

@@ -62,8 +62,7 @@ namespace Assimp {
 
 template <>
 const char *LogFunctions<FBXImporter>::Prefix() {
-	static auto prefix = "FBX: ";
-	return prefix;
+	return "FBX: ";
 }
 
 } // namespace Assimp
@@ -90,10 +89,7 @@ static const aiImporterDesc desc = {
 
 // ------------------------------------------------------------------------------------------------
 // Constructor to be privately used by #Importer
-FBXImporter::FBXImporter() :
-        mSettings() {
-    // empty
-}
+FBXImporter::FBXImporter() = default;
 
 // ------------------------------------------------------------------------------------------------
 // Returns whether the class can handle the format of the given file.

+ 1 - 2
code/AssetLib/IFC/IFCLoader.cpp

@@ -73,8 +73,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 namespace Assimp {
 template <>
 const char *LogFunctions<IFCImporter>::Prefix() {
-    static auto prefix = "IFC: ";
-    return prefix;
+    return "IFC: ";
 }
 } // namespace Assimp
 

+ 1 - 5
code/AssetLib/Irr/IRRMeshLoader.cpp

@@ -71,11 +71,7 @@ static const aiImporterDesc desc = {
 
 // ------------------------------------------------------------------------------------------------
 // Constructor to be privately used by Importer
-IRRMeshImporter::IRRMeshImporter() :
-        BaseImporter(),
-        IrrlichtBase() {
-    // empty
-}
+IRRMeshImporter::IRRMeshImporter() = default;
 
 // ------------------------------------------------------------------------------------------------
 // Destructor, private as well

+ 1 - 3
code/AssetLib/Irr/IRRShared.h

@@ -63,9 +63,7 @@ protected:
         // empty
     }
 
-    ~IrrlichtBase() {
-        // empty
-    }
+    ~IrrlichtBase() = default;
 
     /** @brief Data structure for a simple name-value property
      */

+ 1 - 1
code/AssetLib/M3D/M3DImporter.h

@@ -65,7 +65,7 @@ class M3DImporter : public BaseImporter {
 public:
 	/// \brief  Default constructor
 	M3DImporter();
-    ~M3DImporter() override {}
+    ~M3DImporter() override = default;
 
 	/// \brief  Returns whether the class can handle the format of the given file.
 	/// \remark See BaseImporter::CanRead() for details.

+ 1 - 1
code/AssetLib/MMD/MMDImporter.cpp

@@ -269,7 +269,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);

+ 0 - 1
code/AssetLib/OpenGEX/OpenGEXImporter.cpp

@@ -261,7 +261,6 @@ OpenGEXImporter::RefInfo::RefInfo(aiNode *node, Type type, std::vector<std::stri
 OpenGEXImporter::OpenGEXImporter() :
         m_root(nullptr),
         m_nodeChildMap(),
-        m_meshCache(),
         m_mesh2refMap(),
         m_material2refMap(),
         m_ctx(nullptr),

+ 4 - 16
code/AssetLib/Ply/PlyParser.h

@@ -296,9 +296,7 @@ class PropertyInstance
 public:
 
     //! Default constructor
-    PropertyInstance() AI_NO_EXCEPT {
-        // empty
-    }
+    PropertyInstance() AI_NO_EXCEPT = default;
 
     union ValueUnion
     {
@@ -359,10 +357,7 @@ public:
 class ElementInstance {
 public:
     //! Default constructor
-    ElementInstance()  AI_NO_EXCEPT
-    : alProperties() {
-        // empty
-    }
+    ElementInstance() AI_NO_EXCEPT = default;
 
     //! List of all parsed properties
     std::vector< PropertyInstance > alProperties;
@@ -386,10 +381,7 @@ class ElementInstanceList
 public:
 
     //! Default constructor
-    ElementInstanceList() AI_NO_EXCEPT
-    : alInstances() {
-        // empty
-    }
+    ElementInstanceList() AI_NO_EXCEPT = default;
 
     //! List of all element instances
     std::vector< ElementInstance > alInstances;
@@ -413,11 +405,7 @@ class DOM
 public:
 
     //! Default constructor
-    DOM() AI_NO_EXCEPT
-    : alElements()
-    , alElementData() {
-
-    }
+    DOM() AI_NO_EXCEPT = default;
 
 
     //! Contains all elements of the file format

+ 1 - 13
code/AssetLib/Q3BSP/Q3BSPFileData.h

@@ -169,19 +169,7 @@ struct Q3BSPModel {
     std::vector<char> m_EntityData;
     std::string m_ModelName;
 
-    Q3BSPModel() :
-        m_Data(),
-        m_Lumps(),
-        m_Vertices(),
-        m_Faces(),
-        m_Indices(),
-        m_Textures(),
-        m_Lightmaps(),
-        m_EntityData(),
-        m_ModelName()
-    {
-        // empty
-    }
+    Q3BSPModel() = default;
 
     ~Q3BSPModel() {
         for ( unsigned int i=0; i<m_Lumps.size(); i++ ) {

+ 1 - 1
code/AssetLib/Q3BSP/Q3BSPFileImporter.cpp

@@ -139,7 +139,7 @@ static void normalizePathName(const std::string &rPath, std::string &normalizedP
 // ------------------------------------------------------------------------------------------------
 //  Constructor.
 Q3BSPFileImporter::Q3BSPFileImporter() :
-        m_pCurrentMesh(nullptr), m_pCurrentFace(nullptr), m_MaterialLookupMap(), mTextures() {
+        m_pCurrentMesh(nullptr), m_pCurrentFace(nullptr) {
     // empty
 }
 

+ 3 - 4
code/AssetLib/SMD/SMDLoader.cpp

@@ -82,10 +82,9 @@ static const aiImporterDesc desc = {
 // ------------------------------------------------------------------------------------------------
 // Constructor to be privately used by Importer
 SMDImporter::SMDImporter() :
-        configFrameID(),
-        mBuffer(),
-        pScene( nullptr ),
-        iFileSize( 0 ),
+        configFrameID(), 
+        pScene( nullptr ), 
+        iFileSize( 0 ), 
         iSmallestFrame( INT_MAX ),
         dLengthOfAnim( 0.0 ),
         bHasUVs(false ),

+ 1 - 1
code/AssetLib/SMD/SMDLoader.h

@@ -87,7 +87,7 @@ struct Vertex {
 */
 struct Face {
     Face() AI_NO_EXCEPT :
-            iTexture(0x0), avVertices{} {
+            iTexture(0x0) {
         // empty
     }
 

+ 4 - 19
code/AssetLib/X/XFileHelper.h

@@ -67,7 +67,6 @@ struct TexEntry {
     bool mIsNormalMap; // true if the texname was specified in a NormalmapFilename tag
 
     TexEntry() AI_NO_EXCEPT :
-            mName(),
             mIsNormalMap(false) {
         // empty
     }
@@ -128,17 +127,8 @@ struct Mesh {
 
     explicit Mesh(const std::string &pName = std::string()) AI_NO_EXCEPT
             : mName(pName),
-              mPositions(),
-              mPosFaces(),
-              mNormals(),
-              mNormFaces(),
               mNumTextures(0),
-              mTexCoords{},
-              mNumColorSets(0),
-              mColors{},
-              mFaceMaterials(),
-              mMaterials(),
-              mBones() {
+              mNumColorSets(0) {
         // empty
     }
 };
@@ -152,15 +142,12 @@ struct Node {
     std::vector<Mesh *> mMeshes;
 
     Node() AI_NO_EXCEPT
-            : mName(),
-              mTrafoMatrix(),
-              mParent(nullptr),
-              mChildren(),
-              mMeshes() {
+            : mTrafoMatrix(),
+              mParent(nullptr) {
         // empty
     }
     explicit Node(Node *pParent) :
-            mName(), mTrafoMatrix(), mParent(pParent), mChildren(), mMeshes() {
+            mTrafoMatrix(), mParent(pParent) {
         // empty
     }
 
@@ -211,8 +198,6 @@ struct Scene {
 
     Scene() AI_NO_EXCEPT
             : mRootNode(nullptr),
-              mGlobalMeshes(),
-              mGlobalMaterials(),
               mAnimTicksPerSecond(0) {
         // empty
     }

+ 1 - 3
code/AssetLib/X/XFileImporter.cpp

@@ -75,9 +75,7 @@ static const aiImporterDesc desc = {
 
 // ------------------------------------------------------------------------------------------------
 // Constructor to be privately used by Importer
-XFileImporter::XFileImporter() : mBuffer() {
-    // empty
-}
+XFileImporter::XFileImporter() = default;
 
 // ------------------------------------------------------------------------------------------------
 // Returns whether the class can handle the format of the given file.

+ 2 - 10
code/AssetLib/X3D/X3DExporter.hpp

@@ -52,22 +52,14 @@ class X3DExporter {
     struct SAttribute {
         const std::string Name;
         const std::string Value;
-        SAttribute() :
-                Name(),
-                Value() {
-            // empty
-        }
+        SAttribute() = default;
         SAttribute(const std::string &name, const std::string &value) :
                 Name(name),
                 Value(value) {
             // empty
         }
 
-        SAttribute(SAttribute &&rhs) AI_NO_EXCEPT :
-                Name(rhs.Name),
-                Value(rhs.Value) {
-            // empty
-        }
+        SAttribute(SAttribute &&rhs) AI_NO_EXCEPT = default;
     };
 
     /***********************************************/

+ 4 - 4
code/AssetLib/X3D/X3DGeoHelper.cpp

@@ -193,7 +193,7 @@ void X3DGeoHelper::add_color(aiMesh &pMesh, const std::list<aiColor3D> &pColors,
 
     // create RGBA array from RGB.
     for (std::list<aiColor3D>::const_iterator it = pColors.begin(); it != pColors.end(); ++it)
-        tcol.emplace_back((*it).r, (*it).g, (*it).b, 1);
+        tcol.emplace_back((*it).r, (*it).g, (*it).b, static_cast<ai_real>(1));
 
     // call existing function for adding RGBA colors
     add_color(pMesh, tcol, pColorPerVertex);
@@ -238,7 +238,7 @@ void X3DGeoHelper::add_color(aiMesh &pMesh, const std::vector<int32_t> &pCoordId
 
     // create RGBA array from RGB.
     for (std::list<aiColor3D>::const_iterator it = pColors.begin(); it != pColors.end(); ++it) {
-        tcol.emplace_back((*it).r, (*it).g, (*it).b, 1);
+        tcol.emplace_back((*it).r, (*it).g, (*it).b, static_cast<ai_real>(1));
     }
 
     // call existing function for adding RGBA colors
@@ -440,7 +440,7 @@ void X3DGeoHelper::add_tex_coord(aiMesh &pMesh, const std::vector<int32_t> &pCoo
     // copy list to array because we are need indexed access to normals.
     texcoord_arr_copy.reserve(pTexCoords.size());
     for (std::list<aiVector2D>::const_iterator it = pTexCoords.begin(); it != pTexCoords.end(); ++it) {
-        texcoord_arr_copy.emplace_back((*it).x, (*it).y, 0);
+        texcoord_arr_copy.emplace_back((*it).x, (*it).y, static_cast<ai_real>(0));
     }
 
     if (pTexCoordIdx.size() > 0) {
@@ -480,7 +480,7 @@ void X3DGeoHelper::add_tex_coord(aiMesh &pMesh, const std::list<aiVector2D> &pTe
     // copy list to array because we are need convert aiVector2D to aiVector3D and also get indexed access as a bonus.
     tc_arr_copy.reserve(pTexCoords.size());
     for (std::list<aiVector2D>::const_iterator it = pTexCoords.begin(); it != pTexCoords.end(); ++it) {
-        tc_arr_copy.emplace_back((*it).x, (*it).y, 0);
+        tc_arr_copy.emplace_back((*it).x, (*it).y, static_cast<ai_real>(0));
     }
 
     // copy texture coordinates to mesh

+ 8 - 8
code/AssetLib/X3D/X3DImporter_Geometry2D.cpp

@@ -151,7 +151,7 @@ void X3DImporter::readArcClose2D(XmlNode &node) {
             std::list<aiVector3D> &vlist = ((X3DNodeElementGeometry2D *)ne)->Vertices; // just short alias.
 
             if ((closureType == "PIE") || (closureType == "\"PIE\""))
-                vlist.emplace_back(0, 0, 0); // center point - first radial line
+                vlist.emplace_back(static_cast<ai_real>(0), static_cast<ai_real>(0), static_cast<ai_real>(0)); // center point - first radial line
             else if ((closureType != "CHORD") && (closureType != "\"CHORD\""))
                 Throw_IncorrectAttrValue("ArcClose2D", "closureType");
 
@@ -323,7 +323,7 @@ void X3DImporter::readPolyline2D(XmlNode &node) {
 
         // convert vec2 to vec3
         for (std::list<aiVector2D>::iterator it2 = lineSegments.begin(); it2 != lineSegments.end(); ++it2)
-            tlist.emplace_back(it2->x, it2->y, 0);
+            tlist.emplace_back(it2->x, it2->y, static_cast<ai_real>(0));
 
         // convert point set to line set
         X3DGeoHelper::extend_point_to_line(tlist, ((X3DNodeElementGeometry2D *)ne)->Vertices);
@@ -361,7 +361,7 @@ void X3DImporter::readPolypoint2D(XmlNode &node) {
 
         // convert vec2 to vec3
         for (std::list<aiVector2D>::iterator it2 = point.begin(); it2 != point.end(); ++it2) {
-            ((X3DNodeElementGeometry2D *)ne)->Vertices.emplace_back(it2->x, it2->y, 0);
+            ((X3DNodeElementGeometry2D *)ne)->Vertices.emplace_back(it2->x, it2->y, static_cast<ai_real>(0));
         }
 
         ((X3DNodeElementGeometry2D *)ne)->NumIndices = 1;
@@ -405,10 +405,10 @@ void X3DImporter::readRectangle2D(XmlNode &node) {
         float y2 = size.y / 2.0f;
         std::list<aiVector3D> &vlist = ((X3DNodeElementGeometry2D *)ne)->Vertices; // just short alias.
 
-        vlist.emplace_back(x2, y1, 0); // 1st point
-        vlist.emplace_back(x2, y2, 0); // 2nd point
-        vlist.emplace_back(x1, y2, 0); // 3rd point
-        vlist.emplace_back(x1, y1, 0); // 4th point
+        vlist.emplace_back(x2, y1, static_cast<ai_real>(0)); // 1st point
+        vlist.emplace_back(x2, y2, static_cast<ai_real>(0)); // 2nd point
+        vlist.emplace_back(x1, y2, static_cast<ai_real>(0)); // 3rd point
+        vlist.emplace_back(x1, y1, static_cast<ai_real>(0)); // 4th point
         ((X3DNodeElementGeometry2D *)ne)->Solid = solid;
         ((X3DNodeElementGeometry2D *)ne)->NumIndices = 4;
         // check for X3DMetadataObject childs.
@@ -449,7 +449,7 @@ void X3DImporter::readTriangleSet2D(XmlNode &node) {
 
         // convert vec2 to vec3
         for (std::list<aiVector2D>::iterator it2 = vertices.begin(); it2 != vertices.end(); ++it2) {
-            ((X3DNodeElementGeometry2D *)ne)->Vertices.emplace_back(it2->x, it2->y, 0);
+            ((X3DNodeElementGeometry2D *)ne)->Vertices.emplace_back(it2->x, it2->y, static_cast<ai_real>(0));
         }
 
         ((X3DNodeElementGeometry2D *)ne)->Solid = solid;

+ 2 - 6
code/AssetLib/X3D/X3DImporter_Node.hpp

@@ -108,9 +108,7 @@ struct X3DNodeElementBase {
     std::list<X3DNodeElementBase *> Children;
     X3DElemType Type;
 
-    virtual ~X3DNodeElementBase() {
-        // empty
-    }
+    virtual ~X3DNodeElementBase() = default;
 
 protected:
     X3DNodeElementBase(X3DElemType type, X3DNodeElementBase *pParent) :
@@ -367,9 +365,7 @@ struct X3DNodeElementMeta : X3DNodeElementBase {
     std::string Name; ///< Name of metadata object.
     std::string Reference;
 
-    virtual ~X3DNodeElementMeta() {
-        // empty
-    }
+    virtual ~X3DNodeElementMeta() = default;
 
 protected:
     X3DNodeElementMeta(X3DElemType type, X3DNodeElementBase *parent) :

+ 1 - 2
code/AssetLib/XGL/XGLLoader.cpp

@@ -65,8 +65,7 @@ namespace Assimp { // this has to be in here because LogFunctions is in ::Assimp
 
 template <>
 const char *LogFunctions<XGLImporter>::Prefix() {
-    static auto prefix = "XGL: ";
-	return prefix;
+	return "XGL: ";
 }
 
 } // namespace Assimp

+ 2 - 6
code/AssetLib/glTF/glTFAsset.h

@@ -629,9 +629,7 @@ struct Mesh : public Object {
         SExtension(const EType pType) :
                 Type(pType) {}
 
-        virtual ~SExtension() {
-            // empty
-        }
+        virtual ~SExtension() = default;
     };
 
 #ifdef ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC
@@ -657,9 +655,7 @@ struct Mesh : public Object {
             // empty
         }
 
-        virtual ~SCompression_Open3DGC() {
-            // empty
-        }
+        virtual ~SCompression_Open3DGC() = default;
     };
 #endif
 

+ 1 - 1
code/AssetLib/glTF/glTFImporter.cpp

@@ -80,7 +80,7 @@ static const aiImporterDesc desc = {
 };
 
 glTFImporter::glTFImporter() :
-        BaseImporter(), meshOffsets(), embeddedTexIdxs(), mScene(nullptr) {
+        mScene(nullptr) {
     // empty
 }
 

+ 2 - 12
code/AssetLib/glTF2/glTF2Asset.h

@@ -365,16 +365,7 @@ struct CustomExtension {
 
     ~CustomExtension() = default;
 
-    CustomExtension(const CustomExtension &other) :
-            name(other.name),
-            mStringValue(other.mStringValue),
-            mDoubleValue(other.mDoubleValue),
-            mUint64Value(other.mUint64Value),
-            mInt64Value(other.mInt64Value),
-            mBoolValue(other.mBoolValue),
-            mValues(other.mValues) {
-        // empty
-    }
+    CustomExtension(const CustomExtension &other) = default;
 
     CustomExtension& operator=(const CustomExtension&) = default;
 };
@@ -1086,8 +1077,7 @@ struct AssetMetadata {
 
     void Read(Document &doc);
 
-    AssetMetadata() :
-            version() {}
+    AssetMetadata() = default;
 };
 
 //

+ 1 - 5
code/AssetLib/glTF2/glTF2Importer.cpp

@@ -96,9 +96,6 @@ static const aiImporterDesc desc = {
 };
 
 glTF2Importer::glTF2Importer() :
-        BaseImporter(),
-        meshOffsets(),
-        mEmbeddedTexIdxs(),
         mScene(nullptr) {
     // empty
 }
@@ -185,7 +182,6 @@ static void SetMaterialTextureProperty(std::vector<int> &embeddedTexIdxs, Asset
             const ai_real rsin(sin(-transform.mRotation));
             transform.mTranslation.x = (static_cast<ai_real>(0.5) * transform.mScaling.x) * (-rcos + rsin + 1) + prop.TextureTransformExt_t.offset[0];
             transform.mTranslation.y = ((static_cast<ai_real>(0.5) * transform.mScaling.y) * (rsin + rcos - 1)) + 1 - transform.mScaling.y - prop.TextureTransformExt_t.offset[1];
-            ;
 
             mat->AddProperty(&transform, 1, _AI_MATKEY_UVTRANSFORM_BASE, texType, texSlot);
         }
@@ -853,7 +849,7 @@ void glTF2Importer::ImportCameras(glTF2::Asset &r) {
 
         if (cam.type == Camera::Perspective) {
             aicam->mAspect = cam.cameraProperties.perspective.aspectRatio;
-            aicam->mHorizontalFOV = cam.cameraProperties.perspective.yfov * ((aicam->mAspect == 0.f) ? 1.f : aicam->mAspect);
+            aicam->mHorizontalFOV = 2.0f * std::atan(std::tan(cam.cameraProperties.perspective.yfov * 0.5f) * ((aicam->mAspect == 0.f) ? 1.f : aicam->mAspect));
             aicam->mClipPlaneFar = cam.cameraProperties.perspective.zfar;
             aicam->mClipPlaneNear = cam.cameraProperties.perspective.znear;
         } else {

+ 1 - 3
code/Common/FileSystemFilter.h

@@ -93,9 +93,7 @@ public:
     }
 
     /** Destructor. */
-    ~FileSystemFilter() {
-        // empty
-    }
+    ~FileSystemFilter() = default;
 
     // -------------------------------------------------------------------
     /** Tests for the existence of a file at the given path. */

+ 5 - 2
code/PostProcessing/GenFaceNormalsProcess.cpp

@@ -67,6 +67,7 @@ GenFaceNormalsProcess::~GenFaceNormalsProcess() = default;
 bool GenFaceNormalsProcess::IsActive(unsigned int pFlags) const {
     force_ = (pFlags & aiProcess_ForceGenNormals) != 0;
     flippedWindingOrder_ = (pFlags & aiProcess_FlipWindingOrder) != 0;
+    leftHanded_ = (pFlags & aiProcess_MakeLeftHanded) != 0;
     return (pFlags & aiProcess_GenNormals) != 0;
 }
 
@@ -131,8 +132,10 @@ bool GenFaceNormalsProcess::GenMeshFaceNormals(aiMesh *pMesh) {
         const aiVector3D *pV1 = &pMesh->mVertices[face.mIndices[0]];
         const aiVector3D *pV2 = &pMesh->mVertices[face.mIndices[1]];
         const aiVector3D *pV3 = &pMesh->mVertices[face.mIndices[face.mNumIndices - 1]];
-        if (flippedWindingOrder_)
-            std::swap( pV2, pV3 );
+        // Boolean XOR - if either but not both of these flags is set, then the winding order has
+        // changed and the cross product to calculate the normal needs to be reversed
+        if (flippedWindingOrder_ != leftHanded_) 
+            std::swap(pV2, pV3);
         const aiVector3D vNor = ((*pV2 - *pV1) ^ (*pV3 - *pV1)).NormalizeSafe();
 
         for (unsigned int i = 0; i < face.mNumIndices; ++i) {

+ 1 - 0
code/PostProcessing/GenFaceNormalsProcess.h

@@ -81,6 +81,7 @@ private:
     bool GenMeshFaceNormals(aiMesh* pcMesh);
     mutable bool force_ = false;
     mutable bool flippedWindingOrder_ = false;
+    mutable bool leftHanded_ = false;
 };
 
 } // end of namespace Assimp

+ 5 - 2
code/PostProcessing/GenVertexNormalsProcess.cpp

@@ -69,6 +69,7 @@ GenVertexNormalsProcess::~GenVertexNormalsProcess() = default;
 bool GenVertexNormalsProcess::IsActive(unsigned int pFlags) const {
     force_ = (pFlags & aiProcess_ForceGenNormals) != 0;
     flippedWindingOrder_ = (pFlags & aiProcess_FlipWindingOrder) != 0;
+    leftHanded_ = (pFlags & aiProcess_MakeLeftHanded) != 0;
     return (pFlags & aiProcess_GenSmoothNormals) != 0;
 }
 
@@ -141,8 +142,10 @@ bool GenVertexNormalsProcess::GenMeshVertexNormals(aiMesh *pMesh, unsigned int m
         const aiVector3D *pV1 = &pMesh->mVertices[face.mIndices[0]];
         const aiVector3D *pV2 = &pMesh->mVertices[face.mIndices[1]];
         const aiVector3D *pV3 = &pMesh->mVertices[face.mIndices[face.mNumIndices - 1]];
-        if (flippedWindingOrder_)
-            std::swap( pV2, pV3 );
+        // Boolean XOR - if either but not both of these flags is set, then the winding order has
+        // changed and the cross product to calculate the normal needs to be reversed
+        if (flippedWindingOrder_ != leftHanded_)
+            std::swap(pV2, pV3);
         const aiVector3D vNor = ((*pV2 - *pV1) ^ (*pV3 - *pV1)).NormalizeSafe();
 
         for (unsigned int i = 0; i < face.mNumIndices; ++i) {

+ 1 - 0
code/PostProcessing/GenVertexNormalsProcess.h

@@ -105,6 +105,7 @@ private:
     ai_real configMaxAngle;
     mutable bool force_ = false;
     mutable bool flippedWindingOrder_ = false;
+    mutable bool leftHanded_ = false;
 };
 
 } // end of namespace Assimp

+ 1 - 3
include/assimp/IOStream.hpp

@@ -128,9 +128,7 @@ public:
 
 // ----------------------------------------------------------------------------------
 AI_FORCE_INLINE
-IOStream::IOStream() AI_NO_EXCEPT {
-    // empty
-}
+IOStream::IOStream() AI_NO_EXCEPT = default;
 
 // ----------------------------------------------------------------------------------
 AI_FORCE_INLINE

+ 1 - 3
include/assimp/IOStreamBuffer.h

@@ -141,9 +141,7 @@ AI_FORCE_INLINE IOStreamBuffer<T>::IOStreamBuffer(size_t cache) :
 }
 
 template <class T>
-AI_FORCE_INLINE IOStreamBuffer<T>::~IOStreamBuffer() {
-    // empty
-}
+AI_FORCE_INLINE IOStreamBuffer<T>::~IOStreamBuffer() = default;
 
 template <class T>
 AI_FORCE_INLINE bool IOStreamBuffer<T>::open(IOStream *stream) {

+ 1 - 4
include/assimp/IOSystem.hpp

@@ -237,10 +237,7 @@ private:
 };
 
 // ----------------------------------------------------------------------------
-AI_FORCE_INLINE IOSystem::IOSystem() AI_NO_EXCEPT :
-        m_pathStack() {
-    // empty
-}
+AI_FORCE_INLINE IOSystem::IOSystem() AI_NO_EXCEPT = default;
 
 // ----------------------------------------------------------------------------
 AI_FORCE_INLINE IOSystem::~IOSystem() = default;

+ 1 - 4
include/assimp/LineSplitter.h

@@ -145,7 +145,6 @@ private:
 
 AI_FORCE_INLINE LineSplitter::LineSplitter(StreamReaderLE& stream, bool skip_empty_lines, bool trim ) :
         mIdx(0),
-        mCur(),
         mStream(stream),
         mSwallow(),
         mSkip_empty_lines(skip_empty_lines),
@@ -155,9 +154,7 @@ AI_FORCE_INLINE LineSplitter::LineSplitter(StreamReaderLE& stream, bool skip_emp
     mIdx = 0;
 }
 
-AI_FORCE_INLINE LineSplitter::~LineSplitter() {
-    // empty
-}
+AI_FORCE_INLINE LineSplitter::~LineSplitter() = default;
 
 AI_FORCE_INLINE LineSplitter& LineSplitter::operator++() {
     if (mSwallow) {

+ 1 - 2
include/assimp/MemoryIOWrapper.h

@@ -162,8 +162,7 @@ public:
     }
 
     /** Destructor. */
-    ~MemoryIOSystem() {
-    }
+    ~MemoryIOSystem() = default;
 
     // -------------------------------------------------------------------
     /** Tests for the existence of a file at the given path. */

+ 1 - 3
include/assimp/Profiler.h

@@ -68,9 +68,7 @@ using namespace Formatter;
  */
 class Profiler {
 public:
-    Profiler() {
-        // empty
-    }
+    Profiler() = default;
 
 
     /** Start a named timer */

+ 2 - 6
include/assimp/ProgressHandler.hpp

@@ -67,15 +67,11 @@ class ASSIMP_API ProgressHandler
 {
 protected:
     /// @brief  Default constructor
-    ProgressHandler () AI_NO_EXCEPT {
-        // empty
-    }
+    ProgressHandler () AI_NO_EXCEPT = default;
 
 public:
     /// @brief  Virtual destructor.
-    virtual ~ProgressHandler () {
-        // empty
-    }
+    virtual ~ProgressHandler () = default;
 
     // -------------------------------------------------------------------
     /** @brief Progress callback.

+ 2 - 6
include/assimp/SceneCombiner.h

@@ -191,13 +191,9 @@ struct SceneHelper {
  */
 class ASSIMP_API SceneCombiner {
     // class cannot be instanced
-    SceneCombiner() {
-        // empty
-    }
+    SceneCombiner() = delete;
 
-    ~SceneCombiner() {
-        // empty
-    }
+    ~SceneCombiner() = delete;
 
 public:
     // -------------------------------------------------------------------

+ 4 - 1
include/assimp/anim.h

@@ -198,7 +198,10 @@ struct aiMeshMorphKey {
     /** The time of this key */
     double mTime;
 
-    /** The values and weights at the time of this key */
+    /** The values and weights at the time of this key
+     *   - mValues: index of attachment mesh to apply weight at the same position in mWeights
+     *   - mWeights: weight to apply to the blend shape index at the same position in mValues
+     */
     unsigned int *mValues;
     double *mWeights;
 

+ 9 - 2
include/assimp/mesh.h

@@ -737,13 +737,20 @@ struct aiMesh {
      **/
     C_STRUCT aiString mName;
 
-    /** The number of attachment meshes. Note! Currently only works with Collada loader. */
+    /** The number of attachment meshes.
+     *  Currently known to work with loaders:
+     *   - Collada
+     *   - gltf
+     */
     unsigned int mNumAnimMeshes;
 
     /** Attachment meshes for this mesh, for vertex-based animation.
      *  Attachment meshes carry replacement data for some of the
      *  mesh'es vertex components (usually positions, normals).
-     *  Note! Currently only works with Collada loader.*/
+     *  Currently known to work with loaders:
+     *   - Collada
+     *   - gltf
+     */
     C_STRUCT aiAnimMesh **mAnimMeshes;
 
     /**

+ 7 - 2
port/PyAssimp/pyassimp/structs.py

@@ -748,13 +748,18 @@ class Mesh(Structure):
             #   - Vertex animations refer to meshes by their names.
             ("mName", String),
 
-            # The number of attachment meshes. Note! Currently only works with Collada loader.
+            # The number of attachment meshes. 
+            # Currently known to work with loaders:
+            #  - Collada
+            #  - gltf
             ("mNumAnimMeshes", c_uint),
 
             # Attachment meshes for this mesh, for vertex-based animation.
             # Attachment meshes carry replacement data for some of the
             # mesh'es vertex components (usually positions, normals).
-            # Note! Currently only works with Collada loader.
+            # Currently known to work with loaders:
+            #  - Collada
+            #  - gltf
             ("mAnimMeshes", POINTER(POINTER(AnimMesh))),
 
             # Method of morphing when animeshes are specified.