Ver Fonte

Refactoring: Code cleanup post-processing.

Kim Kulling há 2 anos atrás
pai
commit
31ae9cde1c
29 ficheiros alterados com 93 adições e 149 exclusões
  1. 0 4
      code/PostProcessing/CalcTangentsProcess.cpp
  2. 5 10
      code/PostProcessing/CalcTangentsProcess.h
  3. 0 8
      code/PostProcessing/ComputeUVMappingProcess.cpp
  4. 7 12
      code/PostProcessing/ComputeUVMappingProcess.h
  5. 0 16
      code/PostProcessing/ConvertToLHProcess.cpp
  6. 10 17
      code/PostProcessing/ConvertToLHProcess.h
  7. 2 2
      code/PostProcessing/DeboneProcess.h
  8. 2 3
      code/PostProcessing/DropFaceNormalsProcess.h
  9. 3 3
      code/PostProcessing/EmbedTexturesProcess.h
  10. 3 3
      code/PostProcessing/FindDegenerates.h
  11. 7 8
      code/PostProcessing/FindInstancesProcess.h
  12. 3 3
      code/PostProcessing/FindInvalidDataProcess.h
  13. 2 2
      code/PostProcessing/FixNormalsStep.h
  14. 2 3
      code/PostProcessing/GenFaceNormalsProcess.h
  15. 3 4
      code/PostProcessing/GenVertexNormalsProcess.h
  16. 3 3
      code/PostProcessing/ImproveCacheLocality.h
  17. 2 2
      code/PostProcessing/JoinVerticesProcess.h
  18. 9 9
      code/PostProcessing/LimitBoneWeightsProcess.h
  19. 2 2
      code/PostProcessing/MakeVerboseFormat.h
  20. 3 5
      code/PostProcessing/OptimizeMeshes.h
  21. 3 3
      code/PostProcessing/RemoveRedundantMaterials.h
  22. 5 7
      code/PostProcessing/RemoveVCProcess.h
  23. 3 3
      code/PostProcessing/ScaleProcess.h
  24. 3 3
      code/PostProcessing/SortByPTypeProcess.h
  25. 1 1
      code/PostProcessing/SplitByBoneCountProcess.h
  26. 2 2
      code/PostProcessing/SplitLargeMeshes.h
  27. 3 4
      code/PostProcessing/TextureTransform.h
  28. 2 2
      code/PostProcessing/TriangulateProcess.h
  29. 3 5
      code/PostProcessing/ValidateDataStructure.h

+ 0 - 4
code/PostProcessing/CalcTangentsProcess.cpp

@@ -60,10 +60,6 @@ CalcTangentsProcess::CalcTangentsProcess() :
     // nothing to do here
     // nothing to do here
 }
 }
 
 
