Quick questions about normals on stl file, it would be possible to use existing
osgUtil::SmoothingVisitor ? or it does not handle special case of stl file ?
Cedric Pinson
osgjs.org - cedricpinson.com - sketchfab.com
On Tuesday 24 September 2013 at 15:31, "Björn Hein (IPR)" wrote:
> Dear Robert,
>
> 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);
>
>
> Best regards
>
> Björn
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> (mailto:[email protected])
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
>
>
> Attachments:
> - ReaderWriterSTL.cpp
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org