diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2008-06-24 15:46:51 +0200 |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2008-06-24 15:52:55 +0200 |
commit | a8a1a26bd2fd493fbce70c9a4d03bc31a5347b12 (patch) | |
tree | 907bf0470446f26e96d3eeff550562e0fab105d1 /model.cpp | |
parent | 534a00df0b791111f2e87e84e30fbfed66c3f5e9 (diff) |
Simplify rotation logic.
Diffstat (limited to 'model.cpp')
-rw-r--r-- | model.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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) |