Refactoring ... added documentation, simplified some parts of the code and migrated some class declarations in separate files.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@100 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
aramis_acg
2008-08-08 18:34:14 +00:00
parent 333f0c805e
commit 6fe8c867e8
18 changed files with 285 additions and 167 deletions

View File

@@ -49,29 +49,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "../include/aiMesh.h"
#include "../include/aiScene.h"
#include "../include/aiAssert.h"
#include "../include/assimp.hpp"
#include "../include/DefaultLogger.h"
using namespace Assimp;
/*static*/ unsigned int LimitBoneWeightsProcess::mMaxWeights = AI_LMW_MAX_WEIGHTS;
extern "C" {
// ------------------------------------------------------------------------------------------------
aiReturn aiSetBoneWeightLimit(unsigned int pLimit)
{
if (0 == pLimit)
{
LimitBoneWeightsProcess::mMaxWeights = 0xFFFFFFFF;
return AI_FAILURE;
}
LimitBoneWeightsProcess::mMaxWeights = pLimit;
DefaultLogger::get()->debug("aiSetBoneWeightLimit() - bone weight limit was changed");
return AI_SUCCESS;
}
};
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
LimitBoneWeightsProcess::LimitBoneWeightsProcess()
@@ -100,6 +83,18 @@ void LimitBoneWeightsProcess::Execute( aiScene* pScene)
ProcessMesh( pScene->mMeshes[a]);
}
// ------------------------------------------------------------------------------------------------
// Executes the post processing step on the given imported data.
void LimitBoneWeightsProcess::SetupProperties(const Importer* pImp)
{
// get the current value of the property
if(0xffffffff == (this->mMaxWeights = pImp->GetProperty(
AI_CONFIG_PP_LBW_MAX_WEIGHTS,0xffffffff)))
{
this->mMaxWeights = AI_LMW_MAX_WEIGHTS;
}
}
// ------------------------------------------------------------------------------------------------
// Unites identical vertices in the given mesh
void LimitBoneWeightsProcess::ProcessMesh( aiMesh* pMesh)