-// ------------------------------------------------------------------------------------------------
-// Destructor, private as well
-CalcTangentsProcess::~CalcTangentsProcess() = default;
-
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Returns whether the processing step is present in the given flag field.
 // Returns whether the processing step is present in the given flag field.
 bool CalcTangentsProcess::IsActive(unsigned int pFlags) const {
 bool CalcTangentsProcess::IsActive(unsigned int pFlags) const {

+ 5 - 10
code/PostProcessing/CalcTangentsProcess.h

@@ -59,14 +59,11 @@ namespace Assimp
  * because the joining of vertices also considers tangents and bitangents for
  * because the joining of vertices also considers tangents and bitangents for
  * uniqueness.
  * uniqueness.
  */
  */
-class ASSIMP_API_WINONLY CalcTangentsProcess : public BaseProcess
-{
+class ASSIMP_API_WINONLY CalcTangentsProcess : public BaseProcess {
 public:
 public:
-
     CalcTangentsProcess();
     CalcTangentsProcess();
-    ~CalcTangentsProcess();
+    ~CalcTangentsProcess() override = default;
 
 
-public:
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Returns whether the processing step is present in the given flag.
     /** Returns whether the processing step is present in the given flag.
     * @param pFlags The processing flags the importer was called with.
     * @param pFlags The processing flags the importer was called with.
@@ -74,19 +71,17 @@ public:
     * @return true if the process is present in this flag fields,
     * @return true if the process is present in this flag fields,
     *   false if not.
     *   false if not.
     */
     */
-    bool IsActive( unsigned int pFlags) const;
+    bool IsActive( unsigned int pFlags) const override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Called prior to ExecuteOnScene().
     /** Called prior to ExecuteOnScene().
     * The function is a request to the process to update its configuration
     * The function is a request to the process to update its configuration
     * basing on the Importer's configuration property list.
     * basing on the Importer's configuration property list.
     */
     */
-    void SetupProperties(const Importer* pImp);
-
+    void SetupProperties(const Importer* pImp) override;
 
 
     // setter for configMaxAngle
     // setter for configMaxAngle
-    inline void SetMaxSmoothAngle(float f)
-    {
+    void SetMaxSmoothAngle(float f) {
         configMaxAngle =f;
         configMaxAngle =f;
     }
     }
 
 

+ 0 - 8
code/PostProcessing/ComputeUVMappingProcess.cpp

@@ -57,14 +57,6 @@ namespace {
     const static ai_real angle_epsilon = ai_real( 0.95 );
     const static ai_real angle_epsilon = ai_real( 0.95 );
 }
 }
 
 
-// ------------------------------------------------------------------------------------------------
-// Constructor to be privately used by Importer
-ComputeUVMappingProcess::ComputeUVMappingProcess() = default;
-
-// ------------------------------------------------------------------------------------------------
-// Destructor, private as well
-ComputeUVMappingProcess::~ComputeUVMappingProcess() = default;
-
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Returns whether the processing step is present in the given flag field.
 // Returns whether the processing step is present in the given flag field.
 bool ComputeUVMappingProcess::IsActive( unsigned int pFlags) const
 bool ComputeUVMappingProcess::IsActive( unsigned int pFlags) const

+ 7 - 12
code/PostProcessing/ComputeUVMappingProcess.h

@@ -59,13 +59,10 @@ namespace Assimp {
 /** ComputeUVMappingProcess - converts special mappings, such as spherical,
 /** ComputeUVMappingProcess - converts special mappings, such as spherical,
  *  cylindrical or boxed to proper UV coordinates for rendering.
  *  cylindrical or boxed to proper UV coordinates for rendering.
 */
 */
-class ComputeUVMappingProcess : public BaseProcess
-{
-public:
-    ComputeUVMappingProcess();
-    ~ComputeUVMappingProcess();
-
+class ComputeUVMappingProcess : public BaseProcess {
 public:
 public:
+    ComputeUVMappingProcess() = default;
+    ~ComputeUVMappingProcess() override = default;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Returns whether the processing step is present in the given flag field.
     /** Returns whether the processing step is present in the given flag field.
@@ -73,14 +70,14 @@ public:
     *   combination of #aiPostProcessSteps.
     *   combination of #aiPostProcessSteps.
     * @return true if the process is present in this flag fields, false if not.
     * @return true if the process is present in this flag fields, false if not.
     */
     */
-    bool IsActive( unsigned int pFlags) const;
+    bool IsActive( unsigned int pFlags) const override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Executes the post processing step on the given imported data.
     /** Executes the post processing step on the given imported data.
     * At the moment a process is not supposed to fail.
     * At the moment a process is not supposed to fail.
     * @param pScene The imported data to work at.
     * @param pScene The imported data to work at.
     */
     */
-    void Execute( aiScene* pScene);
+    void Execute( aiScene* pScene) override;
 
 
 protected:
 protected:
 
 
@@ -125,8 +122,7 @@ protected:
 private:
 private:
 
 
     // temporary structure to describe a mapping
     // temporary structure to describe a mapping
-    struct MappingInfo
-    {
+    struct MappingInfo {
         explicit MappingInfo(aiTextureMapping _type)
         explicit MappingInfo(aiTextureMapping _type)
             : type  (_type)
             : type  (_type)
             , axis  (0.f,1.f,0.f)
             , axis  (0.f,1.f,0.f)
@@ -137,8 +133,7 @@ private:
         aiVector3D axis;
         aiVector3D axis;
         unsigned int uv;
         unsigned int uv;
 
 
-        bool operator== (const MappingInfo& other)
-        {
+        bool operator== (const MappingInfo& other) {
             return type == other.type && axis == other.axis;
             return type == other.type && axis == other.axis;
         }
         }
     };
     };

+ 0 - 16
code/PostProcessing/ConvertToLHProcess.cpp

@@ -79,14 +79,6 @@ void flipUVs(aiMeshType *pMesh) {
 
 
 } // namespace
 } // namespace
 
 
-// ------------------------------------------------------------------------------------------------
-// Constructor to be privately used by Importer
-MakeLeftHandedProcess::MakeLeftHandedProcess() = default;
-
-// ------------------------------------------------------------------------------------------------
-// Destructor, private as well
-MakeLeftHandedProcess::~MakeLeftHandedProcess() = default;
-
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Returns whether the processing step is present in the given flag field.
 // Returns whether the processing step is present in the given flag field.
 bool MakeLeftHandedProcess::IsActive(unsigned int pFlags) const {
 bool MakeLeftHandedProcess::IsActive(unsigned int pFlags) const {
@@ -305,14 +297,6 @@ void FlipUVsProcess::ProcessMesh(aiMesh *pMesh) {
 #ifndef ASSIMP_BUILD_NO_FLIPWINDING_PROCESS
 #ifndef ASSIMP_BUILD_NO_FLIPWINDING_PROCESS
 // # FlipWindingOrderProcess
 // # FlipWindingOrderProcess
 
 
-// ------------------------------------------------------------------------------------------------
-// Constructor to be privately used by Importer
-FlipWindingOrderProcess::FlipWindingOrderProcess() = default;
-
-// ------------------------------------------------------------------------------------------------
-// Destructor, private as well
-FlipWindingOrderProcess::~FlipWindingOrderProcess() = default;
-
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 // Returns whether the processing step is present in the given flag field.
 // Returns whether the processing step is present in the given flag field.
 bool FlipWindingOrderProcess::IsActive(unsigned int pFlags) const {
 bool FlipWindingOrderProcess::IsActive(unsigned int pFlags) const {

+ 10 - 17
code/PostProcessing/ConvertToLHProcess.h

@@ -4,7 +4,6 @@ Open Asset Import Library (assimp)
 
 
 Copyright (c) 2006-2022, assimp team
 Copyright (c) 2006-2022, assimp team
 
 
-
 All rights reserved.
 All rights reserved.
 
 
 Redistribution and use of this software in source and binary forms,
 Redistribution and use of this software in source and binary forms,
@@ -72,22 +71,18 @@ namespace Assimp    {
  *
  *
  * @note RH-LH and LH-RH is the same, so this class can be used for both
  * @note RH-LH and LH-RH is the same, so this class can be used for both
  */
  */
-class MakeLeftHandedProcess : public BaseProcess
-{
-
-
+class MakeLeftHandedProcess : public BaseProcess {
 public:
 public:
-    MakeLeftHandedProcess();
-    ~MakeLeftHandedProcess();
+    MakeLeftHandedProcess() = default;
+    ~MakeLeftHandedProcess() override = default;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
-    bool IsActive( unsigned int pFlags) const;
+    bool IsActive( unsigned int pFlags) const override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
-    void Execute( aiScene* pScene);
+    void Execute( aiScene* pScene) override;
 
 
 protected:
 protected:
-
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Recursively converts a node and all of its children
     /** Recursively converts a node and all of its children
      */
      */
@@ -120,24 +115,22 @@ protected:
 // ---------------------------------------------------------------------------
 // ---------------------------------------------------------------------------
 /** Postprocessing step to flip the face order of the imported data
 /** Postprocessing step to flip the face order of the imported data
  */
  */
-class FlipWindingOrderProcess : public BaseProcess
-{
+class FlipWindingOrderProcess : public BaseProcess {
     friend class Importer;
     friend class Importer;
 
 
 public:
 public:
     /** Constructor to be privately used by Importer */
     /** Constructor to be privately used by Importer */
-    FlipWindingOrderProcess();
+    FlipWindingOrderProcess() = default;
 
 
     /** Destructor, private as well */
     /** Destructor, private as well */
-    ~FlipWindingOrderProcess();
+    ~FlipWindingOrderProcess() override = default;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
-    bool IsActive( unsigned int pFlags) const;
+    bool IsActive( unsigned int pFlags) const override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
-    void Execute( aiScene* pScene);
+    void Execute( aiScene* pScene) override;
 
 
-public:
     /** Some other types of post-processing require winding order flips */
     /** Some other types of post-processing require winding order flips */
     static void ProcessMesh( aiMesh* pMesh);
     static void ProcessMesh( aiMesh* pMesh);
 };
 };

+ 2 - 2
code/PostProcessing/DeboneProcess.h

@@ -79,14 +79,14 @@ public:
     * @return true if the process is present in this flag fields,
     * @return true if the process is present in this flag fields,
     *   false if not.
     *   false if not.
     */
     */
-    bool IsActive( unsigned int pFlags) const;
+    bool IsActive( unsigned int pFlags) const override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Called prior to ExecuteOnScene().
     /** Called prior to ExecuteOnScene().
     * The function is a request to the process to update its configuration
     * The function is a request to the process to update its configuration
     * basing on the Importer's configuration property list.
     * basing on the Importer's configuration property list.
     */
     */
-    void SetupProperties(const Importer* pImp);
+    void SetupProperties(const Importer* pImp) override;
 
 
 protected:
 protected:
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------

+ 2 - 3
code/PostProcessing/DropFaceNormalsProcess.h

@@ -64,15 +64,14 @@ public:
     *   combination of #aiPostProcessSteps.
     *   combination of #aiPostProcessSteps.
     * @return true if the process is present in this flag fields, false if not.
     * @return true if the process is present in this flag fields, false if not.
     */
     */
-    bool IsActive( unsigned int pFlags) const;
+    bool IsActive( unsigned int pFlags) const override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Executes the post processing step on the given imported data.
     /** Executes the post processing step on the given imported data.
     * At the moment a process is not supposed to fail.
     * At the moment a process is not supposed to fail.
     * @param pScene The imported data to work at.
     * @param pScene The imported data to work at.
     */
     */
-    void Execute( aiScene* pScene);
-
+    void Execute( aiScene* pScene) override;
 
 
 private:
 private:
     bool DropMeshFaceNormals(aiMesh* pcMesh);
     bool DropMeshFaceNormals(aiMesh* pcMesh);

+ 3 - 3
code/PostProcessing/EmbedTexturesProcess.h

@@ -68,13 +68,13 @@ public:
     ~EmbedTexturesProcess() override = default;
     ~EmbedTexturesProcess() override = default;
 
 
     /// Overwritten, @see BaseProcess
     /// Overwritten, @see BaseProcess
-    virtual bool IsActive(unsigned int pFlags) const;
+    bool IsActive(unsigned int pFlags) const override;
 
 
     /// Overwritten, @see BaseProcess
     /// Overwritten, @see BaseProcess
-    virtual void SetupProperties(const Importer* pImp);
+    void SetupProperties(const Importer* pImp) override;
 
 
     /// Overwritten, @see BaseProcess
     /// Overwritten, @see BaseProcess
-    virtual void Execute(aiScene* pScene);
+    virtual void Execute(aiScene* pScene) override;
 
 
 private:
 private:
     // Resolve the path and add the file content to the scene as a texture.
     // Resolve the path and add the file content to the scene as a texture.

+ 3 - 3
code/PostProcessing/FindDegenerates.h

@@ -63,15 +63,15 @@ public:
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     // Check whether step is active
     // Check whether step is active
-    bool IsActive( unsigned int pFlags) const;
+    bool IsActive( unsigned int pFlags) const override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     // Execute step on a given scene
     // Execute step on a given scene
-    void Execute( aiScene* pScene);
+    void Execute( aiScene* pScene) override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     // Setup import settings
     // Setup import settings
-    void SetupProperties(const Importer* pImp);
+    void SetupProperties(const Importer* pImp) override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     // Execute step on a given mesh
     // Execute step on a given mesh

+ 7 - 8
code/PostProcessing/FindInstancesProcess.h

@@ -50,7 +50,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "PostProcessing/ProcessHelper.h"
 #include "PostProcessing/ProcessHelper.h"
 
 
 class FindInstancesProcessTest;
 class FindInstancesProcessTest;
-namespace Assimp    {
+
+namespace Assimp {
 
 
 // -------------------------------------------------------------------------------
 // -------------------------------------------------------------------------------
 /** @brief Get a pseudo(!)-hash representing a mesh.
 /** @brief Get a pseudo(!)-hash representing a mesh.
@@ -60,8 +61,7 @@ namespace Assimp    {
  *  @param in Input mesh
  *  @param in Input mesh
  *  @return Hash.
  *  @return Hash.
  */
  */
-inline
-uint64_t GetMeshHash(aiMesh* in) {
+inline uint64_t GetMeshHash(aiMesh* in) {
     ai_assert(nullptr != in);
     ai_assert(nullptr != in);
 
 
     // ... get an unique value representing the vertex format of the mesh
     // ... get an unique value representing the vertex format of the mesh
@@ -83,8 +83,7 @@ uint64_t GetMeshHash(aiMesh* in) {
  *  @param e Epsilon
  *  @param e Epsilon
  *  @return true if the arrays are identical
  *  @return true if the arrays are identical
  */
  */
-inline
-bool CompareArrays(const aiVector3D* first, const aiVector3D* second,
+inline bool CompareArrays(const aiVector3D* first, const aiVector3D* second,
         unsigned int size, float e) {
         unsigned int size, float e) {
     for (const aiVector3D* end = first+size; first != end; ++first,++second) {
     for (const aiVector3D* end = first+size; first != end; ++first,++second) {
         if ( (*first - *second).SquareLength() >= e)
         if ( (*first - *second).SquareLength() >= e)
@@ -114,15 +113,15 @@ public:
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     // Check whether step is active in given flags combination
     // Check whether step is active in given flags combination
-    bool IsActive( unsigned int pFlags) const;
+    bool IsActive( unsigned int pFlags) const override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     // Execute step on a given scene
     // Execute step on a given scene
-    void Execute( aiScene* pScene);
+    void Execute( aiScene* pScene) override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     // Setup properties prior to executing the process
     // Setup properties prior to executing the process
-    void SetupProperties(const Importer* pImp);
+    void SetupProperties(const Importer* pImp) override;
 
 
 private:
 private:
     bool configSpeedFlag;
     bool configSpeedFlag;

+ 3 - 3
code/PostProcessing/FindInvalidDataProcess.h

@@ -71,15 +71,15 @@ public:
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /// Returns active state.
     /// Returns active state.
-    bool IsActive(unsigned int pFlags) const;
+    bool IsActive(unsigned int pFlags) const override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /// Setup import settings
     /// Setup import settings
-    void SetupProperties(const Importer *pImp);
+    void SetupProperties(const Importer *pImp) override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /// Run the step
     /// Run the step
-    void Execute(aiScene *pScene);
+    void Execute(aiScene *pScene) override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /// Executes the post-processing step on the given mesh
     /// Executes the post-processing step on the given mesh

+ 2 - 2
code/PostProcessing/FixNormalsStep.h

@@ -69,14 +69,14 @@ public:
      *   combination of #aiPostProcessSteps.
      *   combination of #aiPostProcessSteps.
      * @return true if the process is present in this flag fields, false if not.
      * @return true if the process is present in this flag fields, false if not.
     */
     */
-    bool IsActive( unsigned int pFlags) const;
+    bool IsActive( unsigned int pFlags) const override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Executes the post processing step on the given imported data.
     /** Executes the post processing step on the given imported data.
     * At the moment a process is not supposed to fail.
     * At the moment a process is not supposed to fail.
     * @param pScene The imported data to work at.
     * @param pScene The imported data to work at.
     */
     */
-    void Execute( aiScene* pScene);
+    void Execute( aiScene* pScene) override;
 
 
 protected:
 protected:
 
 

+ 2 - 3
code/PostProcessing/GenFaceNormalsProcess.h

@@ -66,15 +66,14 @@ public:
     *   combination of #aiPostProcessSteps.
     *   combination of #aiPostProcessSteps.
     * @return true if the process is present in this flag fields, false if not.
     * @return true if the process is present in this flag fields, false if not.
     */
     */
-    bool IsActive( unsigned int pFlags) const;
+    bool IsActive( unsigned int pFlags) const override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Executes the post processing step on the given imported data.
     /** Executes the post processing step on the given imported data.
     * At the moment a process is not supposed to fail.
     * At the moment a process is not supposed to fail.
     * @param pScene The imported data to work at.
     * @param pScene The imported data to work at.
     */
     */
-    void Execute( aiScene* pScene);
-
+    void Execute( aiScene* pScene) override;
 
 
 private:
 private:
     bool GenMeshFaceNormals(aiMesh* pcMesh);
     bool GenMeshFaceNormals(aiMesh* pcMesh);

+ 3 - 4
code/PostProcessing/GenVertexNormalsProcess.h

@@ -72,22 +72,21 @@ public:
     * @return true if the process is present in this flag fields,
     * @return true if the process is present in this flag fields,
     *   false if not.
     *   false if not.
     */
     */
-    bool IsActive( unsigned int pFlags) const;
+    bool IsActive( unsigned int pFlags) const override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Called prior to ExecuteOnScene().
     /** Called prior to ExecuteOnScene().
     * The function is a request to the process to update its configuration
     * The function is a request to the process to update its configuration
     * basing on the Importer's configuration property list.
     * basing on the Importer's configuration property list.
     */
     */
-    void SetupProperties(const Importer* pImp);
+    void SetupProperties(const Importer* pImp) override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Executes the post processing step on the given imported data.
     /** Executes the post processing step on the given imported data.
     * At the moment a process is not supposed to fail.
     * At the moment a process is not supposed to fail.
     * @param pScene The imported data to work at.
     * @param pScene The imported data to work at.
     */
     */
-    void Execute( aiScene* pScene);
-
+    void Execute( aiScene* pScene) override;
 
 
     // setter for configMaxAngle
     // setter for configMaxAngle
     inline void SetMaxSmoothAngle(ai_real f) {
     inline void SetMaxSmoothAngle(ai_real f) {

+ 3 - 3
code/PostProcessing/ImproveCacheLocality.h

@@ -69,15 +69,15 @@ public:
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     // Check whether the pp step is active
     // Check whether the pp step is active
-    bool IsActive( unsigned int pFlags) const;
+    bool IsActive( unsigned int pFlags) const override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     // Executes the pp step on a given scene
     // Executes the pp step on a given scene
-    void Execute( aiScene* pScene);
+    void Execute( aiScene* pScene) override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     // Configures the pp step
     // Configures the pp step
-    void SetupProperties(const Importer* pImp);
+    void SetupProperties(const Importer* pImp) override;
 
 
 protected:
 protected:
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------

+ 2 - 2
code/PostProcessing/JoinVerticesProcess.h

@@ -74,14 +74,14 @@ public:
      *   combination of #aiPostProcessSteps.
      *   combination of #aiPostProcessSteps.
      * @return true if the process is present in this flag fields, false if not.
      * @return true if the process is present in this flag fields, false if not.
     */
     */
-    bool IsActive( unsigned int pFlags) const;
+    bool IsActive( unsigned int pFlags) const override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Executes the post processing step on the given imported data.
     /** Executes the post processing step on the given imported data.
     * At the moment a process is not supposed to fail.
     * At the moment a process is not supposed to fail.
     * @param pScene The imported data to work at.
     * @param pScene The imported data to work at.
     */
     */
-    void Execute( aiScene* pScene);
+    void Execute( aiScene* pScene) override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Unites identical vertices in the given mesh.
     /** Unites identical vertices in the given mesh.

+ 9 - 9
code/PostProcessing/LimitBoneWeightsProcess.h

@@ -86,27 +86,27 @@ public:
     * @return true if the process is present in this flag fields,
     * @return true if the process is present in this flag fields,
     *   false if not.
     *   false if not.
     */
     */
-    bool IsActive( unsigned int pFlags) const;
+    bool IsActive( unsigned int pFlags) const override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Called prior to ExecuteOnScene().
     /** Called prior to ExecuteOnScene().
     * The function is a request to the process to update its configuration
     * The function is a request to the process to update its configuration
     * basing on the Importer's configuration property list.
     * basing on the Importer's configuration property list.
     */
     */
-    void SetupProperties(const Importer* pImp);
-
-    // -------------------------------------------------------------------
-    /** Limits the bone weight count for all vertices in the given mesh.
-    * @param pMesh The mesh to process.
-    */
-    void ProcessMesh( aiMesh* pMesh);
+    void SetupProperties(const Importer* pImp) override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Executes the post processing step on the given imported data.
     /** Executes the post processing step on the given imported data.
     * At the moment a process is not supposed to fail.
     * At the moment a process is not supposed to fail.
     * @param pScene The imported data to work at.
     * @param pScene The imported data to work at.
     */
     */
-    void Execute( aiScene* pScene);
+    void Execute( aiScene* pScene) override;
+
+    // -------------------------------------------------------------------
+    /** Limits the bone weight count for all vertices in the given mesh.
+    * @param pMesh The mesh to process.
+    */
+    void ProcessMesh( aiMesh* pMesh);
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Describes a bone weight on a vertex */
     /** Describes a bone weight on a vertex */

+ 2 - 2
code/PostProcessing/MakeVerboseFormat.h

@@ -78,7 +78,7 @@ public:
     * @param pFlags The processing flags the importer was called with. A bitwise
     * @param pFlags The processing flags the importer was called with. A bitwise
     *   combination of #aiPostProcessSteps.
     *   combination of #aiPostProcessSteps.
     * @return true if the process is present in this flag fields, false if not */
     * @return true if the process is present in this flag fields, false if not */
-    bool IsActive( unsigned int /*pFlags*/ ) const
+    bool IsActive( unsigned int /*pFlags*/ ) const  override
     {
     {
         // NOTE: There is no direct flag that corresponds to
         // NOTE: There is no direct flag that corresponds to
         // this postprocess step.
         // this postprocess step.
@@ -89,7 +89,7 @@ public:
     /** Executes the post processing step on the given imported data.
     /** Executes the post processing step on the given imported data.
     * At the moment a process is not supposed to fail.
     * At the moment a process is not supposed to fail.
     * @param pScene The imported data to work at. */
     * @param pScene The imported data to work at. */
-    void Execute( aiScene* pScene);
+    void Execute( aiScene* pScene) override;
 
 
 public:
 public:
 
 

+ 3 - 5
code/PostProcessing/OptimizeMeshes.h

@@ -93,16 +93,14 @@ public:
         unsigned int output_id;
         unsigned int output_id;
     };
     };
 
 
-public:
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
-    bool IsActive( unsigned int pFlags) const;
+    bool IsActive( unsigned int pFlags) const override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
-    void Execute( aiScene* pScene);
+    void Execute( aiScene* pScene) override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
-    void SetupProperties(const Importer* pImp);
-
+    void SetupProperties(const Importer* pImp) override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** @brief Specify whether you want meshes with different
     /** @brief Specify whether you want meshes with different

+ 3 - 3
code/PostProcessing/RemoveRedundantMaterials.h

@@ -66,15 +66,15 @@ public:
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     // Check whether step is active
     // Check whether step is active
-    bool IsActive( unsigned int pFlags) const;
+    bool IsActive( unsigned int pFlags) const override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     // Execute step on a given scene
     // Execute step on a given scene
-    void Execute( aiScene* pScene);
+    void Execute( aiScene* pScene) override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     // Setup import settings
     // Setup import settings
-    void SetupProperties(const Importer* pImp);
+    void SetupProperties(const Importer* pImp) override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** @brief Set list of fixed (inmutable) materials
     /** @brief Set list of fixed (inmutable) materials

+ 5 - 7
code/PostProcessing/RemoveVCProcess.h

@@ -69,37 +69,35 @@ public:
     *   combination of #aiPostProcessSteps.
     *   combination of #aiPostProcessSteps.
     * @return true if the process is present in this flag fields, false if not.
     * @return true if the process is present in this flag fields, false if not.
     */
     */
-    bool IsActive( unsigned int pFlags) const;
+    bool IsActive( unsigned int pFlags) const override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Executes the post processing step on the given imported data.
     /** Executes the post processing step on the given imported data.
     * At the moment a process is not supposed to fail.
     * At the moment a process is not supposed to fail.
     * @param pScene The imported data to work at.
     * @param pScene The imported data to work at.
     */
     */
-    void Execute( aiScene* pScene);
+    void Execute( aiScene* pScene) override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Called prior to ExecuteOnScene().
     /** Called prior to ExecuteOnScene().
     * The function is a request to the process to update its configuration
     * The function is a request to the process to update its configuration
     * basing on the Importer's configuration property list.
     * basing on the Importer's configuration property list.
     */
     */
-    virtual void SetupProperties(const Importer* pImp);
+    virtual void SetupProperties(const Importer* pImp) override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Manually setup the configuration flags for the step
     /** Manually setup the configuration flags for the step
      *
      *
      *  @param Bitwise combination of the #aiComponent enumerated values.
      *  @param Bitwise combination of the #aiComponent enumerated values.
     */
     */
-    void SetDeleteFlags(unsigned int f)
-    {
+    void SetDeleteFlags(unsigned int f) {
         configDeleteFlags = f;
         configDeleteFlags = f;
     }
     }
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Query the current configuration.
     /** Query the current configuration.
     */
     */
-    unsigned int GetDeleteFlags() const
-    {
+    unsigned int GetDeleteFlags() const {
         return configDeleteFlags;
         return configDeleteFlags;
     }
     }
 
 

+ 3 - 3
code/PostProcessing/ScaleProcess.h

@@ -74,13 +74,13 @@ public:
     ai_real getScale() const;
     ai_real getScale() const;
 
 
     /// Overwritten, @see BaseProcess
     /// Overwritten, @see BaseProcess
-    virtual bool IsActive( unsigned int pFlags ) const;
+    virtual bool IsActive( unsigned int pFlags ) const override;
 
 
     /// Overwritten, @see BaseProcess
     /// Overwritten, @see BaseProcess
-    virtual void SetupProperties( const Importer* pImp );
+    virtual void SetupProperties( const Importer* pImp ) override;
 
 
     /// Overwritten, @see BaseProcess
     /// Overwritten, @see BaseProcess
-    virtual void Execute( aiScene* pScene );
+    virtual void Execute( aiScene* pScene ) override;
 
 
 private:
 private:
     void traverseNodes( aiNode *currentNode, unsigned int nested_node_id = 0 );
     void traverseNodes( aiNode *currentNode, unsigned int nested_node_id = 0 );

+ 3 - 3
code/PostProcessing/SortByPTypeProcess.h

@@ -66,13 +66,13 @@ public:
     ~SortByPTypeProcess() override = default;
     ~SortByPTypeProcess() override = default;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
-    bool IsActive( unsigned int pFlags) const;
+    bool IsActive( unsigned int pFlags) const override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
-    void Execute( aiScene* pScene);
+    void Execute( aiScene* pScene) override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
-    void SetupProperties(const Importer* pImp);
+    void SetupProperties(const Importer* pImp) override;
 
 
 private:
 private:
     int mConfigRemoveMeshes;
     int mConfigRemoveMeshes;

+ 1 - 1
code/PostProcessing/SplitByBoneCountProcess.h

@@ -75,7 +75,7 @@ public:
     /// @brief Called prior to ExecuteOnScene().
     /// @brief Called prior to ExecuteOnScene().
     /// The function is a request to the process to update its configuration
     /// The function is a request to the process to update its configuration
     /// basing on the Importer's configuration property list.
     /// basing on the Importer's configuration property list.
-    virtual void SetupProperties(const Importer* pImp);
+    virtual void SetupProperties(const Importer* pImp) override;
 
 
 protected:
 protected:
     /// Executes the post processing step on the given imported data.
     /// Executes the post processing step on the given imported data.

+ 2 - 2
code/PostProcessing/SplitLargeMeshes.h

@@ -99,7 +99,7 @@ public:
     * @return true if the process is present in this flag fields,
     * @return true if the process is present in this flag fields,
     *   false if not.
     *   false if not.
     */
     */
-    bool IsActive( unsigned int pFlags) const;
+    bool IsActive( unsigned int pFlags) const override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Called prior to ExecuteOnScene().
     /** Called prior to ExecuteOnScene().
@@ -121,7 +121,7 @@ public:
     * At the moment a process is not supposed to fail.
     * At the moment a process is not supposed to fail.
     * @param pScene The imported data to work at.
     * @param pScene The imported data to work at.
     */
     */
-    void Execute( aiScene* pScene);
+    void Execute( aiScene* pScene) override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     //! Apply the algorithm to a given mesh
     //! Apply the algorithm to a given mesh

+ 3 - 4
code/PostProcessing/TextureTransform.h

@@ -201,14 +201,13 @@ public:
     ~TextureTransformStep() override = default;
     ~TextureTransformStep() override = default;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
-    bool IsActive( unsigned int pFlags) const;
+    bool IsActive( unsigned int pFlags) const override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
-    void Execute( aiScene* pScene);
+    void Execute( aiScene* pScene) override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
-    void SetupProperties(const Importer* pImp);
-
+    void SetupProperties(const Importer* pImp) override;
 
 
 protected:
 protected:
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------

+ 2 - 2
code/PostProcessing/TriangulateProcess.h

@@ -72,14 +72,14 @@ public:
      *   combination of #aiPostProcessSteps.
      *   combination of #aiPostProcessSteps.
      * @return true if the process is present in this flag fields, false if not.
      * @return true if the process is present in this flag fields, false if not.
     */
     */
-    bool IsActive( unsigned int pFlags) const;
+    bool IsActive( unsigned int pFlags) const override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Executes the post processing step on the given imported data.
     /** Executes the post processing step on the given imported data.
     * At the moment a process is not supposed to fail.
     * At the moment a process is not supposed to fail.
     * @param pScene The imported data to work at.
     * @param pScene The imported data to work at.
     */
     */
-    void Execute( aiScene* pScene);
+    void Execute( aiScene* pScene) override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Triangulates the given mesh.
     /** Triangulates the given mesh.

+ 3 - 5
code/PostProcessing/ValidateDataStructure.h

@@ -69,8 +69,7 @@ namespace Assimp    {
 /** Validates the whole ASSIMP scene data structure for correctness.
 /** Validates the whole ASSIMP scene data structure for correctness.
  *  ImportErrorException is thrown of the scene is corrupt.*/
  *  ImportErrorException is thrown of the scene is corrupt.*/
 // --------------------------------------------------------------------------------------
 // --------------------------------------------------------------------------------------
-class ValidateDSProcess : public BaseProcess
-{
+class ValidateDSProcess : public BaseProcess {
 public:
 public:
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /// The default class constructor / destructor.
     /// The default class constructor / destructor.
@@ -78,13 +77,12 @@ public:
     ~ValidateDSProcess() override = default;
     ~ValidateDSProcess() override = default;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
-    bool IsActive( unsigned int pFlags) const;
+    bool IsActive( unsigned int pFlags) const override;
 
 
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
-    void Execute( aiScene* pScene);
+    void Execute( aiScene* pScene) override;
 
 
 protected:
 protected:
-
     // -------------------------------------------------------------------
     // -------------------------------------------------------------------
     /** Report a validation error. This will throw an exception,
     /** Report a validation error. This will throw an exception,
      *  control won't return.
      *  control won't return.