From 876c689a1d9a6a4134a2a4bcc722dea9cd1ad5cc Mon Sep 17 00:00:00 2001 From: Anakin Date: Mon, 2 Jan 2017 14:14:27 +0100 Subject: [PATCH] cleanup code --- QtMeshViewer/Source/GeometryEngine.cpp | 2 +- QtMeshViewer/Source/MshFile.cpp | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/QtMeshViewer/Source/GeometryEngine.cpp b/QtMeshViewer/Source/GeometryEngine.cpp index 4cf5e4a..e2961d7 100644 --- a/QtMeshViewer/Source/GeometryEngine.cpp +++ b/QtMeshViewer/Source/GeometryEngine.cpp @@ -10,7 +10,7 @@ GeometryEngine::GeometryEngine() { initializeOpenGLFunctions(); - loadFile("..\\Release\\Msh\\4-Poly.msh"); + loadFile("..\\Release\\Msh\\5-Poly.msh"); } GeometryEngine::~GeometryEngine() diff --git a/QtMeshViewer/Source/MshFile.cpp b/QtMeshViewer/Source/MshFile.cpp index d308afd..b8b1105 100644 --- a/QtMeshViewer/Source/MshFile.cpp +++ b/QtMeshViewer/Source/MshFile.cpp @@ -452,11 +452,7 @@ void MshFile::analyseSegmChunks(Model * dataDestination, std::list for (unsigned int tri = 0; tri < tmp_multiPolySize - 2; tri++) // ..calculate the edge indices for (int triEdge = 0; triEdge < 3; triEdge++) - new_segment->indices.push_back((GLuint)(tri + triEdge - ((tri % 2) * (triEdge - 1) * 2))); - } - else - { - //TODO: this shouldn't happen only once + new_segment->indices.push_back((GLuint)tmp_buffer[(tri + triEdge - ((tri % 2) * (triEdge - 1) * 2))]); } } // if 2 high bits are set @@ -478,11 +474,6 @@ void MshFile::analyseSegmChunks(Model * dataDestination, std::list for (int triEdge = 0; triEdge < 3; triEdge++) new_segment->indices.push_back((GLuint)tmp_buffer[(tri + triEdge - ((tri % 2) * (triEdge - 1) * 2))]); } - else - { - //TODO: this shouldn't happen - std::cout << "Where am i??" << std::endl; - } } }