Commit 53f63875 authored by Mike Kremer's avatar Mike Kremer
Browse files

Making tri/poly-mesh test routine faster by skipping the iteration over all...

Making tri/poly-mesh test routine faster by skipping the iteration over all faces if the first non-triangle polygon has been found.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@8334 383ad7c9-94d9-4d36-a494-682f7c89f535
parent fe2ea618
......@@ -144,7 +144,7 @@ int FilePLYPlugin::loadObject(QString _filename) {
// If Ask is selected -> show dialog
objectId = loadPolyMeshObject(_filename);
bool triMesh = false;
bool triMesh = true;
PolyMeshObject *object = 0;
if(!PluginFunctions::getObject(objectId, object))
......@@ -158,9 +158,12 @@ int FilePLYPlugin::loadObject(QString _filename) {
++count;
// Check if it is a triangle. If not, this is really a poly mesh
if ( count == 3 ) {
triMesh = true;
if ( count != 3 ) {
triMesh = false;
break;
}
if(triMesh == false) break;
}
QMessageBox msgBox;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment