summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/glsphere.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/glsphere.cpp b/src/glsphere.cpp
index e80f43a..b5e6c4a 100644
--- a/src/glsphere.cpp
+++ b/src/glsphere.cpp
@@ -17,26 +17,19 @@ void GLSphere::makeSurface(QVector<GLPoint> *pointContainer,
QVector3D northpol = v_Y;
QVector3D southpol = -v_Y;
- QVector3D point1;
- QVector3D point2;
+ QVector3D tmpPoint;
m_firstPoint = m_points->size();
m_points->append(GLPoint(m_radius * northpol, northpol, t0, m_color));
- for (int slice = 1; slice < m_slices; slice += 2)
+ for (int slice = 0; slice < m_slices; slice++)
{
-
for (int stack = 1; stack < m_stacks; stack++)
{
- point1 = calculatePoint(2 * M_PI * slice / m_slices, stack * M_PI / m_stacks);
- m_points->append(GLPoint(m_radius * point1, point1, t0, m_color));
-
- point2 = calculatePoint(2 * M_PI * (slice - 1) / m_slices, stack * M_PI / m_stacks);
- m_points->append(GLPoint(m_radius * point2, point2, t0, m_color));
-
+ tmpPoint = calculatePoint(2 * M_PI * slice / m_slices, stack * M_PI / m_stacks);
+ m_points->append(GLPoint(m_radius * tmpPoint, tmpPoint, t0, m_color));
}
-
}
m_points->append(GLPoint(m_radius * southpol, southpol, t0, m_color));