History

Simplifications suggested by Andrew.

Andrzej Kapolka committed 12 years ago

Commit e01113d1 parent 36e78921 file · +1 −4Browse files

Showing the changes to interface/src/MetavoxelSystem.cpp (1 of 1 file). Show all

Unified · Split

interface/src/MetavoxelSystem.cpp+1−4
@@ -1899,12 +1899,9 @@ int VoxelAugmentVisitor::visit(MetavoxelInfo& info) { · 1898 unmodified lines
18991899 int largestI = (largestIndex == 0) ? 1 : 2;
19001900 float sjj = d[largestJ][largestJ];
19011901 float sii = d[largestI][largestI];
1902− float angle = (sii == sjj ? PI_OVER_TWO : glm::atan(2.0f * d[largestJ][largestI], sjj - sii)) / 2.0f;
1902+ float angle = glm::atan(2.0f * d[largestJ][largestI], sjj - sii) / 2.0f;
19031903 glm::quat rotation = glm::angleAxis(angle, largestIndex == 0 ? glm::vec3(0.0f, 0.0f, -1.0f) :
19041904 (largestIndex == 1 ? glm::vec3(0.0f, 1.0f, 0.0f) : glm::vec3(-1.0f, 0.0f, 0.0f)));
1905− if (rotation.w == 0.0f) {
1906− break;
1907− }
19081905 combinedRotation = glm::normalize(rotation * combinedRotation);
19091906 glm::mat3 matrix = glm::mat3_cast(combinedRotation);
19101907 d = matrix * ata * glm::transpose(matrix);