From f8024188f0a8833db90c5adf1a7d3f06357e9ba3 Mon Sep 17 00:00:00 2001 From: iamAdrianIusca Date: Thu, 23 Apr 2020 22:33:13 +0300 Subject: [PATCH] fix the whitespaces --- code/PostProcessing/LimitBoneWeightsProcess.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/code/PostProcessing/LimitBoneWeightsProcess.cpp b/code/PostProcessing/LimitBoneWeightsProcess.cpp index 39e90068b..24899761d 100644 --- a/code/PostProcessing/LimitBoneWeightsProcess.cpp +++ b/code/PostProcessing/LimitBoneWeightsProcess.cpp @@ -73,7 +73,7 @@ bool LimitBoneWeightsProcess::IsActive(unsigned int pFlags) const { // ------------------------------------------------------------------------------------------------ // Executes the post processing step on the given imported data. -void LimitBoneWeightsProcess::Execute(aiScene *pScene) +void LimitBoneWeightsProcess::Execute( aiScene *pScene) { ASSIMP_LOG_DEBUG("LimitBoneWeightsProcess begin"); @@ -93,7 +93,7 @@ void LimitBoneWeightsProcess::SetupProperties(const Importer *pImp) { // ------------------------------------------------------------------------------------------------ // Unites identical vertices in the given mesh -void LimitBoneWeightsProcess::ProcessMesh(aiMesh *pMesh) +void LimitBoneWeightsProcess::ProcessMesh(aiMesh* pMesh) { if (!pMesh->HasBones()) return; @@ -104,9 +104,11 @@ void LimitBoneWeightsProcess::ProcessMesh(aiMesh *pMesh) WeightsPerVertex vertexWeights(pMesh->mNumVertices); size_t maxVertexWeights = 0; - for (unsigned int b = 0; b < pMesh->mNumBones; ++b) { + for (unsigned int b = 0; b < pMesh->mNumBones; ++b) + { const aiBone *bone = pMesh->mBones[b]; - for (unsigned int w = 0; w < bone->mNumWeights; ++w) { + for (unsigned int w = 0; w < bone->mNumWeights; ++w) + { const aiVertexWeight &vw = bone->mWeights[w]; vertexWeights[vw.mVertexId].push_back(Weight(b, vw.mWeight)); maxVertexWeights = std::max(maxVertexWeights, vertexWeights[vw.mVertexId].size()); @@ -134,12 +136,14 @@ void LimitBoneWeightsProcess::ProcessMesh(aiMesh *pMesh) // and renormalize the weights float sum = 0.0f; - for (const Weight *it = vit->begin(); it != vit->end(); ++it) { + for (const Weight *it = vit->begin(); it != vit->end(); ++it) + { sum += it->mWeight; } if (0.0f != sum) { const float invSum = 1.0f / sum; - for (Weight *it = vit->begin(); it != vit->end(); ++it) { + for (Weight *it = vit->begin(); it != vit->end(); ++it) + { it->mWeight *= invSum; } }