From 084a584773178b835ddb9ba671bfb91607d5bc3a Mon Sep 17 00:00:00 2001 From: Stefan Suhren Date: Tue, 24 Nov 2015 11:19:47 +0100 Subject: Don't be smart during points --- src/glsphere.cpp | 15 ++++----------- 1 file 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 *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)); -- cgit v1.2.3-70-g09d2