From d94c04207785b11819a303d1b81a065208905054 Mon Sep 17 00:00:00 2001 From: cutealien Date: Tue, 7 Jan 2014 22:44:29 +0000 Subject: [PATCH] Merge r4548-4549 from trunk: Add equals check with tolerance in heigthmap optimizer Unify texture transformation for tex coord system with mesh loader. git-svn-id: http://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@4637 dfc29bdd-3216-0410-991c-e03cc46cb475 --- source/Irrlicht/CMeshManipulator.cpp | 2 +- source/Irrlicht/COBJMeshWriter.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Irrlicht/CMeshManipulator.cpp b/source/Irrlicht/CMeshManipulator.cpp index 6d56b8d5..e8532880 100644 --- a/source/Irrlicht/CMeshManipulator.cpp +++ b/source/Irrlicht/CMeshManipulator.cpp @@ -1306,7 +1306,7 @@ void CMeshManipulator::heightmapOptimizeMesh(IMeshBuffer * const mb, const f32 t // if (N.getLengthSQ() < 0.5f) // puts("empty"); - if (N != edges[g].normal[z]) + if (!N.equals(edges[g].normal[z], tolerance)) { // puts("wouldflip"); goto testnext; diff --git a/source/Irrlicht/COBJMeshWriter.cpp b/source/Irrlicht/COBJMeshWriter.cpp index 049a33b9..f2bc1e10 100644 --- a/source/Irrlicht/COBJMeshWriter.cpp +++ b/source/Irrlicht/COBJMeshWriter.cpp @@ -224,7 +224,7 @@ void COBJMeshWriter::getVectorAsStringLine(const core::vector2df& v, core::strin { s = core::stringc(v.X); s += " "; - s += core::stringc(-v.Y); + s += core::stringc(1-v.Y); s += "\n"; }