Added unit tests for ArmaturePopulate when used (added huestos model to tests)

Added clear documentation for this too to explain, you need to enable it to make it available

Signed-off-by: RevoluPowered <gordon@gordonite.tech>
This commit is contained in:
RevoluPowered
2019-10-26 19:48:34 +01:00
parent 46cdd81d75
commit 514257f587
7 changed files with 111 additions and 13 deletions

View File

@@ -48,6 +48,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace Assimp {
/// The default class constructor.
ArmaturePopulate::ArmaturePopulate() : BaseProcess()
{}
/// The class destructor.
ArmaturePopulate::~ArmaturePopulate()
{}
bool ArmaturePopulate::IsActive(unsigned int pFlags) const {
return (pFlags & aiProcess_PopulateArmatureData) != 0;
}
@@ -104,9 +112,9 @@ aiNode *ArmaturePopulate::GetArmatureRoot(aiNode *bone_node,
bone_node = bone_node->mParent;
}
ASSIMP_LOG_WARN_F("can't find armature! node: %s\n", bone_node->mName.C_Str());
ASSIMP_LOG_WARN("GetArmatureRoot() can't find armature!");
return NULL;
}

View File

@@ -39,20 +39,18 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------------------------------------------------------------------
*/
#ifndef SCALE_PROCESS_H_
#define SCALE_PROCESS_H_
#ifndef ARMATURE_POPULATE_H_
#define ARMATURE_POPULATE_H_
#include "Common/BaseProcess.h"
#include <assimp/BaseImporter.h>
#include <vector>
#include <map>
struct aiNode;
struct aiBone;
#if (!defined AI_CONFIG_GLOBAL_SCALE_FACTOR_DEFAULT)
# define AI_CONFIG_GLOBAL_SCALE_FACTOR_DEFAULT 1.0f
#endif // !! AI_DEBONE_THRESHOLD
namespace Assimp {
// ---------------------------------------------------------------------------
@@ -66,12 +64,10 @@ namespace Assimp {
class ASSIMP_API ArmaturePopulate : public BaseProcess {
public:
/// The default class constructor.
ArmaturePopulate() : BaseProcess()
{}
ArmaturePopulate();
/// The class destructor.
virtual ~ArmaturePopulate()
{}
virtual ~ArmaturePopulate();
/// Overwritten, @see BaseProcess
virtual bool IsActive( unsigned int pFlags ) const;