From 27f98b2b6a9c0b6f4d1fc2867fed835d4952f047 Mon Sep 17 00:00:00 2001 From: David Williams Date: Sun, 23 Sep 2007 16:52:23 +0000 Subject: [PATCH] Work on mesh decimation. --- source/PolyVoxSceneManager.cpp | 2 +- source/SurfacePatch.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/PolyVoxSceneManager.cpp b/source/PolyVoxSceneManager.cpp index fccc4384..5da5687a 100644 --- a/source/PolyVoxSceneManager.cpp +++ b/source/PolyVoxSceneManager.cpp @@ -1010,7 +1010,7 @@ namespace Ogre iterPatch->second.computeNormalsFromVolume(volIter); iterPatch->second.endDefinition(); bool removedVertex = false; - //for(uint ct = 0; ct < 7; ct++) + //for(uint ct = 0; ct < 5; ct++) do { removedVertex = iterPatch->second.decimateOneVertex(); diff --git a/source/SurfacePatch.cpp b/source/SurfacePatch.cpp index c7122619..c466b2a6 100644 --- a/source/SurfacePatch.cpp +++ b/source/SurfacePatch.cpp @@ -47,7 +47,7 @@ namespace Ogre void SurfacePatch::addTriangle(const SurfaceVertex& v0,const SurfaceVertex& v1,const SurfaceVertex& v2) { - if(v0.position.x > 16) + /*if(v0.position.x > 16) return; if(v0.position.y > 16) return; @@ -58,7 +58,7 @@ namespace Ogre if(v2.position.x > 16) return; if(v2.position.y > 16) - return; + return;*/ m_uTrianglesAdded++; @@ -435,7 +435,7 @@ namespace Ogre if(isPolygonConvex(listConnectedVertices) == false) { - return false; + continue; } LogManager::getSingleton().logMessage("Vertex can be removed");