fix the whitespaces

pull/3042/head
iamAdrianIusca 2020-04-23 22:40:14 +03:00
parent a77a18693d
commit d02be05862
1 changed files with 6 additions and 6 deletions

View File

@ -100,7 +100,7 @@ void LimitBoneWeightsProcess::ProcessMesh(aiMesh* pMesh)
// collect all bone weights per vertex // collect all bone weights per vertex
typedef SmallVector<Weight,8> VertexWeightArray; typedef SmallVector<Weight,8> VertexWeightArray;
typedef std::vector <VertexWeightArray> WeightsPerVertex; typedef std::vector<VertexWeightArray> WeightsPerVertex;
WeightsPerVertex vertexWeights(pMesh->mNumVertices); WeightsPerVertex vertexWeights(pMesh->mNumVertices);
size_t maxVertexWeights = 0; size_t maxVertexWeights = 0;
@ -109,7 +109,7 @@ void LimitBoneWeightsProcess::ProcessMesh(aiMesh* pMesh)
const aiBone* bone = pMesh->mBones[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]; const aiVertexWeight& vw = bone->mWeights[w];
vertexWeights[vw.mVertexId].push_back(Weight(b, vw.mWeight)); vertexWeights[vw.mVertexId].push_back(Weight(b, vw.mWeight));
maxVertexWeights = std::max(maxVertexWeights, vertexWeights[vw.mVertexId].size()); maxVertexWeights = std::max(maxVertexWeights, vertexWeights[vw.mVertexId].size());
} }
@ -137,13 +137,13 @@ void LimitBoneWeightsProcess::ProcessMesh(aiMesh* pMesh)
// and renormalize the weights // and renormalize the weights
float sum = 0.0f; 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; sum += it->mWeight;
} }
if (0.0f != sum) { if (0.0f != sum) {
const float invSum = 1.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; it->mWeight *= invSum;
} }
@ -159,7 +159,7 @@ void LimitBoneWeightsProcess::ProcessMesh(aiMesh* pMesh)
// rebuild the vertex weight array for all bones // rebuild the vertex weight array for all bones
for (unsigned int a = 0; a < vertexWeights.size(); ++a) for (unsigned int a = 0; a < vertexWeights.size(); ++a)
{ {
const VertexWeightArray &vw = vertexWeights[a]; const VertexWeightArray& vw = vertexWeights[a];
for (const Weight* it = vw.begin(); it != vw.end(); ++it) for (const Weight* it = vw.begin(); it != vw.end(); ++it)
{ {
aiBone* bone = pMesh->mBones[it->mBone]; aiBone* bone = pMesh->mBones[it->mBone];
@ -170,7 +170,7 @@ void LimitBoneWeightsProcess::ProcessMesh(aiMesh* pMesh)
// remove empty bones // remove empty bones
unsigned int writeBone = 0; unsigned int writeBone = 0;
for (unsigned int readBone = 0; readBone < pMesh->mNumBones; ++readBone) for (unsigned int readBone = 0; readBone< pMesh->mNumBones; ++readBone)
{ {
aiBone* bone = pMesh->mBones[readBone]; aiBone* bone = pMesh->mBones[readBone];
if (bone->mNumWeights > 0) if (bone->mNumWeights > 0)