Skip to content

Commit

Permalink
Code properly indented
Browse files Browse the repository at this point in the history
  • Loading branch information
akulagrawal committed May 21, 2018
1 parent acd98d3 commit c596b76
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/COLLADA2GLTFWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1621,17 +1621,17 @@ bool COLLADA2GLTF::Writer::writeController(const COLLADAFW::Controller* controll
int numberOfComponents = GLTF::Accessor::getNumberOfComponents(type);

for (size_t i = 0; i < weights.size(); i++) {
float weightSum = 0;
float* weight = weights[i];
for (size_t j = 0; j < numberOfComponents; j++) {
weightSum = weightSum + std::abs(weight[j]);
}
if (weightSum > 0) {
for (size_t j = 0; j < numberOfComponents; j++) {
weight[j] = weight[j] / weightSum;
}
}
}
float weightSum = 0;
float* weight = weights[i];
for (size_t j = 0; j < numberOfComponents; j++) {
weightSum = weightSum + std::abs(weight[j]);
}
if (weightSum > 0) {
for (size_t j = 0; j < numberOfComponents; j++) {
weight[j] = weight[j] / weightSum;
}
}
}

COLLADAFW::UniqueId meshId = skinController->getSource();
GLTF::Mesh* mesh = _meshInstances[meshId];
Expand Down

0 comments on commit c596b76

Please sign in to comment.