Robert Osfield
60d4b71d2b
From Björn Hein, "it seems that for generating "per vertex normals" as stated in the
comment, two of them are missing. This results in wrong display of
STL-files regarding normals. Following simple fix seems to work:
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);
"