summaryrefslogtreecommitdiffstats
path: root/model.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2008-06-24 15:46:51 +0200
committerSamuel Rødal <sroedal@trolltech.com>2008-06-24 15:52:55 +0200
commita8a1a26bd2fd493fbce70c9a4d03bc31a5347b12 (patch)
tree907bf0470446f26e96d3eeff550562e0fab105d1 /model.cpp
parent534a00df0b791111f2e87e84e30fbfed66c3f5e9 (diff)
Simplify rotation logic.
Diffstat (limited to 'model.cpp')
-rw-r--r--model.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/model.cpp b/model.cpp
index 5b5360f..09afbb5 100644
--- a/model.cpp
+++ b/model.cpp
@@ -95,10 +95,8 @@ Model::Model(const QString &filename)
const Point3d normal = cross(b - a, c - a).normalize();
- for (int j = 0; j < 3; ++j) {
- Point3d &n = m_normals[m_pointIndices.at(i + j)];
- n = n + normal;
- }
+ for (int j = 0; j < 3; ++j)
+ m_normals[m_pointIndices.at(i + j)] += normal;
}
for (int i = 0; i < m_normals.size(); ++i)