From 60d4b71d2baa868bc7ef9d7386d9d6384682921d Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 2 Oct 2013 11:09:29 +0000 Subject: [PATCH] =?UTF-8?q?From=20Bj=C3=B6rn=20Hein,=20"it=20seems=20that?= =?UTF-8?q?=20for=20generating=20"per=20vertex=20normals"=20as=20stated=20?= =?UTF-8?q?in=20the=20comment,=20two=20of=20them=20are=20missing.=20This?= =?UTF-8?q?=20results=20in=20wrong=20display=20of=20STL-files=20regarding?= =?UTF-8?q?=20normals.=20Following=20simple=20fix=20seems=20to=20work:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Index: ReaderWriterSTL.cpp =================================================================== --- ReaderWriterSTL.cpp (Revision 13797) +++ ReaderWriterSTL.cpp (Arbeitskopie) @@ -108,6 +108,8 @@ ++itr) { perVertexNormals->push_back(*itr); + perVertexNormals->push_back(*itr); + perVertexNormals->push_back(*itr); } geom->setNormalArray(perVertexNormals.get(), osg::Array::BIND_PER_VERTEX); " --- src/osgPlugins/stl/ReaderWriterSTL.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/osgPlugins/stl/ReaderWriterSTL.cpp b/src/osgPlugins/stl/ReaderWriterSTL.cpp index 729d8ef00..11d5a48f8 100644 --- a/src/osgPlugins/stl/ReaderWriterSTL.cpp +++ b/src/osgPlugins/stl/ReaderWriterSTL.cpp @@ -108,6 +108,8 @@ private: ++itr) { perVertexNormals->push_back(*itr); + perVertexNormals->push_back(*itr); + perVertexNormals->push_back(*itr); } geom->setNormalArray(perVertexNormals.get(), osg::Array::BIND_PER_VERTEX);